Working with Presentation Documents

From Apache OpenOffice Wiki
Jump to: navigation, search

The structure of Impress documents is enhanced by a handout page per document, one notes page per draw page, and one notes master page for each master page. This means that the creation of normal draw and draw master pages automatically create corresponding notes and notes master pages. Due to this fact there are no interfaces for creation or deletion of notes or notes master pages.

The following UML diagram describes the whole page structure of Impress. The horizontal dotted line illustrates the general page structure lying beneath the dotted line, and the enhanced page structure of Impress lying above.


Calling getDrawPages() at the interface of a presentation document retrieves a collection of instances with presentation specific properties.

The following two examples demonstrate how to access the notes pages and the handout page of an Impress document:

  /** in Impress documents each draw page as also each draw master page has
      a corresponding notes page
  static public XDrawPage getNotesPage(XDrawPage xDrawPage) {
      XDrawPage xNotesPage;
      XPresentationPage xPresentationPage = (XPresentationPage)UnoRuntime.queryInterface(
          XPresentationPage.class, xDrawPage);
      /* only Impress pages support the XPresentationPage interface,
         for all other pages the interface will be zero, so a test
         won't hurt
      if (xPresentationPage != null)
          xNotesPage = xPresentationPage.getNotesPage();
      return xNotesPage;

The notes master page that corresponds to a notes page can be accessed by the interface of the master page.

  /** in impress each document has one handout page */
  static public XDrawPage getHandoutMasterPage(XComponent xComponent) {
      XHandoutMasterSupplier aHandoutMasterSupplier = 
              XHandoutMasterSupplier.class, xComponent);
      return aHandoutMasterSupplier.getHandoutMasterPage();
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages