Ask Your Question
0

How can a macro tell if it's running in Base? [closed]

asked 2017-03-28 03:24:05 +0200

EasyTrieve gravatar image

updated 2020-09-28 18:57:00 +0200

Alex Kemp gravatar image

I tried supportsService() but it always returns false for Base Services.

Is there an equivalent test for Base to these 4 other support tests?

oDoc = ThisComponent  

msgbox oDoc.supportsService("com.sun.star.sheet.SpreadsheetDocument"            )
msgbox oDoc.supportsService("com.sun.star.drawing.DrawingDocument"              )
msgbox oDoc.supportsService("com.sun.star.presentation.PresentationDocument"    )
msgbox oDoc.supportsService("com.sun.star.text.TextDocument"                    )

In other words when you're in Calc, and only Calc, ThisComponent.supportsService("com.sun.star.sheet.SpreadsheetDocument") returns True.

I'm looking for the same sort of test for base.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-28 18:56:04.314849

1 Answer

Sort by » oldest newest most voted
1

answered 2017-03-28 03:54:50 +0200

Ratslinger gravatar image

com.sun.star.sdb.OfficeDatabaseDocument

edit flag offensive delete link more

Comments

Thanks! Thought I had looked everywhere, but missed that one. For others, he means that I was wrong and that supportsService really does work for Base, like this: oDoc.supportsService("com.sun.star.sdb.OfficeDatabaseDocument") returns True.

EasyTrieve gravatar imageEasyTrieve ( 2017-03-28 04:09:21 +0200 )edit

Question Tools

2 followers

Stats

Asked: 2017-03-28 03:24:05 +0200

Seen: 72 times

Last updated: Mar 28 '17