diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-27 20:37:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:03 +0000 |
commit | 6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch) | |
tree | ba19bc4bff6ddbd87354f90a61615cf5f4892c5a /editeng | |
parent | no need for super-convoluted empty string as far as I can see (diff) | |
download | core-6f33482f8f4329b6c9874397bdb67c1b958b69c2.tar.gz core-6f33482f8f4329b6c9874397bdb67c1b958b69c2.zip |
ByteString->rtl::OUStringToOString
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 11 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 6 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 45de038ae703..678f31abad56 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1045,7 +1045,8 @@ void BinTextObject::StoreData( SvStream& rOStream ) const sal_uInt16 nParagraphs = GetContents().Count(); rOStream << nParagraphs; - char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0); + sal_Unicode nUniChar = CH_FEATURE; + char cFeatureConverted = rtl::OString(&nUniChar, 1, eEncoding).toChar(); // The individual paragraphs ... for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) @@ -1053,7 +1054,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const ContentInfo* pC = GetContents().GetObject( nPara ); // Text... - ByteString aText( pC->GetText(), eEncoding ); + ByteString aText(rtl::OUStringToOString(pC->GetText(), eEncoding)); // Symbols? sal_Bool bSymbolPara = sal_False; @@ -1062,7 +1063,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { - aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL ); + aText = rtl::OUStringToOString(pC->GetText(), RTL_TEXTENCODING_SYMBOL); bSymbolPara = sal_True; } } @@ -1078,7 +1079,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const { // Not correctly converted String aPart( pC->GetText(), pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() ); - ByteString aNew( aPart, rFontItem.GetCharSet() ); + rtl::OString aNew(rtl::OUStringToOString(aPart, rFontItem.GetCharSet())); aText.Erase( pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() ); aText.Insert( aNew, pAttr->GetStart() ); } @@ -1133,7 +1134,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const rOStream.WriteByteString( aText ); // StyleName and Family... - rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) ); + rOStream.WriteByteString( rtl::OUStringToOString(pC->GetStyle(), eEncoding) ); rOStream << (sal_uInt16)pC->GetFamily(); // Paragraph attributes ... diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 86cf0cc52b7e..cdf29dee1be1 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3637,9 +3637,9 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { DELETEZ( pStrLink ); String sTmp( sLink ); - ByteString sId( sTmp.Copy( - sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1), - RTL_TEXTENCODING_ASCII_US ); + rtl::OString sId(rtl::OUStringToOString(sTmp.Copy( + sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1), + RTL_TEXTENCODING_ASCII_US)); GraphicObject *pOldGrfObj = pImpl->pGraphicObject; pImpl->pGraphicObject = new GraphicObject( sId ); ApplyGraphicTransparency_Impl(); diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 9deaf748c23e..1040ba8ed947 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1734,8 +1734,8 @@ void GeneratePackageName ( const String& rShort, String& rPackageName ) rPackageName = rShort; xub_StrLen nPos = 0; sal_Unicode pDelims[] = { '!', '/', ':', '.', '\\', 0 }; - ByteString sByte ( rPackageName, RTL_TEXTENCODING_UTF7); - rPackageName = String (sByte, RTL_TEXTENCODING_ASCII_US); + rtl::OString sByte(rtl::OUStringToOString(rPackageName, RTL_TEXTENCODING_UTF7)); + rPackageName = rtl::OStringToOUString(sByte, RTL_TEXTENCODING_ASCII_US); while( STRING_NOTFOUND != ( nPos = rPackageName.SearchChar( pDelims, nPos ))) { rPackageName.SetChar( nPos, '_' ); |