Bug 139253 - CROSS REFERENCE: Undo "insert section" corrupts all cross references, if anchor was in section.
Summary: CROSS REFERENCE: Undo "insert section" corrupts all cross references, if anch...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo Section Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2020-12-27 10:33 UTC by DarkTrick
Modified: 2024-09-17 16:07 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 DarkTrick 2020-12-27 10:33:23 UTC
Summary
=======
If you put an "anchor element" (something, that you can cross reference) inside a section (mark->insert section) and then revert the action of inserting a section, all references to that anchor will become invalid.


Reproduce
==========

1. Create a numbered element (e.g. a numbered list)
2. Create a cross reference to that numbered element
3. Select everything and execute `Insert`-> `Section...` -> `Ok`
4. (Everything gets put in a section)
5. Press Ctrl+Z to revert the inserted section
6. Mark everything and press F9 to refresh all references
7. ACTUAL: The references became invalid
7. EXPECTED: References don't change / don't become invalid

The actual result is irreversible. All references are marked as "Error. Reference source not found". It's impossible to easily restore references except, if an older version of the document exists.
Comment 1 DarkTrick 2020-12-27 10:35:36 UTC
Example video:
https://www.youtube.com/watch?v=YoJ68hAFNuQ
Comment 2 Dieter 2021-01-12 07:12:16 UTC
I confirm it with

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

After step 5 content of cross reference gets lost
Comment 3 QA Administrators 2023-01-13 03:20:45 UTC Comment hidden (obsolete)
Comment 4 Dieter 2023-01-25 18:49:19 UTC
Still present in

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Comment 5 Buovjaga 2024-09-17 16:07:05 UTC
Still repro. Already in 3.5.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 45399721e1497bc9731eacc1b001335ef4314579
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 17 September 2024