Description: When working with a document that contains cross-references to figure numbers, deleting the figures does not result in the references showing the "Error: Reference source not found" text. Instead, the field shows the old number. Using "Update Fields" or pressing F9 does not update them. Steps to Reproduce: 1. Create a blank Writer document. 2. Insert 4 images. 3. Configure each image to be positioned as a character. 4. Add a caption to each image, which also adds a figure number field to each one. 5. At the top of the document use the Insert>Cross-reference tool to insert references to the figure numbers. This simple example just looks like "1 2 3 4" where each number is a field. 6. Pick an image at random and delete it. While the figure numbering for the remaining figures does update, the number for the one I deleted remains the same. So, if I delete figure 2 from the document, the cross references now look like "1 2 2 3". We *know* that the second reference is wrong, and clicking on it goes no where, but it is not updated to show the "Error: Reference source not found" message. 7. Clicking F9 or using the menu to "Update Fields" does not work. Saving the document and opening it again seems to update the fields. Sometimes clicking View>"Show Tracked Changes" is enough to update the missing field, but this doesn't always work. Actual Results: The field text for a deleted field target retains the old value. Expected Results: The field text for a deleted field target should always show the "Error: Reference source not found" message. Reproducible: Always User Profile Reset: No Additional Info: Please fix. This makes working on large documents with lots of cross references to figures particularly painful.
To clarify, when I say "delete the image" I mean delete the frame that contains the image, the caption, and the field.
I confirm it with Version: 7.2.3.1 (x64) / LibreOffice Community Build ID: 1d5dee817bde88d78dbcc0d00f88492568e131d5 CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL Additional observation: Typing text into caption also changes cross-reference
Created attachment 185975 [details] test file for demonstrating problem Repro with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ee5dbd193fa24b46fb980ddd8a6c39ca349d0d01 CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: da-DK (da_DK); UI: en-US Calc: CL threaded The problem in summary is: 1. If a number range variable field is deleted, then a cross-reference variable to that field will show (as expected) "Error: Reference source not found". 2. If the number range variable field is INSIDE A FRAME, and the frame is deleted, then (unexpected) the cross-reference variable is not updated, when it is expected that it will show "Error: Reference source not found". Attached document provides a simple test/illustration of this behavior.
Still repro with file. Already in 3.5.0. Arch Linux 64-bit Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 960db01dbfe2f916b91782da03532fae1f836445 CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded Built on 29 December 2024