diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-03 22:37:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-03 22:37:55 +0100 |
commit | 45fd57f285f6a780479147e547826dd824e68ae6 (patch) | |
tree | e9ebbfd6f54f6462d3e2f0a8183226d2ebe5be74 | |
parent | 156c5bd4b04402f8dd724da6c8f984c4d63e4171 (diff) |
ByteString::ConvertToUnicode->rtl::OUString ctor
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 2afe16b04c..7b29062e71 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2780,11 +2780,16 @@ void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen { if( bVer67 ) { - cSymbol = ByteString::ConvertToUnicode( - *(sal_Char*)(pData+2), RTL_TEXTENCODING_MS_1252 ); + //convert single byte from MS1252 to Unicode + cSymbol = rtl::OUString( + reinterpret_cast<const sal_Char*>(pData+2), 1, + RTL_TEXTENCODING_MS_1252).toChar(); } else + { + //already is Unicode cSymbol = SVBT16ToShort( pData+2 ); + } bSymbol = true; } } |