sw/qa/extras/ww8export/data/tdf104017.doc |binary sw/qa/extras/ww8export/ww8export3.cxx | 9 +++++++++ sw/source/filter/ww8/ww8atr.cxx | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit c74c72464573f519e08f1e7826bced247b329d29 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Oct 28 21:52:18 2019 +0100 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Wed Oct 30 11:19:19 2019 +0100 tdf#104017 DOC export: be less aggressive with merging page styles Regression from commit 7146d8bcd96f844dc0239a5b29a6b36c3cb5a2cc (MSWordExportBase::OutputSectionBreaks: avoid fake section breaks, 2014-07-28), the problem was that we merged two separate page styles just because they were similar. This resulted in merging two independent tables into a single one. Fix the problem by merging the first and follow page style only in case the first page style is RES_POOLPAGE_FIRST, this resolves the current problem and keeps the original problem fixed, too. (Long-term, a better fix would be to not split the page styles in writerfilter/, similar to how the DOC import doesn't do that anymore: and then the merging can be avoided unconditionally.) (cherry picked from commit 5d1709a7c4184eb31cfc4c2d3acadff3a4a68189) Conflicts: sw/qa/extras/ww8export/ww8export3.cxx Change-Id: I357f1337cb0abc7fa1d88aa44ff87b4b464af81c Reviewed-on: https://gerrit.libreoffice.org/81653 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sw/qa/extras/ww8export/data/tdf104017.doc b/sw/qa/extras/ww8export/data/tdf104017.doc new file mode 100644 index 000000000000..878cbe25f863 Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf104017.doc differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index eaba6ba3ae6f..3b7dbd968bb3 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -294,6 +294,15 @@ DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt") CPPUNIT_ASSERT(abs(xSize.Width - 17000) <= 6); } +DECLARE_WW8EXPORT_TEST(testTdf104017, "tdf104017.doc") +{ + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 2 + // - Actual : 1 + // i.e. the tables on the two pages were merged together to a single one on export. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index ce11617247c3..10e58270ab60 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -473,7 +473,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode } } } - else if (!sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster())) + else if (m_pCurrentPageDesc->GetPoolFormatId() != RES_POOLPAGE_FIRST || !sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster())) { bBreakSet = true; bNewPageDesc = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits