Bug 140461 - Libreoffice 7.1.0.3 cannot handle "<w:fldSimple w:instr="TOC \o "1-3" \h" w:dirty="true"/>" to create Table of Contents automatically anymore
Summary: Libreoffice 7.1.0.3 cannot handle "<w:fldSimple w:instr="TOC \o "1-3" \h" w:d...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-TableofContents MSO-External-Producers
  Show dependency treegraph
 
Reported: 2021-02-17 06:22 UTC by Heiko
Modified: 2025-03-29 03:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
generated docx with poi and jodconverter (13.11 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-17 06:24 UTC, Heiko
Details
generated docx uploaded saved and downloaded with google docs (10.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-17 06:26 UTC, Heiko
Details
generated docx openened and saved with MS-Word (15.99 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-17 06:26 UTC, Heiko
Details
generated docx opened updated indices and saved with MS-Word (16.27 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-17 06:27 UTC, Heiko
Details
Attachment #169797 in Writer 7.0 and 6.4 (200.57 KB, image/png)
2021-02-17 14:17 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko 2021-02-17 06:22:54 UTC
Description:
We create an .docx document with apache poi and convert it to PDF with jodconverter (wich requires LibreOffice). The TOC (table of contents) was updated in previous versions by adding "<w:fldSimple w:instr="TOC \o "1-3" \h" w:dirty="true"/>" when you opened the generated .docx file. MS-Word and Google-Docs are still able to recognize it, but LibreOffice does not detect the instruction to create the TOC automatically. Also the "Update Index/Indices" does not appear on right-click.

When I add a TOC by hand in the opened .docx in LibreOffice, everything works fine.

It was tested with MacOS-bigSur(11.2) and MS-Windows-10.

Unfortunately i cannot attach the example files here.

Actual Results:
The "<w:fldSimple w:instr="TOC \o "1-3" \h" w:dirty="true"/>" is not recognized by  LibreOffice and sometimes leads to lacking UI.

Expected Results:
The TOC is automatically created and recognized in LibreOffice. The "Update Index/Indices" can be executed on right-click or triggered programmatically.


Reproducible: Always


User Profile Reset: No



Additional Info:
Works with MS-Word and Google-Docs, just "Update Indexes" is required. The TOC instruction is recognized and applied.
Comment 1 Heiko 2021-02-17 06:24:59 UTC
Created attachment 169797 [details]
generated docx with poi and jodconverter
Comment 2 Heiko 2021-02-17 06:26:02 UTC
Created attachment 169798 [details]
generated docx uploaded saved and downloaded with google docs
Comment 3 Heiko 2021-02-17 06:26:49 UTC
Created attachment 169799 [details]
generated docx openened and saved with MS-Word
Comment 4 Heiko 2021-02-17 06:27:50 UTC
Created attachment 169800 [details]
generated docx opened updated indices and saved with MS-Word
Comment 5 NISZ LibreOffice Team 2021-02-17 14:17:09 UTC
Created attachment 169824 [details]
Attachment #169797 [details] in Writer 7.0 and 6.4

In 6.4 an empty TOC was imported, which could be updated (although this did not happen automatically, like in Word).

In 7.0 this is missing since:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5cdb14345842c07eb1a466897753da910e9488f8

author	Mike Kaganski <mike.kaganski@collabora.com>	2019-12-13 09:36:39 +0300
committer	Mike Kaganski <mike.kaganski@collabora.com>	2019-12-16 17:23:57 +0100

tdf#129353, tdf#129402: fix node creation on index import
Comment 6 NISZ LibreOffice Team 2021-02-17 14:19:43 UTC
Adding CC to: Mike Kaganski
Comment 7 Mike Kaganski 2021-04-03 11:06:34 UTC
For the record: attachment 169797 [details], when opened in Word 2016, asks if one wants to refresh "fields that may refer to other files". Or rejected, the result looks absolutely identical to what LibreOffice shows after the patch mentioned in comment 5. I actually doubt that this is a regression, since under no conditions Word shows the result that we had prior to that. What we miss is handling of the 'dirty' attribute, which we always lacked.
Comment 8 eisa01 2023-03-18 20:12:27 UTC
Given the screenshots in comment #5 this is not a macOS bug
Comment 9 QA Administrators 2025-03-29 03:12:03 UTC
Dear Heiko,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug