diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-04 09:27:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-04 09:27:22 +0100 |
commit | 130c44b09ee23454d30e9c15f00c9e300808600c (patch) | |
tree | ebb9a13d1c57df3d98f520893868202c9399bcaa /starmath | |
parent | 8a7dbf9cbbf7bf650491ade4a8cb76b5aed91bda (diff) |
replace ByteString::ConvertToUnicode
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathtype.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index c30f95e369db..c332bbec489b 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -674,7 +674,6 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector, sal_uInt8 nTag,nRecord; sal_uInt8 nTabType,nTabStops; sal_uInt16 nTabOffset; - sal_Char nChar8; String sFontName; int i,nRet=1,newline=0; bool bSilent=false; @@ -1762,14 +1761,17 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector, aFont.nTface = 128-aFont.nTface; *pS >> aFont.nStyle; aUserStyles.insert(aFont); - sFontName.Erase(); - do + std::vector<sal_Char> aSeq; + while(1) { + sal_Char nChar8(0); *pS >> nChar8; - sFontName.Append(ByteString::ConvertToUnicode( - nChar8,RTL_TEXTENCODING_MS_1252)); + if (nChar8 == 0) + break; + aSeq.push_back(nChar8); } - while(nChar8); + sFontName = rtl::OUString(&aSeq[0], aSeq.size(), + RTL_TEXTENCODING_MS_1252); } break; case SIZE: |