Hi together,
at the moment I search for the page style for presentation documents and
for draw documents. For a XTextDocument I retrieve it that way:
-----%<-----
// Get the text document
XTextDocument xTextDocument = (XTextDocument)
UnoRuntime.queryInterface(XTextDocument.class,
this.xComponent);
XText xText = xTextDocument.getText();
// create a text cursor from the cells XText interface
XTextCursor xTextCursor = xText.createTextCursor();
// Get the property set of the cell's TextCursor
XPropertySet xTextCursorProps = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
try {
String pageStyleName =
xTextCursorProps.getPropertyValue("PageStyleName").toString();
} catch (Exception e) {}
-----%<-----
Now I try to get the PageStyleName for the Presentation document, but I
don't know what the name of the property is...
-----%<-----
XPresentationSupplier xPresSupplier = (XPresentationSupplier)
UnoRuntime.queryInterface(XPresentationSupplier.class,
xComponent);
XPresentation xPresentation = xPresSupplier.getPresentation();
XStyleFamiliesSupplier xSupplier = (XStyleFamiliesSupplier)
UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
xPresentation);
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPresentation);
String pageStyleName =
xPropSet.getPropertyValue("PageStyleName").toString();
-----%<-----
And the same for Draw Documents:
-----%<-----
XDrawPagesSupplier xDrawPagesSupplier = (XDrawPagesSupplier)
UnoRuntime.queryInterface(XDrawPagesSupplier.class,
xComponent);
XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
for (int i = 0; i < xDrawPages.getCount(); i++) {
XDrawPage xDrawPage = (XDrawPage) AnyConverter
.toObject(XDrawPage.class, xDrawPages.getByIndex(i));
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class,
xDrawPage);
String pageStyle =
xPropSet.getPropertyValue("PageStyleName").toString();
}
-----%<-----
For both, the Presentains and the Drawings, a UnknownPropertyException
is thrown. Can you tell me the PropertyNames?
Greetings, Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]