Presentation Settings

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 12:37, 15 February 2008 by Ccornell (Talk | contribs)

Jump to: navigation, search



Impress documents contain a Presentation service that controls a running presentation. This com.sun.star.presentation.Presentation service can be accessed through the com.sun.star.presentation.XPresentationSupplier interface through the method:

 com::sun::star::presentation::XPresentation getPresentation()

The method getPresentation() returns a com.sun.star.presentation.Presentation service. It contains properties for presentation settings and the interface com.sun.star.presentation.XPresentation.

The presentation settings define the slide range, which custom show is used, and how the presentation is executed. These settings are provided as properties of the service com.sun.star.presentation.Presentation. This service also exports the com.sun.star.presentation.XPresentation interface that starts and ends a presentation.

Methods of com.sun.star.presentation.XPresentation
start() Starts the presentation in full-screen mode.
end() Stops the presentation.
rehearseTimings() Starts the presentation from the beginning and shows the actual running time to the user.


Properties of com.sun.star.presentation.Presentation
AllowAnimations boolean - Enables/disables the shape animations.
CustomShow string - Contains the name of a customized show that is used for the presentation.
Presentation:FirstPage string - Contains the name of the page where the presentation is started.
IsAlwaysOnTop boolean - If true, the window of the presentation is always on top of all the other windows.
IsAutomatic boolean - If true, all pages are changed automatically.
IsEndless boolean - If true, the presentation is repeated endlessly.
IsFullScreen boolean - If true, the presentation runs in full-screen mode.
IsLivePresentation boolean - With this property, the presentation is set to live mode.
IsMouseVisible boolean - If true, the mouse is visible during the presentation.
Pause long - Duration of the black screen after the presentation has finished.
StartWithNavigator boolean - If true, the Navigator is opened at the start of the presentation.
UsePen boolean - If true, a pen is shown during presentation.
IsShowAll boolean - Show all slides.
IsShowLogo boolean - Show OpenOffice.org logo on pause page in automatic mode.
IsTransitionOnClick boolean - Slide change on mouse click, in addition to pressing cursor right.

The properties IsShowAll, IsShowLogo and IsTransitionOnClick<c/ode> are currently not documented in the API reference.

The next example demonstrates how to start a presentation that is automatically repeated and plays in full-screen mode by modifying the presentation settings.

 XPresentationSupplier xPresSupplier = (XPresentationSupplier)UnoRuntime.queryInterface( 
     XPresentationSupplier.class, xComponent);
 XPresentation xPresentation = xPresSupplier.getPresentation();
 XPropertySet xPresPropSet = (XPropertySet)UnoRuntime.queryInterface(
     XPropertySet.class, xPresentation);
 xPresPropSet.setPropertyValue("IsEndless", new Boolean(true));
 xPresPropSet.setPropertyValue("IsFullScreen", new Boolean(true));
 xPresPropSet.setPropertyValue("Pause", new Integer(0));
 xPresentation.start();
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools