Bug 149258 - FILESAVE DOCX Dots appear IN MS WORD for custom numbering
Summary: FILESAVE DOCX Dots appear IN MS WORD for custom numbering
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.1 rc
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists regressions-loext-num-list-format
  Show dependency treegraph
 
Reported: 2022-05-24 10:23 UTC by Gabor Kelemen (allotropia)
Modified: 2024-05-31 13:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The example file saved by Writer master (5.12 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-05-24 10:23 UTC, Gabor Kelemen (allotropia)
Details
The original file in Writer, with its docx version in Word and Writer (127.15 KB, image/png)
2022-05-24 10:25 UTC, Gabor Kelemen (allotropia)
Details
screenshot of results for 3 versions of LO, DOCX opened in Office 365 Web (104.47 KB, image/png)
2022-05-31 07:38 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-05-24 10:23:46 UTC
Created attachment 180325 [details]
The example file saved by Writer master

This is split out of bug 148455

When  attachment 179687 [details] is saved as docx and opened in Word, the numbering appears as (..a) instead of the original (a).

1, Open  attachment 179687 [details]
2, Save as DOCX
3, Open the file in Word.

Numbering changes from (a) to (..a) in Word (2013/2016) but not in Writer upon reload.

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: b6266207b55a7633dc82b02142215757512adfb7
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

This started in:

https://git.libreoffice.org/core/+/9987b518fca1476bd0ce8c86bcf6ac7c81f7b580
author	Vasily Melenchuk <vasily.melenchuk@cib.de>	Mon Jun 14 14:27:56 2021 +0300
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	Tue Jun 29 19:02:20 2021 +0200

new ODF numbered list parameter loext:num-list-format

After this the two extra dots appeared in the odt attachment 179687 [details] file as well until: 

https://git.libreoffice.org/core/+/bf2b46aa15665dde63ceff4e7686b99b3990354f

author	Vasily Melenchuk <vasily.melenchuk@cib.de>	Sun Dec 26 20:38:30 2021 +0300
committer	Vasily Melenchuk <vasily.melenchuk@cib.de>	Mon Dec 27 15:47:21 2021 +0100
tree 765ac9ce801e742d2d6f4dd56640e4a5bd53a48f
parent bbfce0b49fb11997af8eb03d40431b6a78f2aebe [diff]

tdf#146257: sw: better handling for list numbering = NONE
Comment 1 Gabor Kelemen (allotropia) 2022-05-24 10:25:08 UTC
Created attachment 180326 [details]
The original file in Writer, with its docx version in Word and Writer
Comment 2 Gabor Kelemen (allotropia) 2022-05-24 10:30:03 UTC
Adding CC to: Vasily Melenchuk
Comment 3 Stéphane Guillou (stragu) 2022-05-31 07:38:48 UTC
Created attachment 180487 [details]
screenshot of results for 3 versions of LO, DOCX opened in Office 365 Web

I've tried saving attachment 179687 [details] as DOCX with different versions of LO, and opening in Office 365 web:

- with LO 6.4.7.2, I get headings (a) to (e)
- with LO 7.3.3.2, I get headings (1.1.a) to (1.1.e)
- with a recent LO 7.4 build, I get headings (1.1.a) to (1.1.c) then (1.1.a) and (1.1.b) again.

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 3676fb9d7b505d9f8079008b41e423b54663a86a
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 4 Stéphane Guillou (stragu) 2022-05-31 07:40:26 UTC
Results are slightly different for me (see attachment 180487 [details]) but setting to NEW as things that should be hidden are now back.
Comment 5 Justin L 2023-05-18 18:58:00 UTC
repro 7.6+
Comment 6 Justin L 2024-05-16 13:32:24 UTC
repro 24.8+  - still looks like comment 4.
Comment 7 Justin L 2024-05-16 18:57:17 UTC
So there are two problems here most likely. So far we have been tracking the export ODT->DOCX bug.

There is also an import bug - LO doesn't import the resulting file in the same bad way.

The import was the same as MSO (showing the dots) starting in 7.0 with
commit 7459b9ecb54a298f02d19089620149718f8d8d48
Author: Vasily Melenchuk on Mon Apr 13 11:06:29 2020 +0300
    tdf#116883: sw: support for lists level format string
    
    Multilevel lists are more flexible in case of DOCX. There is
    supported custom format for any level in DOCX unlike in LO
    and ODT where we are limited only with prefix and suffix
    for hardcoded list levels separated by dot. At the same time
    DOCX can have lists not only "1.2.3.4", but "1/2/3/4" or even
    "1!2>3)4" and such format can vary on each list level.

The dots disappeared in the same 7.2.5 commit already mentioned for ODF.
commit bf2b46aa15665dde63ceff4e7686b99b3990354f
Author: Vasily Melenchuk on Sun Dec 26 20:38:30 2021 +0300
    tdf#146257: sw: better handling for list numbering = NONE
Comment 8 Commit Notification 2024-05-31 13:27:31 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/71c49057deb1a696e4b0ce9d2091aaa28572b57a

tdf#149258 sw ms export: no separator for NONE numbering level

It will be available in 24.8.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 9 Justin L 2024-05-31 13:42:17 UTC
(In reply to Justin L from comment #7)
> So there are two problems here most likely. So far we have been tracking the
> export ODT->DOCX bug.
fixed by comment 8's patch - with the caveat that since we don't import-display like MSO, we will simply lose that separator (for that level) in a round-trip. 

> There is also an import bug - LO doesn't import the resulting file in the
> same bad way.
Not really an import issue, since we import all the info - we just don't show the separator for a NONE level. Since it is highly unlikely that a document would be intentionally designed to show multiple separators, I'd say don't worry about this layout-visualization issue. (It would require yet another compatibility flag.)