sw/qa/extras/ooxmlimport/data/tdf115719b.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 ++++++ writerfilter/source/dmapper/PropertyMap.cxx | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-)
New commits: commit 599ff05300599d4e4ce818092f18e76e738b921e Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Apr 4 17:53:18 2018 +0200 Related: tdf#115719 DOCX import: fix ignore of increased anchored obj spacing If there is only a single anchored object, then ignore only the current paragraph, not all paragraphs of the section. Change-Id: I5b44a3df05de325025ec90545667b349e875b31f Reviewed-on: https://gerrit.libreoffice.org/52398 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/sw/qa/extras/ooxmlimport/data/tdf115719b.docx b/sw/qa/extras/ooxmlimport/data/tdf115719b.docx new file mode 100644 index 000000000000..551b9871fe60 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf115719b.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 5563ce56dc1f..ef0d085e699c 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -276,6 +276,12 @@ xray ThisComponent.StyleFamilies.PageStyles.Default.Width CPPUNIT_ASSERT( pos.X > width / 2 ); } +DECLARE_OOXMLIMPORT_TEST(testTdf115719b, "tdf115719b.docx") +{ + // This was 0, 4th (last) paragraph had no increased spacing. + CPPUNIT_ASSERT(getProperty<sal_Int32>(getParagraph(4), "ParaTopMargin") > 0); +} + DECLARE_OOXMLIMPORT_TEST(testN766477, "n766477.docx") { /* diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index c1d16437cfa3..85c635fc3b32 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1144,9 +1144,9 @@ void SectionPropertyMap::HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl& std::vector<AnchoredObjectInfo>& rAnchoredObjectAnchors = rDM_Impl.m_aAnchoredObjectAnchors; for (auto& rAnchor : rAnchoredObjectAnchors) { - // Ignore the case when there is a single shape only. + // Ignore this paragraph when there is a single shape only. if (rAnchor.m_aAnchoredObjects.size() < 2) - return; + continue; // Analyze the anchored objects of this paragraph, now that we know the // page width. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits