-
Justin Luth yazdı
If all of the document is contained inside of sections, then at least one section must be visible or writer crashes. The 2012 fix seemed to assume that all content would be in a section, and thus required at least one section be visible. Instead, check for non-section content at the start and end of the document, and for gaps between sections, and count those as "virtual", visible sections, which would allow all real sections to be marked as hidden. The example document HiddenSection.odt in tdf#55814 is a really nice test document. With this patch, that test now works even if you remove the last non-section paragraph. Even nicer is finding that a (very unclear) "did you fix me?" unit test entry gives a unit test for patch. Change-Id: I6cac5e6df8dff7fbb78828ae2521a1b02e305a27 Reviewed-on: https://gerrit.libreoffice.org/66128Reviewed-by:
Justin Luth <justin_luth@sil.org> Tested-by: Jenkins Tested-by:
Serge Krot (CIB) <Serge.Krot@cib.de> Reviewed-by:
Thorsten Behrens <Thorsten.Behrens@CIB.de>
85bd9d81