Bug 159693 - Fail to set cross-reference to text or to input field
Summary: Fail to set cross-reference to text or to input field
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-12 14:00 UTC by Alberto
Modified: 2024-02-22 12:12 UTC (History)
0 users

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 Alberto 2024-02-12 14:00:53 UTC
Description:
If I select some text and set cross-reference to this, the reference appair to the right of the text

Steps to Reproduce:
1. write "foo"
2. select the text (or ctrl-A)
3. Insert -> cross-reference -> Set-reference -> name: reference -> Insert
4. the reference "reference" appair to the right of "foo" with the content "foo"
5. I see "foofoo"

Actual Results:
I see "foofoo"

Expected Results:
"foo" with reference to it


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 4; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: it-CH (it_IT.UTF-8); UI: en-US
Calc: threaded
Comment 1 Mike Kaganski 2024-02-12 14:29:22 UTC
What is "reference" in your wording? In Writer's terminology, the "reference" is a field (an own text object), that displays some information (content, or number, or a page number) of the piece it refers to. Thus, a reference can't be referring to itself - if it were, there would be e.g. not possible to make its content equal to its content (circular dependency).

This is not a bug.
Comment 2 Alberto 2024-02-12 15:36:11 UTC
(In reply to Mike Kaganski from comment #1)
> What is "reference" in your wording? In Writer's terminology, the
> "reference" is a field (an own text object), that displays some information
> (content, or number, or a page number) of the piece it refers to. Thus, a
> reference can't be referring to itself - if it were, there would be e.g. not
> possible to make its content equal to its content (circular dependency).
> 
> This is not a bug.

I want to cross-reference a text, to do this I need to insert a cross reference with command: Insert -> cross-reference -> Set-reference -> name: reference -> Insert
My reference is view as a gray field around the selected text.
In another part of my document I can insert the field with command: Insert -> cross-reference -> Insert-reference -> "ref name" Refer using: Referenced text
and I visualize the referenced text (or other).
up to the version:
Version: 7.5.4.1 (X86_64) / LibreOffice Community
Build ID: 50(Build:1)
the result is good.
So I think that is a bug of LO 7.6.2.1.
Thanks
Comment 3 Alberto 2024-02-21 08:20:48 UTC
I want to cross-reference a text, to do this I need to insert a cross reference with command: Insert -> cross-reference -> Set-reference -> name: reference -> Insert
My reference is view as a gray field around the selected text.
In another part of my document I can insert the field with command: Insert -> cross-reference -> Insert-reference -> "ref name" Refer using: Referenced text
and I visualize the referenced text (or other).
up to the version:
Version: 7.5.4.1 (X86_64) / LibreOffice Community
Build ID: 50(Build:1)
the result is good.
So I think that is a bug of LO 7.6.2.1.
Thanks
Comment 4 Alberto 2024-02-22 09:01:08 UTC
The problem is also present in LO 7.6.2.1 Windows version
Comment 5 Alberto 2024-02-22 12:12:59 UTC
If I want to set a reference to a input field, in order to repeat its content in another point of the document, the operation of "cross-reference->set reference", put the reference next to the input field and not "over" the field.

Step to Reproduce:
1 - Insert->Field->More Field->Function->Input Field Reference: My_name->Insert
2 - In the open windows write: John ->OK
4 - Close "Field window"
5 - At the cursor point appair "John" with gray background
6 - Double click on "john" to change the name
7 - Now i want to repeat the field content in another point of the document, so I want set a cross-reference "around" the input field
8 - Click at the left of the input field, in order to have the cursor at the left of the field but before the field
9 - shift+right arrow so the field is highlighted
10 - Insert->Cross-reference->set reference: Name=test_ref ->Insert
11 - The reference is set next to the field and not "with" the field, so on the document I read "JohnJohn" and the reference It does not include the the single content of the input field. If I change the field content from "John" to "Mary", the "external" reference say still "John".

Version: 7.5.4.1 (X86_64) / LibreOffice Community
Build ID: 50(Build:1)
the result is good.
The bug is present on both windows and linux
Thanks