Hi Tobias,

impress uses a different concept as each slide has a master page
assigned which for one is a complete page with shapes that is
rendered on the background of that slide but also contains a unique
set of presentation styles for shapes used in layouts.

So I don't think we need page styles for impress as master pages
have far more features than just simple styles and fit the slide
oriented document model of impress better.

Same holds for draw except draw has no presentation styles of course.

Best regards,
Christian

Tobias Krais wrote:
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]


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

Reply via email to