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)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Undo-Redo Section Fields-Cross-Reference
  Show dependency treegraph
Reported: 2020-12-27 10:33 UTC by DarkTrick
Modified: 2021-01-12 07:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


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
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.


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:
Comment 2 Dieter 2021-01-12 07:12:16 UTC
I confirm it with

Version: (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