summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-27 20:37:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-28 09:55:03 +0000
commit6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch)
treeba19bc4bff6ddbd87354f90a61615cf5f4892c5a /linguistic
parentc95a10ca2079cdc33d09189aef0a8788eab274ff (diff)
ByteString->rtl::OUStringToOString
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dicimp.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index ba7e1f52fb5f..6d7d1c6672eb 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -395,18 +395,17 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
return pStream->GetError();
}
-
-static ByteString formatForSave(
- const uno::Reference< XDictionaryEntry > &xEntry, rtl_TextEncoding eEnc )
+static rtl::OString formatForSave(const uno::Reference< XDictionaryEntry > &xEntry,
+ rtl_TextEncoding eEnc )
{
- ByteString aStr(xEntry->getDictionaryWord().getStr(), eEnc);
+ rtl::OStringBuffer aStr(rtl::OUStringToOString(xEntry->getDictionaryWord(), eEnc));
if (xEntry->isNegative())
{
- aStr += "==";
- aStr += ByteString(xEntry->getReplacementText().getStr(), eEnc);
+ aStr.append(RTL_CONSTASCII_STRINGPARAM("=="));
+ aStr.append(rtl::OUStringToOString(xEntry->getReplacementText(), eEnc));
}
- return aStr;
+ return aStr.makeStringAndClear();
}
@@ -450,9 +449,9 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
pStream->WriteLine(ByteString("lang: <none>"));
else
{
- ByteString aLine("lang: ");
- aLine += ByteString( String( MsLangId::convertLanguageToIsoString( nLanguage ) ), eEnc);
- pStream->WriteLine( aLine );
+ rtl::OStringBuffer aLine(RTL_CONSTASCII_STRINGPARAM("lang: "));
+ aLine.append(rtl::OUStringToOString(MsLangId::convertLanguageToIsoString(nLanguage), eEnc));
+ pStream->WriteLine(aLine.makeStringAndClear());
}
if (0 != (nErr = pStream->GetError()))
return nErr;
@@ -468,7 +467,7 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
const uno::Reference< XDictionaryEntry > *pEntry = aEntries.getConstArray();
for (sal_Int32 i = 0; i < nCount; i++)
{
- ByteString aOutStr = formatForSave(pEntry[i], eEnc);
+ rtl::OString aOutStr = formatForSave(pEntry[i], eEnc);
pStream->WriteLine (aOutStr);
if (0 != (nErr = pStream->GetError()))
return nErr;