Description: Importing FMT-3-S-Thesis-Template-v1.0.dotx in LibreOffice 7.0 series now cuts out the entire content pages (all Chapters and also Bibliography). This is potentially related to #128260 , or may be a separate, new issue. Steps to Reproduce: 1. Get https://ec2.sheer.us/~enyc/noidx/FMT-3-S-Thesis-Template-v1.0.dotx (or, the same attachment which will be attached to this bug). 2. Open in Libreoffice 7.x 3. Notice the Chapters listed on page xiii and xiv 4. Notice page xxi continues straight to page 1 with all the chapters and bibliography completely missing!. Actual Results: This failure is shown in: https://ec2.sheer.us/~enyc/noidx/FMT-3-S-Thesis-Template-v1.0_LO-7.0.1.pdf Expected Results: Compared to correct output:- https://ec2.sheer.us/~enyc/noidx/FMT-3-S-Thesis-Template-v1.0_WinWord-2010.pdf Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: This is potentially related to #128260 , or may be a separate, new issue.
Created attachment 164761 [details] FMT Template dotx document template, which triggers the failure.
Created attachment 164762 [details] FMT Template as exported to PDF with automatic blank pages in LO 7.0.1
Created attachment 164763 [details] FMT Template as exported to PDF from WinWord-2010, which seems to render correctly.
Happens on at least 2 different LO 7.0 builds, further confirmed.
The idea is to wait for conformation before setting to new. Reverting to unconfirmed
To be clear opening FMT-3-S-Thesis-Template-v1.0.dotx -- Page 23 of 47 should start with heading "Chapter 1". Faulty case is: Page 23 of 47 starts "Appendix A" instead. Also, to be clear, the ToC (Table of Contents) is 'correct' and updating this index, although making document self-consistent, is simply removing reference to the ''vanished'' contents.
(In reply to enyc from comment #6) > opening FMT-3-S-Thesis-Template-v1.0.dotx -- > > Page 23 of 47 should start with heading "Chapter 1". > > Faulty case is: Page 23 of 47 starts "Appendix A" instead. Repro with Version: 7.0.1.2 (x64) Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452 CPU threads: 12; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: threaded I suspect a rebression from a fix to tdf#76817.
Further Correction -- the content isn't actually missing but actually the chapter headings are mispositioned, becoming Appenixes, I believe!. Bug Title was corrected accordingly. "Vanished contents" is a misnomer/mistake in the original report above, but nonetheless check and confirmation above is valid. Thankyou to Mike Kaganski for pointing out mistakes in process and so-on!.
(In reply to Mike Kaganski from comment #7) > I suspect a rebression from a fix to tdf#76817. Good guess, it is a regression from that, bibisected to the following commit using repo bibisect-linux-64-7.1. Adding CC: to László Németh. https://cgit.freedesktop.org/libreoffice/core/commit/?id=2128d59ab91da853652305390d56b3287bcb67b1 author László Németh <nemeth@numbertext.org> 2020-06-12 11:11:16 +0200 committer László Németh <nemeth@numbertext.org> 2020-06-12 17:42:00 +0200 tdf#76817: DOCX import: fix chapter numbering
repro 7.2+
Created attachment 171368 [details] 136194_minimal.docx
In style "Heading 1"'s numbering id 16, which is abstract #10, there is nothing that indicates "Appendix x". However, Heading 7 (which inherits from Heading 1) seems to take over Chapter Numbering level 1 (which is normally occupied by Heading 1). Since Heading 1 is not part of Chapter numbering, it should not be treated specially.
This should have been reverted 6 months ago - as soon as it was reported. (And it shouldn't have been backported anywhere either.)
136194_minimal.docx shows we import outline/chapter numbering completely incorrectly in writerfilter. We have band-aids(plasters) everywhere, partially covering a gaping wound. When dealing with Heading 1 style, we get: warn:legacy.osl:4046753:4046753:sw/source/core/txtnode/ndtxt.cxx:3887: <HandleModifyAtTextNode()> - text node with outline style, but its paragraph style is not assigned to outline style. warn:legacy.osl:4046753:4046753:sw/source/core/doc/fmtcol.cxx:601: <SwTextFormatColl::GetAssignedOutlineStyleLevel()> - misuse of method But how to fix? Somehow Chapter Numbering should NEVER be set UNLESS we are confident that LibreOffice saved the docx. I think this would be: the numId == 1, and it is never used in direct formatting, and only used in styles where outlineLevel == listLevel (although examples show that listLevel seems to be optional :-() It should be irrelevant what the name of the paragraph style is. (.doc format already does outlineLevel == listLevel) Crude bandaid patch found at http://gerrit.libreoffice.org/c/core/+/114681
A better patch is now at https://gerrit.libreoffice.org/c/core/+/115614 which is part of the series of patches for bug 141966. [I'm confused. The first time I opened the document after that patch series, I saw Appendix A, Appendix B, Appendix C, and finally Appendix D. When I started to look into it, I have now only seen Appendix A, A.1, A.1.1, and B - like it should be.] So, it should be fixed in LO 7.3 if all of the patches are accepted. (Delaying the patches and being extremely cautious since numbering is regression-prone.
Created attachment 172018 [details] 136194_FMT2.docx: short version with only a minimized appendix.
Created attachment 173506 [details] The minimal docx in Word, Writer 7.1 and 7.3alpha Minimized attachment 171368 [details] looks good now on open in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 0fc020fb73c86a20608e8dff12af607e60327379 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: CL Not yet in bibisect-win64-7.3 from two weeks ago so can't pinpoint the exact change yet.
Created attachment 173507 [details] The original attachment 164761 [details] in Word and Writer nightly The original also looks good. Except for the 1.2 [Sample Heading 2] breaking to a new page in Word but not in Writer - but this is a separate issue.
(In reply to NISZ LibreOffice Team from comment #17) > Created attachment 173506 [details] > The minimal docx in Word, Writer 7.1 and 7.3alpha > > Minimized attachment 171368 [details] looks good now on open in: > > Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community > Build ID: 0fc020fb73c86a20608e8dff12af607e60327379 > CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: > win > Locale: hu-HU (hu_HU); UI: hu-HU > Calc: CL > > Not yet in bibisect-win64-7.3 from two weeks ago so can't pinpoint the exact > change yet. Fixed by https://git.libreoffice.org/core/+/3e09e0784ad7669d3e0a7655f5e604a2387b1b5d tdf#141966 writerfilter CN: fix chapter number identification
Verified in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: ad1b12686da88bea57582df10fa85268ada209b8 CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded