summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/PropertyMap.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-03-04 21:24:58 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-03-05 08:35:02 +0100
commitfa10258d723a0c50941166ba13274308fb0cfcbe (patch)
treeb001418666ee1c7fbf0c38468dd0f6ac03dcd84d /writerfilter/source/dmapper/PropertyMap.cxx
parent25d176ada67ada550bd4d0d08177c232cf7eeb37 (diff)
tdf#123243 DOCX import: make increased anchored obj spacing cond more strict
Regression from commit 8b73bafbc18acb4dd8911d2f2de8158d98eb6144 (tdf#115719 DOCX import: increase paragraph spacing for anchored objects, 2018-02-14), which is an import-time workaround for a Word layout bug. Re-checking the original document from that bug, this only happens with more anchored shapes (to the same paragraph), so make the workaround condition more strict, fixing the layout of this bugdoc. (Which means tdf115719.docx and tdf115719b.docx are modified to be more close to the original bugdoc.) Just checked, sadly Word's layout bug is still there in MSO 2019, so can't revert our emulation of it (not yet). Change-Id: I26f74a497b7718f8f3a2eadac481c8722e85e680 Reviewed-on: https://gerrit.libreoffice.org/68708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper/PropertyMap.cxx')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index ea4b40e28438..f1a28bedfc4e 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1273,8 +1273,9 @@ void SectionPropertyMap::HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl&
std::vector<AnchoredObjectInfo>& rAnchoredObjectAnchors = rDM_Impl.m_aAnchoredObjectAnchors;
for (auto& rAnchor : rAnchoredObjectAnchors)
{
- // Ignore this paragraph when there is a single shape only.
- if (rAnchor.m_aAnchoredObjects.size() < 2)
+ // Ignore this paragraph when there are not enough shapes to trigger the Word bug we
+ // emulate.
+ if (rAnchor.m_aAnchoredObjects.size() < 4)
continue;
// Analyze the anchored objects of this paragraph, now that we know the