Impress uses an index system to determine the order that slides will be displayed. In LO and AOO indexes are integers starting with 0. Each Impress slide is assigned an index.
On the
Slide Pane, the number to the left of small slide preview reflects that index. The 1 displayed doesn't represent
Slide 1, it represents the first slide in the presentation. Insert a slide before the current slide, the index for that slide is incremented by 1 along with any other slides with indexes greater than the current slide. Now the newly inserted slide is the first slide and it displays 1.
Those numbers are inherent to the design of Impress and for that matter all the modules in LO and AOO.
If you hover the mouse pointer over the small preview, a slide name will be displayed. By default they are automatically given names Slide 1, Slide 2 etc. The name is somewhat arbitrary and can be assigned a value independent of the index.
If you select the menu
Slide>Properties (or right click on a slide preview and select
Properties) you will see the
Page Setup dialog.
Layout Settings displays some options for automatically naming the slides, but in my tests not all of them work.
If you select the menu
Slide>Rename Slide (or right click on a slide preview and select
Rename Slide) you can type in a new name for that slide, overriding the automatic name.
So it should be possible to rename the slides with a macro.
- Code: Select all Expand viewCollapse view
REM ***** BASIC *****
Sub SlideRenumber
Dim oDrawPages As Variant
Dim oObj1 As Variant
Dim nCount as Integer
Dim i as Integer
StartNum = 201
oDrawPages = ThisComponent.getDrawPages()
nCount = oDrawPages.getCount()
for i = 0 to nCount-1
' must put space in front of Slide to override default numbering
oDrawPages.getByIndex(i).setName(" Slide "+ (i+StartNum))
next i
End Sub
It should be stored with the Impress document not the global macro library. That way each document can have it's own StartNum value.
I did find some interesting behavior. If I used setName("Slide "+ (i+StartNum)) LO changed the names to the default numbering scheme, but when I inserted a space in front of Slide the macro renamed the slides.
To use the macro, each time
StartNum is changed, the macro must be
Complied before it is
Run.
Whenever a new slide is added, an existing slide moved or deleted the macro must be
Run so the names reflect the changes.