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 | abc48eaff8ead62b7b23ded2a4092b0f1c21667a (patch) | |
tree | fd7d05e24037f9f47ec709ce95a1919d5af033df /sw | |
parent | d66a06ce6af94482fe45410672d64eb864fb2e2e (diff) |
ByteString::ConvertToUnicode->rtl::OUString ctor
Diffstat (limited to 'sw')
-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 08ae5ce459af..11fd617e3671 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; } } |