summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-10-08 13:25:10 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-10-15 15:47:25 +0200
commitbe9f9630a7a394521e56cc1247ce2463e15fa796 (patch)
treeeecd3e2fb511f96fd0a498df89186f6a04cda543 /writerfilter
parent4b8415616071ec74e21040369d5dd1a9496db71d (diff)
tdf#127814 DOCX: fix default paragraph margin in table cells
when the table is started on a new page. Undefined w:before in w:docDefaults/w:pPrDefault resulted 0.5 cm paragraph top margin instead of 0 cm. Change-Id: I94a2aa9e9c5fcee6443b74bb261c300c6a8e1303 Reviewed-on: https://gerrit.libreoffice.org/80445 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 88ddeed17d5a7caca407f892a094a3dcb0aff501) Reviewed-on: https://gerrit.libreoffice.org/80599 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index a3fc9945e1c9..2c6de04a011a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -689,6 +689,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;