summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-04 09:27:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-04 09:27:22 +0100
commit130c44b09ee23454d30e9c15f00c9e300808600c (patch)
treeebb9a13d1c57df3d98f520893868202c9399bcaa
parent8a7dbf9cbbf7bf650491ade4a8cb76b5aed91bda (diff)
replace ByteString::ConvertToUnicode
-rw-r--r--starmath/source/mathtype.cxx14
-rw-r--r--sw/source/filter/ww1/w1class.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
-rw-r--r--sw/source/ui/config/uinums.cxx6
4 files changed, 14 insertions, 11 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:
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 22d575fd3535..1648b906eef2 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -72,7 +72,7 @@ sal_Unicode Ww1PlainText::operator [] ( sal_uLong ulOffset )
if( rFib.GetStream().Seek( ulFilePos + ulOffset ) == ulFilePos+ulOffset &&
rFib.GetStream().Read( &cRead, sizeof( cRead ) ) == sizeof( cRead ) )
{
- cRet = ByteString::ConvertToUnicode( cRead, RTL_TEXTENCODING_MS_1252 );
+ cRet = rtl::OUString(&cRead, 1, RTL_TEXTENCODING_MS_1252).toChar();
}
else
cRet = ' ';
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0a54c41e2aea..2ce7503130ff 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3208,8 +3208,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
if( '\x0' != cInsert )
{
- String sInsert = ByteString::ConvertToUnicode(cInsert,
- RTL_TEXTENCODING_MS_1252 );
+ rtl::OUString sInsert(&cInsert, 1, RTL_TEXTENCODING_MS_1252);
emulateMSWordAddTextToParagraph(sInsert);
}
if (!maApos.back()) //a para end in apo doesn't count
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 665ed2c168cf..8d85cf96def0 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -403,8 +403,10 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
nCharSet = RTL_TEXTENCODING_SYMBOL;
if( VERSION_53A > nVersion )
- aFmt.SetBulletChar( ByteString::ConvertToUnicode(
- sal_Char(aFmt.GetBulletChar()), nCharSet ));
+ {
+ sal_Char cEncoded(aFmt.GetBulletChar());
+ aFmt.SetBulletChar(rtl::OUString(&cEncoded, 1, nCharSet).toChar());
+ }
}
if( VERSION_30B != nVersion )