diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2013-11-13 20:54:46 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-14 17:33:30 +0100 |
commit | 4025c22d2d0c11dfe8051f176376f3336b24a26a (patch) | |
tree | e58fbd88331e2fb671911890f7d7117849e24a1e | |
parent | 238e528ea4f58c045dc3d2241f1d2c04cd7b549b (diff) |
n#828390: Export subscript text.
-rw-r--r-- | oox/source/export/drawingml.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index afb9e027bb9b..bfe3ed94d718 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -665,6 +665,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()))); @@ -751,12 +752,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 |