English
Ask Your Question
0

Missing links in the API documention

asked 2013-11-11 06:40:48 +0200

Shane gravatar image

updated 2013-11-11 06:57:20 +0200

Here is an example of the first line of a basic macro for calc -

oSheet = ThisComponent.getSheets.getByIndex(0)

In the API documention, I see the method getByIndex is part of interface XIndexAccess and the method getSheets is part of interface XSpreadsheetDocument.

How would I know ThisComponent supports the method getSheets?

If I understand http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/XSpreadsheetDocument.html correctly, getSheets() returns an XSpreadsheets.

How would I know XSpreadsheets supports the method getByIndex?

edit retag flag offensive close delete

1 answer

Sort by » oldest newest most voted
1

answered 2013-11-11 07:50:48 +0200

karolus gravatar image

updated 2013-11-11 07:56:29 +0200

'ThisComponent' is a global Variable in Basiccontext, it points to the Document where the Basic-code is stored in, or otherwise to the actual Dokument in Focus.

to your Other Questions: Install mri and use it, it tells you everthing about what Attributes, Methods etc., your inspected Object have.

Karolus

edit flag offensive delete publish link more

Comments

Thanks Karolus, I have installed mri

Is this the only way to answer my questions above? Are the answers not documented somewhere? (I am a great fan of RTFM - if only I could find the FM :)

Shane ( 2013-11-12 03:48:02 +0200 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2013-11-11 06:40:48 +0200

Seen: 26 times

Last updated: Nov 11 '13