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: 2025-05-02 12:23 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.
Comment 10 QA Administrators 2025-05-01 03:10:35 UTC Comment hidden (obsolete)
Comment 11 Christian Lehmann 2025-05-02 10:21:33 UTC
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 12; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 12 dolezvo1 2025-05-02 10:43:14 UTC
I don't believe it's actually been fixed. After reloading the newly created .fodt file, the "Chapter 1" numbering of the example file is still missing on today's build:

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 923da8a3855afae1f3f3a5f50d1fec08bbc02438
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-GB
Calc: threaded
Comment 13 Eyal Rozenberg 2025-05-02 10:55:57 UTC
(In reply to dolezvo1 from comment #12)

Seeintg the bug with:

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8397af1bc49897a2d8ebe30c1e960661271503e9
CPU threads: 4; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 14 Christian Lehmann 2025-05-02 12:23:35 UTC
I revoke my 'works for me'. It did work with one file which I tried; it does not work with another file. Further etiology seems necessary.