Bug 153489 - Changing the "Separator" for Numbering by Caption in AutoCaption results in it being applied to existing captions once new object is inserted
Summary: Changing the "Separator" for Numbering by Caption in AutoCaption results in i...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: AutoCaption
  Show dependency treegraph
 
Reported: 2023-02-09 02:35 UTC by sdc.blanco
Modified: 2023-02-27 11:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file for convenience (19.14 KB, application/vnd.oasis.opendocument.text)
2023-02-09 02:35 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2023-02-09 02:35:06 UTC
Created attachment 185248 [details]
test file for convenience

1.  Open attachment - or make a Writer Document with a Outline Level 1 Heading and a Frame that has a caption which uses Numbering by Chapter.

2.  Tools - Options - LibreOffice Writer - AutoCaption

3.  Select "LibreOffice Writer Frame", which activates the "Numbering (Captions) by Chapter" section.

4.  Set Level = 1 (or greater)

5.  Enter any character(s) for "Separator"

6. OK.

7. Insert a frame.

Actual result:  All the existing captions have their separator modified to the value entered into AutoCaption, after a caption is autoinserted.

Expected result:  Only the newly inserted caption uses the new separator, without changing the existing captions.

Tested with 7.2.7.2 

and 

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d466df5bc220eb80b8a51ff64507de881b938ed3
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win


According to help [1], AutoCaption:  "Specifies the settings for captions that are automatically added to inserted objects." -- but no indication is given that the "Separator" setting is applied retrospectively to all existing captions.

Either a bug or a need to improve documentation.

[1] https://help.libreoffice.org/7.6/en-US/text/shared/optionen/01041100.html
Comment 1 Stéphane Guillou (stragu) 2023-02-23 16:16:13 UTC
To reproduce, I had to make sure that I also changed the Category to "Figure" in the AutoCaption options, so it matches the existing frames.

I agree that the behaviour is unexpected, especially since the retroactive change is only triggered when a new frame is inserted. If retroactivity is expected (for consistency in captioning of all same object type / category combination), it should apply as soon as "apply" or "OK" is clicked in the Options dialog.

However, these settings are not document-specific, they are persistent across session. So having them apply automatically would mean overwriting captions in existing documents once opened: not what we want.

As the settings are linked to the user profile, I agree they should only apply to newly inserted captions. And maybe we need an extra option to "also update existing captions for same object / category".

Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group

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

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 05ac57f85eb622b798719db03bbdd07b79e1703a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 Heiko Tietze 2023-02-24 08:44:05 UTC
So you "manually" set a caption for objects (frames here), then automatically add another for the same category but with a different layout and expect the same category to have different layouts?

Sounds as if you label 1..3, change something, and expect 4ff to follow your modifications but 1..3 to remain - all independently from the manual vs. automatic procedure.
Comment 3 sdc.blanco 2023-02-24 12:30:06 UTC
(In reply to Heiko Tietze from comment #2)
> So you "manually" set a caption for objects (frames here), then
> automatically add another for the same category but with a different layout
> and expect the same category to have different layouts?
ftr -- the OP simply asks "what is the expected behavior here" -- because the "actual" was a little surprising (to me) and apparently to stragu -- hence an invitation to review AutoCaption on this point. 

> Sounds as ....
Speaking as a naive user of AutoCaption.  

1. I can understand that this option allows me to set up a way to automatically add a caption (with desired options), whenever I insert a NEW object (frame, image, table).  (nice feature!)

2. It was a surprise that a dialog, which is supposed to apply to something NEW being inserted, should also apply retrospectively to objects that were already inserted (whether manually or with AutoCaption).  (that motivated the OP, because it is not documented)

Do not have a strong opinion either way about the expected behavior of AutoCaption -- but if the current behavior (with retrospective changes) is the expected, then I will add a note in the documentation.

NB -- same behavior happens in the Insert Captions - Options dialog. 
Change the "separator" in the Options "Numbering by Chapter" section, click OK, then change is applied to all caption numbers in the category (even if no caption is inserted). (in this connection see bug 153488)  Again, not necessarily a complaint about the behavior, just an expression of "oh! That was not expected", and a thought that if the intention is that changing the separator (even without insert) will change all existing captions (in the category), then maybe worth documenting. For purposes of the OP, nothing deeper than that.  

But I have sympathy for the arguments in comment 1.  Seems "bad" from user POV to use a dialog that has the purpose of creating something new, and then discovering that it has changed already existing captions. This is relevant to bug 153248.
Comment 4 Heiko Tietze 2023-02-27 11:45:12 UTC
I cannot think of alternatives to retrospectively change the labels. It's consistent with what you do with the ordinary dialog. And ultimately a very academic question since the autocaption thingy is not supposed to be changed frequently. => NAB