Bug 143726 - FILESAVE DOCX TOC Heading style changes name on save
Summary: FILESAVE DOCX TOC Heading style changes name on save
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-TableofContents
  Show dependency treegraph
 
Reported: 2021-08-04 15:12 UTC by NISZ LibreOffice Team
Modified: 2023-02-16 10:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (10.05 KB, application/vnd.oasis.opendocument.text)
2021-08-04 15:12 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer (5.53 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-04 15:13 UTC, NISZ LibreOffice Team
Details
Screenshot of the original and exported document side by side in Writer (145.31 KB, image/png)
2021-08-04 15:14 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-08-04 15:12:50 UTC
Created attachment 174076 [details]
Example file from Writer

When a new TOC is inserted to a Writer document its title gets the “Contents Heading” style.
When saved as docx this name is changed to “TOA Heading” which belongs to a different object, a “Table of Authorities” in Word.
This could cause roundtrip issues in case bug 143722 is fixed.

Steps to reproduce:
    1. Open attached example file
    2. Notice the TOC heading has “Contents Heading” style
    3. Save as DOCX, reopen

Actual results:
The TOC heading has now “TOA Heading” style.

Expected results:
TOC heading keeps its “Contents Heading” style.

LibreOffice details:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ad1b12686da88bea57582df10fa85268ada209b8
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

Also in 7.0, 6.0, 5.2.
Not yet in 5.1.

Additional Information:
Bibisected using bibisect-win32-5.2 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=78284714b73a8307174c596295894e8f3951e09a 

author	Mark Hung <marklh9@gmail.com>	2016-02-04 00:53:01 +0800
committer	Mark Hung <marklh9@gmail.com>	2016-02-13 15:22:52 +0000
commit 78284714b73a8307174c596295894e8f3951e09a (patch)

tdf#76817: fix missing heading styles assigned to outline levels in ooxml

Adding CC to:  Mark Hung
Comment 1 NISZ LibreOffice Team 2021-08-04 15:13:59 UTC
Created attachment 174077 [details]
The original file saved by Writer
Comment 2 NISZ LibreOffice Team 2021-08-04 15:14:19 UTC
Created attachment 174078 [details]
Screenshot of the original and exported document side by side in Writer
Comment 3 Evgenija Chumachenko 2021-08-05 10:28:09 UTC
confirm in 

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 41f1d389d4b513a7f616542d00fd58268ab5ea07
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: threaded
Comment 4 Commit Notification 2021-08-19 11:40:34 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5440492ff9f949ee9ed9052e8bab6f5136d78b2a

tdf143726 DOCX: export default TOC Header style with correct name

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-09-21 08:31:27 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/50044ecd89ea039cad4017ea4ccecd79893534de

tdf143726 DOCX: export default TOC Header style with correct name

It will be available in 7.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 NISZ LibreOffice Team 2021-10-05 09:39:37 UTC
Verified in:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c2de581d1943df2d84f2b71817b6a8bee41f0217
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL