Bug 148681 - LO Writer, FILESAVE: automatic chapter numbering disappears in FODT
Summary: LO Writer, FILESAVE: automatic chapter numbering disappears in FODT
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 154964 (view as bug list)
Depends on:
Blocks: Heading-Numbering ODF-Flat
  Show dependency treegraph
 
Reported: 2022-04-20 08:22 UTC by Christian Lehmann
Modified: 2023-05-01 19:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file for which heading numberings used to disappear when exported to FODT (22.07 KB, application/vnd.oasis.opendocument.text)
2023-05-01 06:20 UTC, dolezvo1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lehmann 2022-04-20 08:22:23 UTC
Description:
Load an ODT file with automatic chapter numbering. Save it as FODT. Load this FODT. Chapter numbering is gone.

Steps to Reproduce:
1. Load any ODT file which has automatic chapter numbering, e.g. the test_san.odt  uploaded with Bug 148333.
2. Save as FODT.
3. Load this FODT.

Actual Results:
Chapter numbering disappears.

Expected Results:
Chapter numbering should be preserved.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
The XML of FODT may be buggy. Or at least the Validator
https://codebeautify.org/xmlvalidator
finds fault with it.
Comment 1 Dieter 2022-05-06 06:38:42 UTC
I confirm it with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 2 m_a_riosv 2023-04-23 01:20:50 UTC
*** Bug 154964 has been marked as a duplicate of this bug. ***
Comment 3 dolezvo1 2023-04-23 05:28:34 UTC
Hi, did anyone try to dig into what might be the cause?
Comment 4 csyu.279 2023-04-28 23:57:06 UTC
Unable to reproduce:

Version: 7.4.6.2 (x64) / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2eb3922750b385dcadfd124d7baf686cec40eb5e
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 dolezvo1 2023-05-01 06:19:07 UTC
I had this issue on daily version from just a week or two ago, but now it seems to be fixed for me as well. Very nice.

I will upload a file with less noise so that everyone can check if it's fixed.
Comment 6 dolezvo1 2023-05-01 06:20:36 UTC
Created attachment 187022 [details]
ODT file for which heading numberings used to disappear when exported to FODT
Comment 7 Dieter 2023-05-01 07:28:51 UTC
(In reply to dolezvo1 from comment #5)
> I had this issue on daily version from just a week or two ago, but now it
> seems to be fixed for me as well.

So let's change status to RESOLVED WORKSFORME
Comment 8 Aron Budea 2023-05-01 19:04:30 UTC
Still reproducible here with a fresh build, would be good to hear from others as well. I used the attached sample, "Chapter 1" disappears after save to FODT and reload.
Also, already in 4.0.0.3.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a6aa71f6f3357f4fcd06c2307882733606af37ca
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded
Comment 9 dolezvo1 2023-05-01 19:25:49 UTC
Oh, you're right, it is still reproducible for me as well, my bad. I did a diff on what changed between the .fodt versions, which is when I realized I saved to file named .fodt, but the content was .odt, because I didn't change the format *audible facepalm*

I looked into the .odt and the resulting .fodt, and the heading in the .odt has extra `<text:list text:style-name="Outline"><text:list-item>` and `</text:list-item></text:list>` tags around it, which the heading in the .fodt doesn't have. Adding it to the .fodt restored the numbering, so my guess is there is just something going wrong with the export of these tags.