SDK API view state

Hi all,

I am trying to build a simple application in order to access the current document’s properties and state. I have managed to get the current document:

com.sun.star.lang.XComponent currentComponent = xDesktop.getCurrentComponent();
XTextDocument temp = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, currentComponent);

and get some properties (com.sun.star.document.XDocumentProperties, com.sun.star.beans.XPropertySet. Then, at some point I call:

com.sun.star.frame.XController xController = temp.getCurrentController();
System.out.println(xController.getViewData());

This returns strings like “1418;1418;200;0;0;12143;6555;0;0” or “5894;1658;80;0;0;19163;12300;0;0”.

Any ideas about where I can find documentation about what property each number refers to?

Regards,

lgs

Hi

ViewData (array of PropertyValue) gives view state (e.g. for writer document: ViewLeft, ViewTop, VisibleLeft, VisibleTop, VisibleRight, VisibleBottom, ZoomType, ViewLayoutColumns, ViewLayoutBookMode).

[EDIT]

To complete: since this is an array of PropertyValue you can browse for their Name property

Not sure to understand your need but if you look for FileProperties you should use DocumentProperties

Regards

Thanks!

lgs