diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-21 18:20:12 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-21 19:42:57 +0100 |
commit | 331a0a347e2ed238ff41c8cd7815b946cc95ac0f (patch) | |
tree | fa79096f376872d710e1f9c46d5501693f67a66e /starmath | |
parent | fefd1221be844a033e409a18e05e8c6e98f6d1a7 (diff) |
starmath: fix OOXML export of non-BMP Unicode
Change-Id: Iafaeb9ea2e96ee6d8cc96174731ba3845c230b5e
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/ooxmlexport.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 277fb2511914..63f7cd4fc0f0 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -75,6 +75,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) m_pSerializer->startElementNS( XML_m, XML_t, FSNS( XML_xml, XML_space ), "preserve", FSEND ); const SmTextNode* pTemp = static_cast<const SmTextNode* >(pNode); SAL_INFO( "starmath.ooxml", "Text:" << OUStringToOString( pTemp->GetText(), RTL_TEXTENCODING_UTF8 ).getStr()); + OUStringBuffer buf(pTemp->GetText()); for(sal_Int32 i=0;i<pTemp->GetText().getLength();i++) { #if 0 @@ -94,9 +95,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) nFace = 0x7; *pS << sal_uInt8(nFace+128); //typeface #endif - sal_uInt16 nChar = pTemp->GetText()[i]; - m_pSerializer->writeEscaped( OUString( SmTextNode::ConvertSymbolToUnicode(nChar))); - + buf[i] = SmTextNode::ConvertSymbolToUnicode(buf[i]); #if 0 //Mathtype can only have these sort of character //attributes on a single character, starmath can put them @@ -127,6 +126,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) } #endif } + m_pSerializer->writeEscaped(buf.makeStringAndClear()); m_pSerializer->endElementNS( XML_m, XML_t ); m_pSerializer->endElementNS( XML_m, XML_r ); } |