DOCX import: fix lost page break when footer ends with a table

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 8 January 2020 16:16 EST

Regression from commit 7d3778e0ef9f54f3c8988f1b84d58e7002d6c625 (bnc#816593 DOCX import: ignore page breaks in tables, 2013-09-02), the page break was ignored because the preceding footer ended with a table (no empty paragraph at the end of the footer stream).

Fix the problem by saving/loading the table state around header/footers, that way the page break is not ignored.

Adjust testTdf102466 to test the page number from Word.

Change-Id: Ia4c22452ee2c37f7f941dfd922db04c851644d0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86435

a86a2a1c1ceb DOCX import: fix lost page break when footer ends with a table
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 4 +-
writerfilter/CppunitTest_writerfilter_dmapper.mk | 1 +
.../qa/cppunittests/dmapper/DomainMapper_Impl.cxx | 85 +++++++++++++++++++++
.../dmapper/data/page-break-footer-table.docx | Bin 0 -> 15416 bytes
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 9 ++-
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 5 +-
6 files changed, 99 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share