[Libreoffice-bugs] [Bug 131594] New: FILEOPEN DOCX: Do not display line numbering if w:lnNumType is set but w:countBy="0"

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Mar 26 09:57:04 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=131594

            Bug ID: 131594
           Summary: FILEOPEN DOCX: Do not display line numbering if
                    w:lnNumType is set but w:countBy="0"
           Product: LibreOffice
           Version: 6.3.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: suokunlong at 126.com

Created attachment 159036
  --> https://bugs.documentfoundation.org/attachment.cgi?id=159036&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200326/309fc557/attachment.htm>


More information about the Libreoffice-bugs mailing list