diff options
author | yogesh.bharate001 <yogesh.bharate@synerzip.com> | 2015-04-30 16:17:31 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-30 12:22:45 +0000 |
commit | b29483560306e6a6fec8dfe2c8622060b0ef2cd1 (patch) | |
tree | 1fbb6edfaebd41d1c316f4397dd183781f6a9cbf /oox | |
parent | fa38941a10832130ea8c8b86fac2468e79689585 (diff) |
tdf#90955: CharKerning i.e spc is not exported after RT.
Problem Description:
- CharKerning i.e spacing between characters/letter is not exported
after roundtrip.
XML Difference:
Original:
<a:rPr lang="en-IN" sz="6000" b="1" kern="0" spc="2000" baseline="0">
After Roundtrip:
<a:rPr b="1" lang="en-IN" sz="6000" strike="noStrike">
spc is missing after RT.
Change-Id: I8bcefd6f0d0e3a1825618bece6f563792633a272
Solution: added support for spc.
Reviewed-on: https://gerrit.libreoffice.org/15575
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-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 ), |