[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source
Muthu Subramanian
sumuthu at collabora.com
Wed Nov 20 02:37:33 PST 2013
oox/source/export/drawingml.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit 101b4a05a613fb662dc5854dd0f834f7aa369f66
Author: Muthu Subramanian <sumuthu at collabora.com>
Date: Wed Nov 13 20:54:46 2013 +0530
n#828390: Export subscript text.
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b083112..2abc67a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -698,6 +698,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
const char* italic = NULL;
const char* underline = NULL;
sal_Int32 nSize = 1800;
+ sal_Int32 nCharEscapement = 0;
if( GETAD( CharHeight ) )
nSize = (sal_Int32) (100*(*((float*) mAny.getValue())));
@@ -784,12 +785,24 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
usLanguage = usLanguageBuffer.makeStringAndClear();
}
+ if( GETAD( CharEscapement ) )
+ mAny >>= nCharEscapement;
+
+ if( nCharEscapement && GETAD( CharEscapementHeight ) ) {
+ sal_uInt32 nCharEscapementHeight;
+ mAny >>= nCharEscapementHeight;
+ nSize = (nSize * nCharEscapementHeight) / 100;
+ // MSO uses default ~58% size
+ nSize = (nSize / 0.58);
+ }
+
mpFS->startElementNS( XML_a, XML_rPr,
XML_b, bold,
XML_i, italic,
XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ),
XML_sz, nSize == 1800 ? NULL : IS( nSize ),
XML_u, underline,
+ XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ),
FSEND );
// mso doesn't like text color to be placed after typeface
More information about the Libreoffice-commits
mailing list