Description: I work on a team which uses libreoffice CLI to convert .docx files to PDF. We've found that documents drafted in Microsoft Word with the "legal numbering style" applied to list level do not retain the expected Arabic numeral formatting for every enumerated level. I don't know the exact version of libreoffice used; we use a Docker image based on Ubuntu 20.04 and install the libreoffice package using apt. To convert `.docx` files to PDF, we run the following: `soffice --headless --invisible --nodefault --view --nolockcheck --nologo --norestore --nofirststartwizard --convert-to pdf {filename} --outdir {directory}` Likewise, when opened with LibreOffice Writer 6.0.7.3 on Ubuntu 18.04 (Desktop), a 1.1 will display as 1.a. (please see "Steps to Reproduce", "Actual Results", and "Expected Results"). When examining the numbering.xml file of the document in question, I see <w:isLgl/> tags. I don't have familiarity with the Office Open XML standard, but I've come across two reference documents: 1. (older, more detailed) https://web.mit.edu/~stevenj/www/ECMA-376-new-merged.pdf 2. (newer, less detailed) MS-OE376 v20171212: https://interoperability.blob.core.windows.net/files/MS-OE376/%5bMS-OE376%5d.pdf As far as I can tell, this feature corresponds to MS-OE376, Part 4, 2.9.4 isLgl (Display All Levels Using Arabic Numerals). It appears that libreoffice correctly follows the numer style. However, I interpret `<w:isLgl/>` tag as an override which causes Microsoft Word to ignore the number style and instead apply legal numbering. In this case, I would expect libreoffice/LibreOffice Writer to do the same. Nota bene: I'm new here. I intentionally styled libreoffice differently from LibreOffice to distinguish, respectively, between the CLI package and the suite of GUI applications. As I'm not familiar with the project, I don't know if that is a reasonable distinction. Please excuse any misconceptions. Steps to Reproduce: 1. In Microsoft Word, write arbitrary text on two or more lines. 2. Define a new multilevel list style to apply to the text drafted in step (1). 3. Under the "Click level to modify" selector, select the second level. 4. Set the "Number style for this level" to anything except for "1, 2, 3, ...". For example, set level two to "a, b, c, ..." 5. Check the "Legal style numbering" box; this should disable ("grey out") the "Number style for this level" drop-down menu. 6. For added effect, repeat steps (3), (4), and (5) for the third level; set its number style to something like lowercase Roman numerals ("i, ii, iii, ...") and apply "Legal style numbering". 7. Save the document as a `.docx`. 8. Open the document in LibreOffice. Observe that LibreOffice respects the number format and not the legal styling. Actual Results: LibreOffice respects the number format and not the legal number styling. The isLgl tag is not applied. (from numbering.xml) <w:numFmt w:val="lowerLetter"/> <w:isLgl/> <w:numFmt w:val="lowerRoman"/> <w:isLgl/> Expected Results: The isLgl tag should override numFmt. (from numbering.xml) <w:numFmt w:val="lowerLetter"/> <w:isLgl/> <w:numFmt w:val="lowerRoman"/> <w:isLgl/> Reproducible: Always User Profile Reset: No Additional Info: Nothing to add at the moment.
Created attachment 181769 [details] A .docx document with three multilevel lists; the last has "legal style numbering" applied to its second and third levels.
Created attachment 181777 [details] LO 7.3.5 vs. Word 2016 Comparison I confirm the bug: Version: 7.3.5.2 (x64) / LibreOffice Community Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01 CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded - - - Attached is an image showing the difference in list numbering between LO + Microsoft Word. Word 2016: - 1. -- 1.1. --- 1.1.1 - 2. -- 2.1. --- 2.1.1. LO 7.3.5: - 1. -- 1.a. <--- Here --- 1.a.i. <--- Here - 2. -- 2.a. <--- Here --- 2.a.i. <--- Here - - - Other discussion originally happened in this Reddit post: https://www.reddit.com/r/libreoffice/comments/wmwlf1/does_libreoffices_cli_support_islgl_legal/
Created attachment 187379 [details] isLgl-2.pdf: demonstrating the purpose of isLgl That was an excellent bug report. THANK-YOU. However, the example document wasn't the best, because it did not display the intention of IsLegal, nor the caveat conditions. This is something that MUST be handled at display time - and it is a capability that LO currently does not have.
Created attachment 187380 [details] isLgl-2.docx: the source demo file - highlighting feature and caveats There were two caveats mentioned in the "short documentation". A) it applies to all levels (not just previous levels) A.One becomes 1.1, not 1.One. B) it does not apply to NONE levels _.One becomes 1, not 1.1 Notice that it does not affect prior (or future) levels themselves. A) remains A) and doesn't become 1) 1.1) is the only level with isLgl, so it is the only level affected. A.One.1) does not becomes 1.1.1)
Please note that my "discussion examples" are not based on isLgl-2.docx. Both are separate (although they do highlight the same principles).
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fd64b426bc6175841143714ccc16bad181fd088f tdf#150408: Implement "Legal" numbering (all levels using Arabic numbers) It will be available in 24.2.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b13a7112d89b402b41640a19f55ad9edb6433592 tdf#150408: Implement UI for "Legal" numbering It will be available in 24.2.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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a73b3994fb6a2cc10b2d65cbaad201762610cecc Related: tdf#150408 DOC filter: handle legal numbering 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e8487bedb20a429565b4a0e4bd2d6806cc603b7f Related: tdf#150408 RTF filter: handle legal numbering 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/58b5f3399e1c4ce56180cb49c5d228ca92ccc8d3 Related: tdf#150408 DOC filter: handle legal numbering It will be available in 24.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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e8487bedb20a429565b4a0e4bd2d6806cc603b7f Related: tdf#150408 RTF filter: handle legal numbering 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/ https://supplementlast.com/ 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.