Ask Your Question
0

SDK API view state

asked 2016-09-21 10:37:52 +0200

lgs gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-09-21 11:50:08 +0200

pierre-yves samyn gravatar image

updated 2016-09-21 15:24:25 +0200

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

edit flag offensive delete link more

Comments

Thanks!

lgs

lgs gravatar imagelgs ( 2016-09-28 11:12:27 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-09-21 10:37:52 +0200

Seen: 125 times

Last updated: Sep 21 '16