diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-21 22:55:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-22 09:07:47 +0000 |
commit | 80a11f0d43309f336d9ca4723f06b8e49ac1d7d7 (patch) | |
tree | 578b3cf8a2cbfd180e69295aeba9b7eff6e9631f /editeng | |
parent | 1c1961786a519101bbf34c62542542c8a56e0328 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index e6ca9a513e10..51fb1d6d5b3b 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1226,7 +1226,7 @@ void BinTextObject::CreateData( SvStream& rIStream ) ContentInfo* pC = CreateAndInsertContent(); // The Text... - ByteString aByteString = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStream); + rtl::OString aByteString = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStream); pC->GetText() = rtl::OStringToOUString(aByteString, eSrcEncoding); // StyleName and Family... @@ -1260,7 +1260,7 @@ void BinTextObject::CreateData( SvStream& rIStream ) { if ( pItem->Which() == EE_FEATURE_NOTCONV ) { - sal_Char cEncodedChar = aByteString.GetChar(nStart); + sal_Char cEncodedChar = aByteString[nStart]; sal_Unicode cChar = rtl::OUString(&cEncodedChar, 1, ((SvxCharSetColorItem*)pItem)->GetCharSet()).toChar(); pC->GetText().SetChar(nStart, cChar); @@ -1273,8 +1273,8 @@ void BinTextObject::CreateData( SvStream& rIStream ) if ( ( _nWhich >= EE_FEATURE_START ) && ( _nWhich <= EE_FEATURE_END ) ) { // Convert CH_FEATURE to CH_FEATURE_OLD - DBG_ASSERT( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); - if ( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD ) + DBG_ASSERT( (sal_uInt8) aByteString[nStart] == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); + if ( (sal_uInt8) aByteString[nStart] == CH_FEATURE_OLD ) pC->GetText().SetChar( nStart, CH_FEATURE ); } } @@ -1290,7 +1290,7 @@ void BinTextObject::CreateData( SvStream& rIStream ) const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { - pC->GetText() = String( aByteString, RTL_TEXTENCODING_SYMBOL ); + pC->GetText() = rtl::OStringToOUString(aByteString, RTL_TEXTENCODING_SYMBOL); bSymbolPara = sal_True; } } @@ -1305,8 +1305,8 @@ void BinTextObject::CreateData( SvStream& rIStream ) || ( bSymbolPara && ( rFontItem.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) ) { // Not correctly converted - ByteString aPart( aByteString, pAttr->GetStart(), pAttr->GetEnd()-pAttr->GetStart() ); - String aNew( aPart, rFontItem.GetCharSet() ); + rtl::OString aPart(aByteString.copy(pAttr->GetStart(), pAttr->GetEnd()-pAttr->GetStart())); + rtl::OUString aNew(rtl::OStringToOUString(aPart, rFontItem.GetCharSet())); pC->GetText().Erase( pAttr->GetStart(), pAttr->GetEnd()-pAttr->GetStart() ); pC->GetText().Insert( aNew, pAttr->GetStart() ); } |