summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127814.docxbin0 -> 29713 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx9
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx5
3 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127814.docx b/sw/qa/extras/ooxmlexport/data/tdf127814.docx
new file mode 100644
index 000000000000..10ed2348f166
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127814.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 653d4949863f..bd80a537e12a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -450,6 +450,15 @@ DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx"
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "after", "0");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf127814, "tdf127814.docx")
+{
+ // Paragraph top margin was 0 in a table started on a new page
+ xmlDocPtr pXmlDoc = parseExport();
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "before", "0");
+}
+
DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
{
/*
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 2a9386ce162f..bf1ed75c9f9f 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -684,6 +684,11 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps );
resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
+ if ( nSprmId == NS_ooxml::LN_CT_DocDefaults_pPrDefault && m_pImpl->m_pDefaultParaProps.get() &&
+ !m_pImpl->m_pDefaultParaProps->isSet( PROP_PARA_TOP_MARGIN ) )
+ {
+ m_pImpl->m_pDefaultParaProps->Insert( PROP_PARA_TOP_MARGIN, uno::makeAny( sal_Int32(0) ) );
+ }
m_pImpl->m_rDMapper.PopStyleSheetProperties();
applyDefaults( true );
m_pImpl->m_bHasImportedDefaultParaProps = true;