summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137593.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx3
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137593.docx b/sw/qa/extras/ooxmlexport/data/tdf137593.docx
new file mode 100644
index 000000000000..8b63fd39a8f2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137593.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index e5fd69650911..1ff3ccf8ec3e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1543,6 +1543,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell5->getText()), "ParaBottomMargin"));
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf137593, "tdf137593.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // zero auto spacing, if the first paragraph contains text boxes
+ // This was 280.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:tc/w:p[1]/w:pPr/w:spacing", "before", "0");
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115557, "tdf115557.docx")
{
// A chart anchored to a footnote multiplied during import
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fe1ab5c99b91..d37a6c68fb05 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2076,7 +2076,8 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
m_bParaHadField = false;
// don't overwrite m_bFirstParagraphInCell in table separator nodes
- if (m_nTableDepth > 0 && m_nTableDepth == m_nTableCellDepth)
+ // and in text boxes anchored to the first paragraph of table cells
+ if (m_nTableDepth > 0 && m_nTableDepth == m_nTableCellDepth && !IsInShape())
m_bFirstParagraphInCell = false;
m_bParaAutoBefore = false;