Autoclosing OOo after presentation

Discuss the presentation application

Autoclosing OOo after presentation

Postby revelator_online » Sat Mar 28, 2009 2:34 pm

is there a possibility to close automatic close oo after the last slide of a presentation without showing the automatik shows black slide. i really need this feature so that i can automaticly play mplayer movies after the presentation.
oo should bee a part of an automatic presentation system which shows slides and videos an a ad screen in a business
i know that you can have a macro closing oo but can this macro automaticly been started at the last slide.

i hope someone can help me
OOo 3.0.X on Ubuntu 8.x
Posts: 1
Joined: Fri Mar 27, 2009 5:57 pm

Re: Autoclosing OO after presentation

Postby acknak » Sat Mar 28, 2009 5:43 pm

I'm pretty sure I've seen some macro program code posted (maybe over on oooforum) to do this. You'll have to poke around for it yourself, unless someone else can give you a tip.
AOO4/LO5 • Linux • Fedora 23
User avatar
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Autoclosing OO after presentation

Postby FJCC » Sun Mar 29, 2009 8:04 pm

I happened to be looking at a similar problem for a different post. Here is some code that ends the slide show and closes the document after the next to last slide. I chose the next to last slide because the screen would still go black if I used the last slide of the presentation as the trigger to end the show and close the document. I inserted a blank slide at the end that made the closing process much smoother visually. How well that works probably depends on the composition of your slides, particularly what the background is. The macro also starts the presentation.

 Edit: I added a line using the BlankScreen method. This allows inserting a blank screen with adjustable color just before ending the presentation. This may improve the visual flow, depending on what follows. 

Code: Select all   Expand viewCollapse view
Private Trigger as Boolean
Sub Main
Dim Doc, Present, Control
Doc = ThisComponent
Doc.CurrentController.Frame.ContainerWindow.Visible = False
Trigger = False
Present = Doc.Presentation
oListener = createUnoListener("Show_","")
Control = Present.Controller
While not Trigger
   Wait 500
End Sub

Sub Show_slideTransitionStarted
End Sub

Sub Show_slideTransitionEnded
End Sub

Sub Show_slideEnded
Dim Document, Presentation, oControl
Document = ThisComponent
Presentation = Document.Presentation
oControl = Presentation.Controller
If oControl.CurrentSlideIndex = oControl.SlideCount - 2 Then  'Sets Trigger true after the next to last slide. Index of 1st slide = 0 
   Trigger = True
End If

End Sub

Sub Show_disposing
End Sub

Sub Show_Paused
End Sub

Sub Show_Resumed
End Sub

Sub Show_slideAnimationsEnded
End Sub

Sub Show_hyperLinkClicked
End Sub
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Posts: 8058
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Return to Impress

Who is online

Users browsing this forum: No registered users and 4 guests