[Libreoffice-commits] core.git: oox/source
Tor Lillqvist
tml at collabora.com
Wed Feb 15 14:54:23 UTC 2017
oox/source/export/drawingml.cxx | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
New commits:
commit d2b014edc0f466370023a35eb46548390ceb7fb2
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Feb 15 16:20:13 2017 +0200
tdf#106026: Export paragraph top and bottom margin to DrawingML
Change-Id: I8c60f86a1debe135c9172ff639aa5af93f03b99b
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 084ce1a..13871c9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1948,6 +1948,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");
@@ -1980,6 +1986,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 );
More information about the Libreoffice-commits
mailing list