summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-07-06 08:13:40 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-07-06 09:19:37 +0200
commit9ac864159b241d2093e86f664ab6f4b76c69196d (patch)
tree3dee786ae567ca72b6ffee8d960f6d3708ccada1 /sw
parent9239c50a3a154ef6725d6ad36641279cf6f69752 (diff)
tdf#156059 sw floattable: fix lost 0 bottom margin of anchor in ftn from DOCX
The bottom margin of floating table anchor paragraph in the footnotes was non-zero, which meant that the document had 2 pages in Writer, but only 1 in Word. What happened here is that commit d1ac8df139a2a65db45d1970ccc0b80e17d827f6 (tdf#146346 DOCX import: fix table margins in footnotes, 2022-05-03) fixed this, but only for the case when the floating table conversion was delayed and not in the instant conversion case. Then later commit c50bf5a5daaae3d40f89ea0784a75a8a571c208d (sw floattable: remove no longer needed DOCX import heuristics, 2023-04-12) made all floating table conversions instant, so the problem was re-introduced. Fix the problem by now fixing the problem in DomainMapperTableHandler::endTable(), restoring code that was removed from SectionPropertyMap::CloseSectionGroup(). There was a disabled testcase for this, so just enable that. Change-Id: Ifb7c8fe2bdc70625d3e334cea0893b8e563664ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154088 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 5edb4dcdcd11..4718837981cc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1366,8 +1366,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146346, "tdf146346.docx")
assertXPath(pXmlDoc, "/root/page[1]//anchored/fly", 8);
assertXPath(pXmlDoc, "/root/page[1]//anchored/fly/tab", 8);
- // FIXME no second page (regression since multi-page floating tables?)
- //assertXPath(pXmlDoc, "/root/page[2]", 0);
+ // No second page.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // i.e. unwanted lower margin in the floating table's anchor paragraph in the footnote created a
+ // second page.
+ assertXPath(pXmlDoc, "/root/page[2]", 0);
}
#endif