Bug 163862 - Impress does not save slide name if it starts with a string matching the default slide naming pattern
Summary: Impress does not save slide name if it starts with a string matching the defa...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Slide-Page-Pane
  Show dependency treegraph
 
Reported: 2024-11-12 13:53 UTC by Frédéric Bisson
Modified: 2024-12-02 19:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bug in action (890.20 KB, video/webm)
2024-11-12 14:11 UTC, Frédéric Bisson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Bisson 2024-11-12 13:53:30 UTC
Description:
Impress does not save slide name if it starts with a string matching the default slide naming pattern. For example, if LibreOffice is configured for french users, the default slide naming pattern looks like "Diapo {slide number}". If you try and rename the slide to a name starting with this pattern, LibreOffice Impress does not save the presentation with the name you entered but with the default slide name.

Steps to Reproduce:
1. Create a new presentation, the one and only slide is named "Diapo 1"
2. Change the slide name (using the contextual menu on the slide thumbnail) to "Diapo 3, this is a test"
3. Save the file
4. Close LibreOffice Impress
5. Open the presentation

Actual Results:
The slide is named "Diapo 1"

Expected Results:
The slide should be named "Diapo 3, this is a test"


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Frédéric Bisson 2024-11-12 14:11:48 UTC
Created attachment 197565 [details]
Bug in action
Comment 2 mkt 2024-11-27 23:22:51 UTC
Hi,

This is reproducible in version below
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

I am not sure if it is considered a bug but it is indeed inconvenient if a user would like to name a slide at their will.

I have updated the status to NEW and LO may exam this.
Comment 3 Buovjaga 2024-11-28 20:42:59 UTC
We see that if we type "Slide 3 blabla", the input field turns red and the OK button is disabled. It seems that for some reason the slide name should not under any circumstances start with the word Slide, followed by a whitespace and any number of digits. However, the function checking for this does not account for numbers that are followed by punctuation characters.

DrawDocShell::IsNewPageNameValid in sd/source/ui/docshell/docshel2.cxx is the function doing the checking for valid input.

The function was added in 2002 in commit 94d26c0680447cf22bdeffca9ba8134b2927954f

Probably this can be turned into an easy hack, if it is confirmed that punctuation chars should result in invalid page name check.