Created attachment 159036 [details] test docx file Steps to Reproduce: 1. Open the attached test docx document in Writer. Observe that the line numbering is displayed every 5 lines. 2. Open this docx document in MSO. Observe that no line numbering is displayed. ----- The issue is that, when unzip this docx, there is a the following code: <w:sectPr> ... <w:lnNumType w:countBy="0" w:distance="360"/> ... </w:sectPr> The specification explained that w:lnNumType is used to define line numbering. w:countBy="0" is used to specifies the line number increments to be displayed. The problem is, as described in the follow link: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/7b579d67-5dd6-4e60-b176-31b8157addd0 Word only allow the countBy value from 1 to 100. The specification allows any int value. As a result, the test document is still valid ooxml document, but in Word no line number would be displayed (because I guess it treat this line as invalid and it is just ignored), while in Writer it treated as valid but does not know what is the exact increment value, thus falls to its default 5 lines. ----- I assume this is not really a bug of LibreOffice itself, but for interoperability we should treat w:countBy="0" as "line numbering off". By the way, it seems that the test document was created using WPS Office. This issue was originally reported on the LibreOffice Chinese discussion forum: https://bbs.libreofficechina.org/forum.php?mod=viewthread&tid=2427
Created attachment 159037 [details] Screenshot in MS Word
Created attachment 159038 [details] Screenshot in LibreOffice Writer
Reproduced in Version: 7.0.0.0.alpha0+ Build ID: 9163755e9f64a0b1dd5f2090e0702c19e31c12c9 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded Version: 5.2.0.0.alpha1+ Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; Locale: ca-ES (ca_ES.UTF-8) Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Hi Kevin, I might have a fix for this. Do you plan to work on it or can I take it ?
(In reply to Xisco Faulí from comment #4) Please go ahead and take it. I know very little about c++ thus I am not able to fix such bugs. Want I am familiar with is building LibreOffice on Linux every day~
Patch in gerrit waiting for review: https://gerrit.libreoffice.org/c/core/+/91141
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/910197b8cf9b653c1b39b35b73424a36b7c1d1ae tdf#131594: switch line numbering off if w:countBy="0" It will be available in 7.0.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/de5a0023695584a4c2c5a2729284186d43fc7d82 tdf#131594: switch line numbering off if w:countBy="0" It will be available in 6.4.4. 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.
*** Bug 85390 has been marked as a duplicate of this bug. ***