Page 1 of 1

[Solved] Loop through slides and set Transitions

Posted: Tue Jan 17, 2017 4:46 pm
by Migs351
I'm working on a Kiosk enabled RPi.

I'm trying to use the following method:

https://www.youtube.com/watch?v=HzBzC...

Using the macros found here:

https://bz.apache.org/ooo/show_bug.cg...

This should be sufficient to set the settings to do things to make the Kiosk loop through a presentation. But it's not working as I had hoped.

If there's no Transition between slides, it doesn't advance, regardless of Presentation.IsAutomatic(True). I am looking for a way to macro in looping through all slides and setting the transition for every slide as it opens the document, before it starts the presentation.

Also would be a nice thing to remove all Animations from all slides as well. To eliminate that possibility of pretty much all show stopping problems.

Are there methods that I can tap into that will allow me to set Transitions and remove animations on each slide?

Using LibreOffice on RPi, which yes, I know is different, but the BASIC should be fairly similar. :ucrazy:

Any help would be appreciated.

Re: Loop through slides and set Transitions

Posted: Tue Jan 17, 2017 7:37 pm
by Migs351
Actually I just figured this out on my own, as least for the Transitions part. Here's my code for the loop:

Code: Select all

Dim Doc as object
Dim CurSlide as object

Doc = ThisComponent

For i = 0 to Doc.getDrawPages().Count-1
  CurSlide = Doc.getDrawPages().getByIndex(i)
  Doc.CurrentController.setCurrentPage(CurSlide)
  CurSlide.Change = 1 // 0 = Click to Proceed, 1 = Automatic, 2 = Play objects automatically, but still need click? 
  CurSlide.Duration = 15  // Time in seconds
Next i

// Return to first Slide before starting
CurSlide = Doc.getDrawPages().getByIndex(0)
Doc.CurrentController.setCurrentPage(CurSlide)
Now all I need to do is add into that same loop a second loop to cycle through each object and remove the animation. Shouldn't be difficult knowing I can access the properties this way now.

Re: [Solved] Loop through slides and set Transitions

Posted: Thu Nov 09, 2017 5:14 pm
by ThiemoCh
If I do as you described in your script, my presentation Loops exactly one time through all slides, but halts at the end and does not jump back to slide one to start again.
Even with a 2nd Loop.
Somehow .setCurrentPage(CurSlide) seems not to work the way intended in the end of your script.
I'm lost, I tried a lot of different Things already, but non seems to help me start looping the presentation from start again.
Any Idea, Any Help?

Cheers,

Thiemo.