summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116410.docxbin0 -> 49192 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx6
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx4
3 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116410.docx b/sw/qa/extras/ooxmlexport/data/tdf116410.docx
new file mode 100644
index 000000000000..5352a233ed70
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116410.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 14e03fbced9d..f290d0aefe15 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -124,6 +124,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf115719, "tdf115719.docx")
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf116410, "tdf116410.docx")
+{
+ // Opposite of the above, was 2 pages, should be 1 page.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
DECLARE_OOXMLEXPORT_TEST(testParagraphSplitOnSectionBorder, "parasplit-on-section-border.odt")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 76851c428438..bf3522008f63 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1146,6 +1146,10 @@ 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.
+ if (rAnchor.m_aAnchoredObjects.size() < 2)
+ return;
+
// Analyze the anchored objects of this paragraph, now that we know the
// page width.
sal_Int32 nShapesWidth = 0;