Created attachment 163437 [details] Example file from Word with TOC paragraph styles Attached user made document has a TOC and there are custom styles (TJ 1-9) defined for it. On the first level TOC entries is “TJ 1” style applied, on the second level it’s “TJ 2”. These have 0 before/after/hanging indent set. When opened in Writer the before/after/first line indents get crazy values, making the first level TOC text unreadable. More observations: “TJ 1” style is based on “Tartalom fejezetcím” style. Which is based on “Címsor 2” style, that has 19.32 cm hanging indent – this shows up in Writer; also 1 cm left indent which does not. “Címsor 2” is based on “Címsor 1” which has 0 left and right indent, 0.75 cm hanging. “Címsor 1” is based on “Normal” which has 0 left and right indent and no hanging indent. I don’t see where the 15.5 cm before and -4,82 after indents are inherited in Writer, but the 19,32 first line indent is from the “Címsor 2” style. See also bug #132752 Also the “TJ 1-9” styles do not show up in the Styles sidebar at all. Steps to reproduce: 1. Open attached document Actual results: First level TOC entries unreadable due to spacing settings. Expected results: Readable TOC. LibreOffice details: Version: 7.1.0.0.alpha0+ (x64) Build ID: b1c83b68bfbf3477fa6a8f4c79c53f6f9ab31f8e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL Also in: Verzió: 6.4.0.3 (x86) Build az.: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8 CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: GL; VCL: win; Területi beállítások: en-US (hu_HU); Felület nyelve: hu-HU Calc: CL Does not happen yet (styles seem not to be applied to TOC) in: Verzió: 6.3.0.4 (x86) Build az.: 057fc023c990d676a43019934386b85b21a9ee99 CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: GL; VCL: win; Területi beállítások: hu-HU (hu_HU); Felület nyelve: hu-HU Calc: CL Bibisected using bibisect-win64-6.4 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b47a8f091ad8f9048a6b7962e9cde5d04ea0d665 author Justin Luth <justin.luth@collabora.com> 2019-08-01 15:50:00 +0300 committer Justin Luth <justin_luth@sil.org> 2019-08-01 19:28:54 +0200 tdf#126544 writerfilter: check parent style exists before assigning Adding CC to: Justin Luth It might be possible that this has just uncovered something pre-existing.
Created attachment 163438 [details] Screenshot of the original document side by side in Word and Writer
Reproduced in Version: 7.1.0.0.alpha0+ Build ID: d8270636a57e7dc68ede51308c380e2098f765d7 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
I think that the problem is that w:styleId="Tartalomfejezetcm" tries to set indent before text to be larger than the page width (LO UI limits it to 15.5cm) and so I'm guessing that LO spills the excess amount into a negative indent after text. (15.5+4.83 = 20.33) <w:ind w:left="11520" w:hanging="10953"/> MS Word 2003 reports that Tartalomfejezetcm has a left indent of 1cm, and a hanging of 19.32 (=20.32). If I apply the Tartalomfejezetcm style to the line instead of TOC 1 (TJ1), then Word goes really bizarre. (Word 2016 does the same thing - the text is tried to be placed one character per line at position 20.32 I guess - which is offscreen.) For some reason, Word explicitly states TOC 1 has indent of 0, first of 0. Is it doing something special to prevent inheritance for the TOC styles? W:ind certainly is not defined by the style itself. And yet with the UI I can re-inherit from Tartalomfejezetcm and then Word goes berserk as well. So it seems there are some illegal things in this document (Word's UI does not allow such a large left indent for example.)
(In reply to Justin L from comment #3) > So it seems there are some illegal things in this document (Word's UI does > not allow such a large left indent for example.) It seems to depend on the paragraph location too: - For Normal paragraph in document body on an A4 page it is 14,7 cm (Hanging+Left+Right) - In the TOC in this example document it is 26,6 cm. Although the TOC starts to look quite funny after that.
(In reply to NISZ LibreOffice Team from comment #4) > (In reply to Justin L from comment #3) > > So it seems there are some illegal things in this document (Word's UI does > > not allow such a large left indent for example.) > > It seems to depend on the paragraph location too: > - For Normal paragraph in document body on an A4 page it is 14,7 cm > (Hanging+Left+Right) > - In the TOC in this example document it is 26,6 cm. Although the TOC starts > to look quite funny after that. Correction: - For direct formatting the limit is 14,7 cm - For paragraph style the limit is 26,6 cm For an A4 page. For A3 the paragraph style limit is the same, but direct formatting goes up to 23,4 cm.
Dear NISZ LibreOffice Team, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
This changed in 7.1 (as a backport) in: https://git.libreoffice.org/core/+/dacd7c5d3df95e30ae6161e92015fc0449928a37 author Vasily Melenchuk <vasily.melenchuk@cib.de> Wed May 19 13:58:35 2021 +0300 committer Xisco Fauli <xiscofauli@libreoffice.org> Wed May 26 11:06:29 2021 +0200 tdf#132752: docx import: improvements for first line indent in lists so that the paragraphs were starting on the right margin, still not good just different. Paragraphs started to look in place in 7.3 after: https://git.libreoffice.org/core/+/a1ee86ebe1f3106d9601c989e4feeacfc1941331 author Vasily Melenchuk <vasily.melenchuk@cib.de> Wed Feb 09 09:41:51 2022 +0300 committer Vasily Melenchuk <vasily.melenchuk@cib.de> Fri Feb 11 10:42:29 2022 +0100 tdf#146917: docx import: better support for style with num reset