Bug 152124 - Figure captions for custom captions disappear after reopening the document
Summary: Figure captions for custom captions disappear after reopening the document
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-19 11:11 UTC by nf_mail
Modified: 2023-05-22 17:14 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example ODT with two captioned images (35.12 KB, application/vnd.oasis.opendocument.text)
2022-11-22 09:14 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nf_mail 2022-11-19 11:11:12 UTC
Description:
Custom figure captions disappear after saving, close and reopening the document. Please see the section "steps to reproduce".

Steps to Reproduce:
1. Add a figure to libreoffice
2. Add a caption to this figure, but use a custom-name, like "Bildbeschreibung".
3. If you add a second figure, the new figure will be also labeled with the new custom-name label and the automatic figure counter is set to "2".
4. save and close the document
5. reopen the document (both figures are correctly labeled as "Bildbeschreibung 1" and "Bildbeschreibung 2"
6. add a new figure and try to add the custom-caption. 
7. See that the custom label disappeared into the checkbox where you can add labels
8. If you try to add again your custom-label like "Bildbeschreibung", this works, but the figure is not labeled to "Bildbeschreibung 3" but to "Bildbeschreibung 1". Now, there are two "Bildbeschreibung 1"-labeled figures in your document.

Actual Results:
see steps to reproduce

Expected Results:
custom figure labels do not disappear when closing and reopening the document.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
7.3.7-1
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2022-11-22 09:13:35 UTC
I couldn't reproduce with:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: deb7bc82de19ea8e20c767fdf21f9ba4feb5e9f0
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

Nor:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a41c82407bbb73a4d87070326485ec4b4e954a65
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Nor:

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: de-DE (en_AU.UTF-8); UI: en-US
Calc: threaded

The caption category remains in the list after closing and reopening, the numbering behaves normally.
Not sure why it doesn't work for you.
Could you please try with version 7.4 and see if you can still reproduce? Maybe also provide a document for us to test?
Comment 2 Stéphane Guillou (stragu) 2022-11-22 09:14:15 UTC
Created attachment 183717 [details]
example ODT with two captioned images
Comment 3 QA Administrators 2023-05-22 03:15:16 UTC Comment hidden (obsolete)
Comment 4 nf_mail 2023-05-22 16:24:36 UTC
My system has updated LibreOffice to version 7.4.6.2, 
and the behaviour seems to be fine.
Everything is working as expected.

I think this issue can be closed.

Version: 7.4.6.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
7.4.6-1
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2023-05-22 17:14:21 UTC
Great to hear, thank you for reporting back, nf_mail!
Marking as "works for me" because no fixing commit was identified.
Cheers!