Ask Your Question
0

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

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

EasyTrieve 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 close merge delete

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
Login/Signup to Answer

Question Tools

2 followers

Stats

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

Seen: 36 times

Last updated: Mar 28 '17