Hi together,

I try to set the printer tray for a XSpreadsheetDocument. With a
XTextDocument it works perfectly. Please have a look at my code:
-----%<-----
XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)
        UnoRuntime.queryInterface(XSpreadsheetDocument.class,
                this.xComponent);
XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets();
String[] sheets = xSpreadsheets.getElementNames();
Object sheet = xSpreadsheets.getByName(sheets[0]);
XSpreadsheet xSpreadsheet = (XSpreadsheet)
        UnoRuntime.queryInterface(XSpreadsheet.class, sheet);
XSheetCellCursor xSCC = xSpreadsheet.createCursor();
XPropertySet xSheetCursorProps = (XPropertySet)
        UnoRuntime.queryInterface(XPropertySet.class, xSCC);
// Here I hang: the PropertyValue "PageStyleName" does not exist
// How can I get the page property to be able to continue as below...
String pageStyleName = xSheetCursorProps
        .getPropertyValue("PageStyleName").toString();

// Get the StyleFamiliesSupplier interface of the document
XStyleFamiliesSupplier xSupplier = (XStyleFamiliesSupplier)
        UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
                    xTextDocument);
// Use the StyleFamiliesSupplier interface to get the XNameAccess
// interface of the actual style families
XNameAccess xFamilies = (XNameAccess)
        UnoRuntime.queryInterface(XNameAccess.class,
                xSupplier.getStyleFamilies());
// Access the 'PageStyles' Family
XNameContainer xFamily = (XNameContainer)
        UnoRuntime.queryInterface(XNameContainer.class,
                xFamilies.getByName("PageStyles"));

XStyle xStyle = (XStyle)UnoRuntime.queryInterface(XStyle.class,
        xFamily.getByName(pageStyleName));
// Get the property set of the cell's TextCursor
XPropertySet xStyleProps = (XPropertySet)
        UnoRuntime.queryInterface(XPropertySet.class, xStyle);
-----%<-----
Can somebody tell me where I can find a documentation for all the
Property Values for SpreadSheet interfaces?

Thanks in advance!

Greetings, Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to