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
Autoclosing OOo after presentation
-
- Posts: 1
- Joined: Fri Mar 27, 2009 5:57 pm
Autoclosing OOo after presentation
OOo 3.0.X on Ubuntu 8.x
Re: Autoclosing OO after presentation
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
Re: Autoclosing OO after presentation
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
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_","com.sun.star.presentation.XSlideShowListener")
Present.Start
Control = Present.Controller
Control.addSlideShowListener(oListener)
While not Trigger
Wait 500
Wend
Present.End
Doc.Close(False)
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
oControl.BlankScreen(RGB(255,255,255))
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
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.