ExpandAnimations icon indicating copy to clipboard operation
ExpandAnimations copied to clipboard

"Slide Count" field is arbitrarily added while exporting

Open ebobferraris opened this issue 4 years ago • 5 comments

Using a Master with the only "Slide Number" field, exported pdf contains "Slide Number / Slide Count" (see screenshot). Is it an intended behavior? Is it possible to disable? Screenshot from 2020-10-09 23-48-26

ebobferraris avatar Oct 09 '20 21:10 ebobferraris

thanks for the feedback, it is not possible to disable this.

monperrus avatar Oct 10 '20 06:10 monperrus

Same here. Would prefer if it wasn't there and showed just my original slide number N times, same as if I was in presentation mode.

sagitta42 avatar Oct 06 '22 17:10 sagitta42

This improved my situation: I edited the source code (Tools->Macros->Edit Macro) to comment out lines 140-142

'if slide.IsPageNumberVisible then
        'fixateSlideNumber(doc, slide, i+1, numSlides)
'end if

Now the style is correct (but the number is not).

Sbozzolo avatar Apr 07 '23 18:04 Sbozzolo

This improved my situation: I edited the source code (Tools->Macros->Edit Macro) to comment out lines 140-142

'if slide.IsPageNumberVisible then
        'fixateSlideNumber(doc, slide, i+1, numSlides)
'end if

Now the style is correct (but the number is not).

Alternatively, you can change the style manually in the fixateSlideNumber function. I did so like this:

if shapeType = "com.sun.star.presentation.SlideNumberShape" then
            copy = doc.createInstance("com.sun.star.drawing.TextShape")
            'Call Tools.WritedbgInfo(shape)
            slide.IsPageNumberVisible = False
            slide.add(copy)
            copy.setString(CStr(slideNr)) '& " / " & CStr(slideCount))
            copy.Style = shape.Style
            copy.Text.Style = shape.Text.Style
            copy.Text.CharHeight = shape.Text.CharHeight
            copy.Text.CharFontFamily = shape.Text.CharFontFamily
            'copy.Text.CharFontName = shape.Text.CharFontName
            copy.Text.CharFontName = "Arial"
            'copy.Text.CharColor = shape.Text.CharColor
            copy.Text.CharColor = RGB(255, 255, 255)
            copy.Position = shape.Position
            copy.Size = shape.Size
            copy.TextVerticalAdjust = shape.TextVerticalAdjust
            copy.TextHorizontalAdjust = com.sun.star.drawing.TextHorizontalAdjust.CENTER
        end if

For some reason, it didn't really get the styles of the master file page number correctly - so I just hardcoded it in there. Now it works for me (position is still slightly lower, but I don't care at this point).

NeverGameStar avatar Feb 15 '24 22:02 NeverGameStar

Of this is not optimal. But I just changed numSlides in line 140 to the correct number manually.

tomtom1-4 avatar Sep 02 '24 07:09 tomtom1-4