Hi together again,
I worte a little program that sets the printer tray and prints OO
documents. I use following code to set the printer tray for XTextdocuments:
----%<-----
XText xText = myXTextDocument.getText();
// create a text cursor from the cells XText interface
XTextCursor xTextCursor = xText.createTextCursor();
// Get the property set of the cell's TextCursor
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
String pageStyleName = xPropSet
.getPropertyValue("PageStyleName").toString();
-----%<----
For Spreadsheets I use a similar way to get the PageStyleName using:
-----%<-----
// Selecting each SpreadSheet by itself
Object sheet = xSpreadsheets.getByName(sheetName);
XSpreadsheet xSpreadsheet = (XSpreadsheet)
AnyConverter.toObject(XSpreadsheet.class,
sheet);
// Get all properties of the sheet
XPropertySet xSheetProps = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xSpreadsheet);
// Get page style property
String pageStyleName = xSheetProps
.getPropertyValue("PageStyle").toString();
-----%<-----
Now I want to do the same for a presentation document
-----%<-----
// Getting the page style name
XPresentation xPresentation = xPresSupplier.getPresentation();
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPresentation);
// TODO: There is no such property name...
String pageStyleName =
xPropSet.getPropertyValue("PageStyleName").toString();
-----%<-----
Same for drawing documents:
-----%<-----
XDrawPage xDrawPage = (XDrawPage) AnyConverter.toObject(XDrawPage.class,
xDrawPages.getByIndex(i));
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xDrawPage);
// TODO: There is no such property name...
String pageStyle =
xPropSet.getPropertyValue("PageStyleName").toString();
-----%<-----
Do you think it is worth to add an ENHANCEMENT issue?
Please disagree or tell me your ideas.
Greetings, Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]