diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-09-09 11:08:32 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-09-09 15:56:08 +0200 |
commit | a0d2e45f2efbe4e82b78c777d21b5eabec3a0924 (patch) | |
tree | 9d62d41f4802c3511c38c44090f14b5a80e96d8c /sw/qa | |
parent | cdd670e1ad26f066a6b03f7063bfc26cae74a8a8 (diff) |
tdf#136589 writerfilter: reset ParaHadField
::finishParagraph normally resets this, but it exited
early because of m_bDiscardHeaderFooter, so the setting
spilled over into the following paragraph.
This is a bit of a bandaid - likely stacks of paragraphs
and sections need to be used so each can hold its
own settings and not worry about them being clobbered.
But this particular case seems to a single level problem,
isolated to headers/footers, so the change should
both be enough and regression-safe.
Change-Id: I84c9a5d6bf95c35c4996a9b31e53f18c05ade727
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102314
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx | bin | 0 -> 39738 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 6 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx b/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx Binary files differnew file mode 100644 index 000000000000..c4cf7a139a03 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 999ef57a38af..b3c3d79962a0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -299,6 +299,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135216_evenOddFooter, "tdf135216_evenOddFooter.o getParagraph(2, "2"); } +DECLARE_OOXMLEXPORT_TEST(testTdf136589_paraHadField, "tdf136589_paraHadField.docx") +{ + // The section break should not add an additional CR - which equals an empty page two. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt") { // Since non-DOCX formats ignores column breaks in non-column situations, don't export to docx. |