diff options
Diffstat (limited to 'oox/source/export/drawingml.cxx')
-rw-r--r-- | oox/source/export/drawingml.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7862bf8da1b8..484c90b51519 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1183,10 +1183,21 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel const char* cap = NULL; sal_Int32 nSize = 1800; sal_Int32 nCharEscapement = 0; + sal_Int32 nCharKerning = 0; if( GETA( CharHeight ) ) nSize = (sal_Int32) (100*(*static_cast<float const *>(mAny.getValue()))); + if( GETA( CharKerning ) ) + nCharKerning = (sal_Int32)(*static_cast<short const *>(mAny.getValue())); + /** While setting values in propertymap, + * CharKerning converted using GetTextSpacingPoint + * i.e set @ http://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textcharacterproperties.cxx#129 + * therefore to get original value CharKerning need to be convert. + * http://opengrok.libreoffice.org/xref/core/oox/source/drawingml/drawingmltypes.cxx#95 + **/ + nCharKerning = ((nCharKerning * 720)-360) / 254; + if ( ( bComplex && GETA( CharWeightComplex ) ) || GETA( CharWeight ) ) { if ( *static_cast<float const *>(mAny.getValue()) >= awt::FontWeight::SEMIBOLD ) @@ -1324,6 +1335,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel XML_i, italic, XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), XML_sz, IS( nSize ), + XML_spc, nCharKerning > 0 ? IS(nCharKerning) : NULL, XML_strike, strikeout, XML_u, underline, XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ), |