Hi,

I added a XFrameActionListener to a spreadsheet document.

If a user changes for example from "Tabelle3" to the print preview (in german: 
"Seitenansicht")
and back the last frameAction(FrameActionEvent evt) i get is: 
"COMPONENT_REATTACHED"

At this point it seems not to be possible to get the current Controller via xModel.getCurrentController()
but i can get a XController using:

XController xController = evt.Frame.getController();

BTW: Is this correct ?

Now i try to get the active sheet ("Tabelle3"), but it seems not to be possible 
...

XSpreadsheetView xView = (XSpreadsheetView) UnoRuntime.queryInterface(
                                XSpreadsheetView.class, xController);

XSpreadsheet xSheet = xView.getActiveSheet()

it seem's xSheet always is the *first* sheet of the spreadsheet document
with index 0 (for example: "Tabelle1") and not the above mentioned "Tabelle3"
which is actually shown ...

What can i do ?

Oliver


--

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to