Bug 156804 - Text inserted from autotext doesn't show the set number of paragraph
Summary: Text inserted from autotext doesn't show the set number of paragraph
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Heading-Numbering Technical
  Show dependency treegraph
 
Reported: 2023-08-18 08:45 UTC by Davide
Modified: 2025-01-10 11:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file for heading numbers missing importing by Auto text (13.46 KB, application/vnd.oasis.opendocument.text)
2023-09-03 18:51 UTC, Davide
Details
Edit style window to assign a 123 numbering style (67.86 KB, image/jpeg)
2023-09-04 12:38 UTC, Davide
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide 2023-08-18 08:45:25 UTC
Description:
From release 5.4 on.
I have some recurring texts I insert in a document using Auto Text. I use 3 numbered title levels. The numbering is set in Tools > Heading and Numbering as follow:
Number: 1,2,3
Start at: 1
Paragraph style: Title_3
Character style: None


Steps to Reproduce:
1.Create a text with a paragraph whose structure is numbered at 3rd level
2.Make the text an auto text: Ctrl+F3 >AutoText > New
3.Insert the text just created
4. The number disappear.
Note:
Click into the paragraph shows the correct Style name
Ctrl+M doesn't restore the style making the number be visible (old Writer problem)

Actual Results:
The structure number of the paragraph doesn't appear

Expected Results:
The text inserted maintains the numbering set in Tools > Heading and Numbering


Reproducible: Always


User Profile Reset: No

Additional Info:
Issue noticed since release 7.4.3.2, I don't checked it in previous versions
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: en-GB
Calc: CL threaded
Comment 1 raal 2023-09-02 07:36:15 UTC Comment hidden (obsolete)
Comment 2 Dieter 2023-09-02 08:54:48 UTC
I think, this is the intended behaviour. It's not related to auto text but to every text

Steps:
1. Create a paragraph
2. Add heading numbering with Tools -> Heading Numbering
3. Strg+a
4. Strg+c
5. Strg+n
6. Strg+v (no heading numbering)
7. Tools -> Heading Numbering: Entry in "Numbering" is "None"

I remember a similar bug report, but couldn't find it. So for me it looks ike anb enhancement request like "settings of heading numbering of a copied document should override settings of the document whre it is pasted", but I'm not sure, if this would be a good solution in most cases.

cc: Design-Team
Comment 3 Davide 2023-09-03 18:49:34 UTC
See sample file enclosed as requested (Heading and numbering-Sample doc.odt). I checked with 7.6.
I tried also with release 24.2.0.0 and the result is the same.
Moreover, assigning the numbering in Tools>Heading numbering doesn't works (numbers don't compare) but I'll post this as separate bug.
Comment 4 Davide 2023-09-03 18:51:05 UTC
Created attachment 189323 [details]
Example file for heading numbers missing importing by Auto text
Comment 5 Heiko Tietze 2023-09-04 08:48:57 UTC
I can follow the expectation that attaching a list style / heading numbering scheme to the paragraph should be taken into autotext and copy/paste actions.

Mike, any blocker?
Comment 6 Heiko Tietze 2023-09-04 10:45:36 UTC
OTOH, if the list style is applied as a style (edit style > outline & list > list style, eg. set to "Numbering 123") it will be accepted as expected.
Comment 7 Davide 2023-09-04 12:36:48 UTC
Thank you Heiko.
If I assign a title style to a level of structure, I can't modify that style assigning a numbering style. This option appears in grey in edit style window. See screenshot enclosed.
123 are assigned in Tools>Heading_Numbering to the styles you can see in the sample document.
Please let me know if I correctly understand your comment.
Comment 8 Davide 2023-09-04 12:38:15 UTC
Created attachment 189338 [details]
Edit style window to assign a 123 numbering style
Comment 9 Heiko Tietze 2023-09-05 07:10:09 UTC
(In reply to Davide from comment #7)
> I can't modify that style assigning a numbering style.

Use Tools > Heading Numbering to remove the heading numbering, and finally you can assign the list in the paragraph style.

I hope Mike can shed some light on all this shenanigans (once again).
Comment 10 Mike Kaganski 2023-09-06 08:01:07 UTC
(In reply to Davide from comment #0)
> From release 5.4 on.

I didn't try to repro yet, but this piece caught me: so was it different in am earlier version? If so, the first thing to do is to bisect which change made the difference. It might describe why.
Comment 11 Davide 2023-09-06 08:02:51 UTC
I confirm the issue also in 5.4.
Comment 12 Heiko Tietze 2023-09-27 04:41:14 UTC
Summary: Create a list of headings, apply tools > heading numbering = number 123, and create an autotext; the user expectation to get numbered headings is reasonable.

Workaround: instead heading numbering assign a list style to the paragraph
Comment 13 Davide 2023-09-28 11:12:37 UTC
I wouldn't assign a list style to a paragraph style to get the numbering.
Numbering styles are very unstable and may disappear from a release to another.
Recently I wanted to try the last version of LO (I was still using 5.4, because a number of further releases reveal something missing or malfunctioning).
A list style has been lost and a paragraph style matched with it has a different and unconfortable behaviour.
I had to create a similar list style and assign it to the relevant paragraph styles.
Comment 14 Timur 2025-01-10 11:09:08 UTC
Seems this was the issue: 3.Insert the text just created
In LO 7.5 selected text was not shown, so it had to be entered manually, without format.
In 7.6 selected text is shown in AutoText dialog, so is likely remembered with the format. And F3 works to set numbering. 
For numbering to work, F3 text needs to be at the beginning of paragraph.

I hope I understood this. I will close. If I did not or someone tests 
diffefently, please explain.