Bug 164226 - Underscores stripped from bookmark display on right click over page number box
Summary: Underscores stripped from bookmark display on right click over page number box
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:25.8.0 target:25.2.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Bookmarks
  Show dependency treegraph
 
Reported: 2024-12-07 02:36 UTC by MarkLDE
Modified: 2025-05-22 21:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
testfile (9.19 KB, application/vnd.oasis.opendocument.text)
2025-05-06 16:51 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarkLDE 2024-12-07 02:36:30 UTC
Description:
Just migrated to LibreOffice version 7.4.7.2 running on a brand new Linux box, Debian version 4:7.4.7-1+deb12u5/

LO Writer. Long document created on my prior machine... it contains lots of bookmarks, most of which contain underscores.

By default, Writer displays, e.g., "Page 17 of 45" at the bottom left of the window. Right clicking thereon displays the bookmarks in their order within the document.

However, in this new version, the bookmarks are displayed with underscores stripped out.

Fortunately, in Insert>Bookmark and in the Navigator (F5), the underscores are there, and they also appear in fields that reference them. So the data seems fine.

The bug is in the display from right clicking on the page number box.

Steps to Reproduce:
1. Create a document and insert a bookmark that includes an underscore, e.g., "BM_one"
2. RIGHT Click on the page number box at the bottom left of the screen.


Actual Results:
The bookmark is displayed as "BMone" (with the underscore stripped out.

Expected Results:
It should be displayed as "BM_one" (with its underscore)


Reproducible: Always


User Profile Reset: Yes

Additional Info:
The underscore appears in the Bookmark dialog (Insert>Bookmark), and in the Navigation window, F5. 

If you create a field that references the bookmark, and then display the field, it will include the underscore.
Comment 1 Dieter 2024-12-23 22:41:27 UTC
Thank you for reporting the bug, but you use an old version of LO. Could you please retest with LO 24.8? Thank you
=> NEEDINFO
Comment 2 MarkLDE 2025-04-10 18:55:19 UTC
Thanks for your reply, Dieter. Sorry for my delayed response.

I have just now installed LibreOffice 25.2.2.2 (X86_64)

Unfortunately, the bug persists, exactly as I described it before.
Comment 3 Dieter 2025-05-06 16:51:27 UTC
Created attachment 200675 [details]
testfile

Tested with attached file, but couldn't reproduce with

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 444f2f7d331464d9628b11f409a513b0458c5bae
CPU threads: 12; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Comment 4 Dieter 2025-05-06 16:53:35 UTC
So perhaps only a problem with Linux
Comment 5 raal 2025-05-21 15:47:47 UTC
Confirm with Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5c74b979eac620dc1a435fcdf9e88488fd4217d9
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Correct in Version: 6.3.0.0.alpha1+, regression
Comment 6 raal 2025-05-21 15:54:31 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.2.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks
 4306e31be5149c23506b71cb4672666c7721a778 is the first bad commit
commit 4306e31be5149c23506b71cb4672666c7721a778
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Feb 23 10:40:23 2021 +0100

    source 2e7fe9f0048f5afb957278e87106a81ba818dd8a

111360: replace BookmarkPopup_Impl | https://gerrit.libreoffice.org/c/core/+/111360
Comment 7 Caolán McNamara 2025-05-22 11:43:10 UTC
Ah, I think gtk has taken the _ to use a mnemonic markup.
Comment 8 Commit Notification 2025-05-22 20:43:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3d4fe20029f101538895ba3d6f5abf6a3d014560

Resolves: tdf#164226 escape mnemonic's in menu entries

It will be available in 25.8.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 9 Caolán McNamara 2025-05-22 20:44:42 UTC
done in trunk, backport to 25.2 in gerrit
Comment 10 Commit Notification 2025-05-22 21:40:43 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/3772101c2c87e6ccf183d7e4aa0aede84f6d0b6c

Resolves: tdf#164226 escape mnemonic's in menu entries

It will be available in 25.2.5.

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.