Hi Aaron,
Aaron Ehrensberger wrote (9-4-2009 19:36)
Can anybody help me use the API?
There is a service called com.sun.star.text.TextField.PageCount -
http://api.openoffice.org/docs/common/ref/com/sun/star/text/textfield/Pa
geCount.html - that says it should show me the page count of the
document.
However, I can't figure out how to get the value of the page count. I
believe it's a short, but how do I cast it, retrieve it, etc...?
I've tried this, to no avail...
Object pageCount =
xDocMSF.createInstance("com.sun.star.text.TextField.PageCount" );
XPropertySet pageCountPS = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, pageCount );
I would expect that the document itself gives info about the pagecount,
and the text context about the page number. But to be honest: I did not
look into it.
Have you tried that route?
BTW: d...@api.openoffice.org is a more appropriate list for the
api-questions ;-)
Ciao,
Cor
--
Cor Nouws - nl.OpenOffice.org marketing contact
= "2009 - Develop OOo" = www.nieuwsteoffice.nl =
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org