Bug 159942 - Bookmark reference using "Article A/Az + Chapter" reverts to just "Chapter"
Summary: Bookmark reference using "Article A/Az + Chapter" reverts to just "Chapter"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Cross-reference-dialog
  Show dependency treegraph
 
Reported: 2024-02-28 16:17 UTC by Peter Gervai
Modified: 2024-06-21 10:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Document for reproducing the bug (11.46 KB, application/vnd.oasis.opendocument.text)
2024-06-21 10:03 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gervai 2024-02-28 16:17:29 UTC
Description:
Interestingly definitive article versions aren't even in the Help, but at least in Hungarian it works like I have "usual" refers then each of them have a definitive article pair like "Article A/Az + Chapter".

However these, while selectable, do not get saved, and they jump back to article-less version. This is bad (the UI shows different state than what's saved, which is very confusing), and of course it makes impossible to use these within a master document (where it refers to a bookmark in a different document part).

This probably always have worked this way, but I thought I'm crazy (tried to set it and jumped back) and haven't used master docs too often. 

Steps to Reproduce:
1.Use Hungarian as document language: Tools » Options » Language » Formats: Locale setting: Hungarian
2.Insert » Cross reference » Bookmarks
3.Choose "Article a/az + Chapter", Name: "something elsewhere", Insert. Close.
4.Double-click on it again and realise that it's set to "Chapter"

Actual Results:
Cannot save articled version. Cannot use it in master documents.

Expected Results:
Would work.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
(Sidenote: this interface is pretty "broken" anyway: when one enter the name (as a non-exitant string, in step 3) and accidentally unfocus the window the string will disapper, and has to be re-typed. It's pretty annoying with mouse-follow-focus and accidental mouse movement.)
Comment 1 Peter Gervai 2024-02-28 16:19:54 UTC
It seems I cannot write clean English, sorry.
So this happens when the cross reference refers to a bookmark (name) outside the current document part (of a master document, but it can be tested in normal document, too).
Comment 2 Peter Gervai 2024-02-28 16:46:44 UTC
Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: 420(Build:3)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: hu-HU (en_US.UTF8); UI: en-US
Debian package version: 4:24.2.0-1
Calc: threaded
Comment 3 Dieter 2024-04-07 10:36:15 UTC
Peter, thank ypu for reporting the problem. I'm niot sure, if I understand everything.

My steps:
1. Open a new document, write some words and insert a bookmark.
2. Save and close document
3. Open a second document -> Insert -> Hyperlink -> first document -> select bookmark as target

Actual and expected result:
First docume is opened with focus on bookmark

Cross-references need a target within the actual document. so if you want so insert a link to a bookmark in an external document, you have to insert a hyperlink.

Does this solve your problem?

=> NEEDINFO
Comment 4 Eyal Rozenberg 2024-06-21 10:03:47 UTC
Created attachment 194878 [details]
Document for reproducing the bug

I believe I can clarify and reproduce the reported bug.

Reproduction instructions:

1. On the menus, navigate to Tools > Options... > Languages and Locales > General
2. Set "Locale Settings" to "Hungarian"
3. Open the attached document
4. On the menu, select Insert > Cross Reference...
5. In the xref dialog, choose a "Type" value of "Bookmark"
6. In the xref dialog, choose a "Refer Using" value of "Article A/Az + Chapter" (this is a Hungarian-specific option)
7. Insert the cross-reference.
8. Right-click the cross-reference and choose "Edit Field..." on the context menu

Expected Result:
The "Refer Using" selection in the xref dialog is "Article A/Az + Chapter".

Actual Result:
The "Refer Using" selection in the xref dialog is "Chapter"
Comment 5 Eyal Rozenberg 2024-06-21 10:05:07 UTC
Seeing this with:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 92815f3a464b447898ecf52492247335228e4a72
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: hu-HU (en_IL); UI: en-US

I'm not sure if the problem is with the xref itself, or just the dialog.