Bug 157489 - cross-reference: "Set reference" inserts selected text (again) instead of just setting a reference; not working with table cells
Summary: cross-reference: "Set reference" inserts selected text (again) instead of jus...
Status: RESOLVED DUPLICATE of bug 157394
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-28 12:28 UTC by thdeppner
Modified: 2023-10-06 13:32 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 thdeppner 2023-09-28 12:28:40 UTC
Description:
When setting a cross-reference via "Insert - Cross-reference - Set Reference - Insert" (-> https://help.libreoffice.org/7.6/en-US/text/swriter/guide/references.html) the selected text will not - as it used to - just get "marked" as a referenced text (grey highlighting) but the text will be inserted again next to the originally marked text.

While only being "annoying" for simple text, this makes referencing tabel cells that contain a formula (-> https://help.libreoffice.org/7.6/en-US/text/swriter/guide/calculate_intable.html) or any reference to another table cell impossible.

Steps to Reproduce:
1. Select text in LO Document
2. Set cross-reference via "Insert - Cross-reference - Set Reference - Insert"

Actual Results:
Marked text gets inserted again, highlighted as reference.

Expected Results:
Marked text just gets highlighted as cross-reference


Reproducible: Always


User Profile Reset: No

Additional Info:
n/a
Comment 1 m_a_riosv 2023-09-30 01:29:57 UTC

*** This bug has been marked as a duplicate of bug 155418 ***
Comment 2 Matti Tyrväinen 2023-10-02 08:39:15 UTC
My apologies, I wasn't aware of this use case! Could you please add complete steps to reproduce for "referencing table cells that contain a formula" to bug 155418? Calculating "intable" seems to work on 7.6.0.3 - I'm guessing you're doing something else that involves cross-references inside the table?
Comment 3 Buovjaga 2023-10-06 13:03:53 UTC

*** This bug has been marked as a duplicate of bug 157394 ***
Comment 4 thdeppner 2023-10-06 13:32:22 UTC
(In reply to Matti Tyrväinen from comment #2)
> My apologies, I wasn't aware of this use case! Could you please add complete
> steps to reproduce for "referencing table cells that contain a formula" to
> bug 155418? Calculating "intable" seems to work on 7.6.0.3 - I'm guessing
> you're doing something else that involves cross-references inside the table?

Sure:
1. Create a table containing 1 row and 3 cells.
2. Enter the value "1" into cells A1 and A2.
3. Enter the formula "=<A1:A2>" into cell A3; cell A3 should now display the value "2".
4. Mark the value "2" in cell A3 and try to set a reference to it.

This used to work, now you get a second "2" added to the cell and the formula is gone.

The reference is useful if you want to reference to the value of the table cell in the text (not: in the cell of the table or even another table; this works without reference by adressing the cell via [tablename].[cell]).

In my case I use the table to calculate a sum for an invoice which I reference in the text ("Please pay [reference to calculated amount]...")