Created attachment 179519 [details] Before vs After the RT Steps to reproduce: 1. Open attachment from bug 2. Save it as ODT 3. Reopen -> Vertical left text contains numbering Reproduced in Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 9877a0190e43241f4a5102e5d9cc7181f91d5a6f CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded [Bug found by office-interoperability-tools]
Regression introduced by: author Justin Luth <justin_luth@sil.org> 2021-05-13 13:50:56 +0200 committer Miklos Vajna <vmiklos@collabora.com> 2021-07-06 08:52:55 +0200 commit 3e09e0784ad7669d3e0a7655f5e604a2387b1b5d (patch) tree 1b2b34076c4e9d344135a88aa7bd2a429eeae3ba parent cfc677d667e118bfe7f092b584c4773476b9b906 (diff) tdf#141966 writerfilter CN: fix chapter number identification Bisected with: bibisect-linux64-7.3 Adding Cc: to Justin Luth
Steps to reproduce: 1. Open attachment 51225 [details] from bug 40900 2. Save it as ODT 3. Reopen
Oh, good. This is a "save DOCX to ODT". I don't care too much about that. With LO pre-defining stuff as it's own wonky Chapter Number concept, something like this doesn't surprise me. Lowering importance/priority.
Created attachment 179533 [details] 148561_exampleB.docx: minimized version I don't see why this is importing as a list. AFAICS, it is not defined in the .ODT styles. This stuff is found in styles.xml, as part of the header. If I assign a Heading 6 to text in the body (content.xml) then that has no problems. When I assigned Heading 6 in the header, then it goes wonky.
Created attachment 179669 [details] 148561_exampleC.docx: an even simpler example - just header text, no frame The difference is that Outline numbering rule retains its specified levels now instead of having all of that info wiped out - even though the levels are not connected to any styles. Additionally, we now no longer export WWNum1 - which is unused anyway and pretty much mirrored what Outline would have looked like, had it existed. The easiest way to see this is to run xmllint --format styles.xml > stylesB.xml and then run meld against it. This has got to be some kind of ODT import bug. The header stuff is all in the styles.xml file, so perhaps defaults are used on header/footer code before the style information affecting Chapter Numbering is finalized?
Yup. There is all kinds of goofy code in xmloff/source/text/txtimp.cxx that checks for various bug states and then forces a bunch of numbering related stuff. And this happens before "assign paragraph styles to list levels of outline style after all styles are imported and finished."
It's not really a regression because it has always imported these text:h items as Outline styles. They just didn't have any format strings to display, so it wasn't noticed. As soon as you assign a format string, the problem is seen.
Created attachment 179693 [details] 148561_homemade51.zip: ODT made in LO51 with PDF at creation and after reload. I was able to make a clean-room example with LO 5.1. Steps to reproduce: -Tools – Chapter Numbering. Set level 1 Para style to none, and set Number to something. -Paragraph styles: Set Heading 1 to have Outline level 1 -assign Heading 1 style to both the header text and the body text. Notice no numbering on either one – as expected (148561_homemade51.pdf). -save as .ODT and reload. Notice the header got Outline numbering applied to it. (148561_homemade51RT.pdf) P.S. You can substitute any level number - just use that level in all steps. It must be one of the heading styles - any style that produces a text:h instead of a text:p.
(In reply to Justin L from comment #8) > any style that produces a text:h instead of a text:p. and all that takes is to give any paragraph style an outline level. So simplified steps to reproduce: 1.) create a footer (you can leave it blank) and set the footer para-style to be outline level 1. 2.) assign a number to Chapter Numbering level 1 (and you can leave the Heading 1 paragraph assignment - it doesn't need to be removed) 3.) save as .ODT and reload, noticing that the footer now has numbering. reproduced with these steps in LO 3.5 - assume inherited from OOo. A hack fix is: - !bOutlineStyleCandidate && + !bOutlineStyleCandidate && !IsInHeaderFooter() &&