Ask Your Question
0

Impress Macro in full screen

asked 2020-09-25 01:46:23 +0100

Hegz gravatar image

updated 2020-09-25 01:47:16 +0100

I'm having an issue with getting impress macros to work in full screen, and I'm at my wits end

The issue is that when the line oPresentation.IsFullScreen = false

is changed to true, I get no output in my file. msgbox or print statements will also not work with IsFullScreen = true, but both work with IsFullScreen = false

I am working my way to a kludge to detect the end of a presentation, and terminate LibreOffice. This would be for the ultimate aim of playing multiple slide shows back to back for digital signage.

Any help would be greatly appreciated.

Full non functional macro is below:

REM  *****  BASIC  *****
Option Explicit

Global oDoc As Object
Global oPresentation As Object
Global oController As Object    
Global oListener As Object

Sub Main
    addlistener
End Sub

Sub EV_paused(oEv)
End Sub

Sub EV_resumed(oEv)
End Sub

Sub EV_slideTransitionStarted(oEv)
rem print "Hello This is working now, but not in full screen?"
    open "/home/ubuntu/Hellotext.txt" for append as #1
    print #1, "this is the slide transition"
    close #1
End Sub

Sub EV_slideTransitionEnded(oEv)
End Sub

Sub EV_slideAnimationEnded(oEv)
End Sub

Sub EV_slideEnded(oEv)
End Sub

Sub EV_hyperLinkClicked(oEv)
End Sub

Sub EV_disposing(oEv)
End Sub                  

Sub addListener

    oDoc = ThisComponent 
    oPresentation = oDoc.Presentation
    rem com.sun.star.presentation.Presentation

    oPresentation.CustomShow = ""
    oPresentation.IsShowAll = True
    oPresentation.IsEndless = False
    oPresentation.IsFullScreen = false

    oListener = createUnoListener("EV_","com.sun.star.presentation.XSlideShowListener")
    rem com.sun.star.presentation.XSlideShowListener

    rem msgbox "start"
    oPresentation.Start()

    oController = oPresentation.Controller
    rem com.sun.star.presentation.XSlideShowController

    wait 100
    rem msgbox oController.dbg_properties
    oController.addSlideShowListener(oListener)
    open "/home/ubuntu/Hellotext.txt" for append as #1
    print #1, "this is after the listener is added"
    close #1
end sub
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-09-25 18:57:31 +0100

Hegz gravatar image

Looks like i was able to solve this, by adding a wait 100 right after the presentation start. Events are firing and everything is happy.

    rem msgbox "start"
    oPresentation.Start()
+   wait 100

    oController = oPresentation.Controller
    rem com.sun.star.presentation.XSlideShowController

    wait 100
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-09-25 01:46:23 +0100

Seen: 20 times

Last updated: Sep 25