help me to make a macro (if possible)

Creating a macro - Writing a Script - Using the API

help me to make a macro (if possible)

Postby tanoatoo » Wed Apr 23, 2008 10:25 pm

Hello,
I use openoffice impress to reproduce power point presentations.
I see that openoffice has the strange issue to insert a pause
of ten seconds when the slideshows finish and has to restart,
(a bug?), and I would like to know how to set up a macro to
delete this pause.
I found a property on openoffice docs at:

http://wiki.services.openoffice.org/wik ... sentations

named Pause(long), described as:

the amount of time that a blank screen is displayed at the end of the presentation

and I would like to set up it as zero always, to workaround this
issue.
How to do?
tanoatoo
 
Posts: 11
Joined: Mon Apr 21, 2008 5:46 pm

Re: help me to make a macro (if possible)

Postby Villeroy » Wed Apr 23, 2008 11:34 pm

Tools>Macros>Organize...<your presentation>, any_library, any_module.
Code: Select all   Expand viewCollapse view
Sub on_Open_Create()
ThisComponent.Presentation.Pause = 0
End Sub

Tools>Customize...tab:Events
Save in: <your presentation>
<Open Document> ,[Macro...] <your presentation>, any_library, any_module, on_Open_Create
<Create Document> ,[Macro...] <your presentation>, any_library, any_module, on_Open_Create
The latter event is triggered when this document gets loaded as template.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25764
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: help me to make a macro (if possible)

Postby tanoatoo » Thu Apr 24, 2008 11:30 am

> Tools>Customize...tab:Events
> Save in: <your presentation>

Does it work when loading any .pps, .ppt or .odp file?
tanoatoo
 
Posts: 11
Joined: Mon Apr 21, 2008 5:46 pm

Re: help me to make a macro (if possible)

Postby tanoatoo » Thu Apr 24, 2008 11:39 am

Excuse me, perhaps I need to clarify.
I do not have Oo at hand, however I would like to know if this solution has to be
attached to every file or if it is an application setup, so that it works
for all presentations loaded (and not modified) in Oo.org.
tanoatoo
 
Posts: 11
Joined: Mon Apr 21, 2008 5:46 pm

Re: help me to make a macro (if possible)

Postby Villeroy » Thu Apr 24, 2008 12:43 pm

I suggest to store the macro within your (default-) template(s) where this setting is required. So it works on every system where the presentation is shown.
You can have the same for every presentation you open on this system when you install the macro in container "My Macros" together with the following switch:
Code: Select all   Expand viewCollapse view
Sub on_Document_Open_Create()
   If ThisComponent.supportsService("com.sun.star.presentation.PresentationDocument") then

thisComponent.Presentation.Pause = 0
REM same for other components. Add your stuff here:

   ElseIf ThisComponent.supportsService("com.sun.star.sheet.SpreadsheetDocument")then
      REM GlobalScope.BasicLibraries.LoadLibrary("Calc")
   elseif ThisComponent.supportsService("com.sun.star.text.TextDocument")then
      REM GlobalScope.BasicLibraries.LoadLibrary("Writer")
   elseif ThisComponent.supportsService("com.sun.star.drawing.DrawingDocument") then
   endif
End Sub

Menu:Tools>Customize... Tab:Events
Save in: "OpenOffice.org"
Events: <Create Document> and <Open Document>

Now this is called for all documents and you may add your own procedure calls to the switch.
In this very simple case it should not matter when you change the setting twice, on application level and from the template/document again.
Last edited by Villeroy on Thu Apr 24, 2008 1:25 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25764
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: help me to make a macro (if possible)

Postby tanoatoo » Thu Apr 24, 2008 1:19 pm

Great thanks, now I will try!!
tanoatoo
 
Posts: 11
Joined: Mon Apr 21, 2008 5:46 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests