diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-02-15 16:20:13 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-02-16 10:44:10 +0000 |
commit | 48acd5c5793edfec5d6b168fa39dcebc4500effe (patch) | |
tree | 4513beb7770b5a8413d39f06dda257dd745a83b7 /oox | |
parent | 2b60861a84b3e28cc110110e762fba5d6fbc43dd (diff) |
tdf#106026: Export paragraph top and bottom margin to DrawingML
Change-Id: I8c60f86a1debe135c9172ff639aa5af93f03b99b
(cherry picked from commit d2b014edc0f466370023a35eb46548390ceb7fb2)
Reviewed-on: https://gerrit.libreoffice.org/34299
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 73bf449df8b9..1f3b59326eb8 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1947,6 +1947,12 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara GET( nParaLeftMargin, ParaLeftMargin ); GET( nParaFirstLineIndent,ParaFirstLineIndent); + sal_Int32 nParaTopMargin = 0; + sal_Int32 nParaBottomMargin = 0; + + GET( nParaTopMargin, ParaTopMargin ); + GET( nParaBottomMargin, ParaBottomMargin ); + sal_Int32 nLeftMargin = getBulletMarginIndentation ( rXPropSet, nLevel,"LeftMargin"); sal_Int32 nLineIndentation = getBulletMarginIndentation ( rXPropSet, nLevel,"FirstLineOffset"); @@ -1979,6 +1985,28 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara mpFS->endElementNS( XML_a, XML_lnSpc ); } + if( nParaTopMargin != 0 ) + { + mpFS->startElementNS( XML_a, XML_spcBef, FSEND ); + { + mpFS->singleElementNS( XML_a, XML_spcPts, + XML_val, I32S( std::lround( nParaTopMargin / 25.4 * 72 ) ), + FSEND ); + } + mpFS->endElementNS( XML_a, XML_spcBef ); + } + + if( nParaBottomMargin != 0 ) + { + mpFS->startElementNS( XML_a, XML_spcAft, FSEND ); + { + mpFS->singleElementNS( XML_a, XML_spcPts, + XML_val, I32S( std::lround( nParaBottomMargin / 25.4 * 72 ) ), + FSEND ); + } + mpFS->endElementNS( XML_a, XML_spcAft ); + } + WriteParagraphNumbering( rXPropSet, nLevel ); mpFS->endElementNS( XML_a, XML_pPr ); |