Bug 126391 - "ActiveSheet" is undocumented at "com.sun.star.frame.XController"
Summary: "ActiveSheet" is undocumented at "com.sun.star.frame.XController"
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.2.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-14 22:24 UTC by Konstantin Kharlamov
Modified: 2019-07-15 21:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
print types of CurrentController and CurrentController.ActiveSheet (945 bytes, text/x-python)
2019-07-14 22:24 UTC, Konstantin Kharlamov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2019-07-14 22:24:08 UTC
Created attachment 152768 [details]
print types of CurrentController and CurrentController.ActiveSheet

I'm trying to figure out from docs how to get a sheet by name, and it turns out there's documentation missing. At the very least, if you go here

https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1frame_1_1XController.html

You'll find out that there's no "ActiveSheet" field.

However if you do:

1. Run office as soffice --calc --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager"
2. Execute the attached script

You'll find out that XController actually does have the field.
Comment 1 Oliver Brinzing 2019-07-15 17:26:48 UTC
get/setActiveSheet() methods from com::sun::star::sheet::XSpreadsheetView belong to service "SpreadsheetView":

https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetView.html#a25ce2a7ea898c267c0e90ba8ea5c43b3
Comment 2 Konstantin Kharlamov 2019-07-15 21:48:29 UTC
(In reply to Oliver Brinzing from comment #1)
> get/setActiveSheet() methods from com::sun::star::sheet::XSpreadsheetView
> belong to service "SpreadsheetView":
> 
> https://api.libreoffice.org/docs/idl/ref/
> servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetView.
> html#a25ce2a7ea898c267c0e90ba8ea5c43b3

Thank, I think I see. So, currently provided by an object functions are determined by services it implements (the "supportedServices=" string when printing the object in python).