Difference between revisions of "Documentation/DevGuide/Drawings/Presentation Settings"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
 
m
(6 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Drawings/Custom Slide Show
 
|NextPage=Documentation/DevGuide/Drawings/Custom Slide Show
 
}}
 
}}
{{DISPLAYTITLE:Presentation Settings}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Drawings/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Presentation Settings}}
 
<!--<idltopic>com.sun.star.presentation.XPresentation</idltopic>-->
 
<!--<idltopic>com.sun.star.presentation.XPresentation</idltopic>-->
 
Impress documents contain a Presentation service that controls a running presentation. This <idl>com.sun.star.presentation.Presentation</idl> service can be accessed through the <idl>com.sun.star.presentation.XPresentationSupplier</idl> interface through the method:
 
Impress documents contain a Presentation service that controls a running presentation. This <idl>com.sun.star.presentation.Presentation</idl> service can be accessed through the <idl>com.sun.star.presentation.XPresentationSupplier</idl> interface through the method:
  
 +
<source lang="idl">
 
   com::sun::star::presentation::XPresentation getPresentation()
 
   com::sun::star::presentation::XPresentation getPresentation()
 +
</source>
  
 
The method <code>getPresentation()</code> returns a <idl>com.sun.star.presentation.Presentation</idl> service. It contains properties for presentation settings and the interface <idl>com.sun.star.presentation.XPresentation</idl>.
 
The method <code>getPresentation()</code> returns a <idl>com.sun.star.presentation.Presentation</idl> service. It contains properties for presentation settings and the interface <idl>com.sun.star.presentation.XPresentation</idl>.
Line 82: Line 85:
  
 
<!--[BUG641+]-->
 
<!--[BUG641+]-->
The properties <code>IsShowAll</code>, <code>IsShowLogo</code> and <code>IsTransitionOnClick<c/ode> are currently not documented in the API reference.
+
The properties <code>IsShowAll</code>, <code>IsShowLogo</code> and <code>IsTransitionOnClick</code> 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.  
 
The next example demonstrates how to start a presentation that is automatically repeated and plays in full-screen mode by modifying the presentation settings.  
 
<!--[SOURCE:Drawing/PresentationDemo.java]-->
 
<!--[SOURCE:Drawing/PresentationDemo.java]-->
  
 +
<source lang="java">
 
   XPresentationSupplier xPresSupplier = (XPresentationSupplier)UnoRuntime.queryInterface(  
 
   XPresentationSupplier xPresSupplier = (XPresentationSupplier)UnoRuntime.queryInterface(  
 
       XPresentationSupplier.class, xComponent);
 
       XPresentationSupplier.class, xComponent);
Line 92: Line 96:
 
   XPropertySet xPresPropSet = (XPropertySet)UnoRuntime.queryInterface(
 
   XPropertySet xPresPropSet = (XPropertySet)UnoRuntime.queryInterface(
 
       XPropertySet.class, xPresentation);
 
       XPropertySet.class, xPresentation);
   xPresPropSet.setPropertyValue("IsEndless", new Boolean(true));
+
   xPresPropSet.setPropertyValue("IsEndless", Boolean.TRUE);
   xPresPropSet.setPropertyValue("IsFullScreen", new Boolean(true));
+
   xPresPropSet.setPropertyValue("IsFullScreen", Boolean.TRUE);
 
   xPresPropSet.setPropertyValue("Pause", new Integer(0));
 
   xPresPropSet.setPropertyValue("Pause", new Integer(0));
 
   xPresentation.start();
 
   xPresentation.start();
 +
</source>
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Drawing Documents and Presentation Documents]]
+
 
 +
[[Category:Documentation/Developer's Guide/Drawing Documents and Presentation Documents]]

Revision as of 02:44, 6 February 2010



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 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", Boolean.TRUE);
  xPresPropSet.setPropertyValue("IsFullScreen", Boolean.TRUE);
  xPresPropSet.setPropertyValue("Pause", new Integer(0));
  xPresentation.start();
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages