Bug 154437 - Draw rename still uses "Slide" instead of "Page"
Summary: Draw rename still uses "Slide" instead of "Page"
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Baole Fang
URL:
Whiteboard: target:7.6.0
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2023-03-29 03:13 UTC by Baole Fang
Modified: 2023-04-14 20:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baole Fang 2023-03-29 03:13:10 UTC
Description:
In Draw, when we want to rename a page, it shouldn't be renamed to future pages because they will be used later as a default. However, the implementation uses old name "Slide" instead of "Page" when trying to account for this behavior.

Steps to Reproduce:
1.Open Draw
2.Rename the current page to "Slide 2" or any "Slide x" where x is a positive integer
3.Rename the current page to "Page 2"
4.Add a page

Actual Results:
Rename is prohibitted for "Slide 2"
Rename is allowd for "Page 2"
A new page is added with duplicate name "Page 2"

Expected Results:
Rename should be valid for "Slide 2"
Rename should be prohibitted for "Page 2"
A new page should be added with name "Page 2", which should be unique


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.2
Calc: threaded
Comment 1 Redirek 2023-04-02 02:56:21 UTC Comment hidden (spam)
Comment 2 Redirek 2023-04-02 02:59:09 UTC Comment hidden (spam)
Comment 3 Commit Notification 2023-04-07 14:31:20 UTC
Baole Fang committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/04bf1d2385ed80e7aee8015dc69e868c2abe4142

tdf#154437: Check "Page" instead of "Slide" in Draw rename

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 BogdanB 2023-04-13 05:06:34 UTC
This bug as reported is fixed.
But one side effect, I can NOT rename the first Page from "Slide 2" to "Page 1", even this name is not used, because there is just a "Page 2" reserved.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 127eacf630e1712fd5addcabed404b2d33752311
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 5 BogdanB 2023-04-13 05:08:07 UTC
(In reply to BogdanB from comment #4)
> This bug as reported is fixed.
> But one side effect, I can NOT rename the first Page from "Slide 2" to "Page
> 1", even this name is not used, because there is just a "Page 2" reserved.
> 
> Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 127eacf630e1712fd5addcabed404b2d33752311
> CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
> Locale: ro-RO (ro_RO.UTF-8); UI: en-US
> Calc: threaded

But, also, I can rename it "Page 1a", and this works.
Comment 6 Baole Fang 2023-04-14 20:28:57 UTC
Hi, I think this fix should be used together with
Comment 7 Baole Fang 2023-04-14 20:39:34 UTC
Hi, this fix should be used together with the other fix:
https://bugs.documentfoundation.org/show_bug.cgi?id=150477#c20

In the other fix, I fixed Draw's "Slide" to "Page", so "Page #", where # represents an integer, is perseved for Draw.

Similar behavior can be observed in Impress. When we create an Impress document with two slides, the default name for the first slide is "Slide 1" and the second slide is "Slide 2". If you change the first slide's name to a random name, such as "abc", you still cannot change the name of the second slide to "Slide 1". This is because "Slide #" is perseved.

The reason that you can change it to "Page 1a" is that "Page 1a" is not perserved.

We can discuss whether we should allow users to change a later slide's name to a previous slide's default name if the previous slide has been renamed, but this isn't the focus of this fix.