diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-07 22:24:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-07 22:29:12 +0000 |
commit | 3b5ec68b846eb2f1eb289cc95047864e51941cf0 (patch) | |
tree | a21bbc45dd1fcfb5547ffa6c0fe4306b2240d8c7 /svtools | |
parent | 06813401fdb6bcbcaed321ff53c4601af91dbba2 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 20 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 16 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 5 | ||||
-rw-r--r-- | svtools/source/edit/syntaxhighlight.cxx | 8 | ||||
-rw-r--r-- | svtools/source/edit/texteng.cxx | 5 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 37 | ||||
-rw-r--r-- | svtools/source/filter/filter.cxx | 8 | ||||
-rw-r--r-- | svtools/source/filter/wmf/winmtf.cxx | 16 | ||||
-rw-r--r-- | svtools/source/graphic/graphicunofactory.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 10 | ||||
-rw-r--r-- | svtools/source/misc/imap.cxx | 17 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 4 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 7 | ||||
-rw-r--r-- | svtools/source/urlobj/inetimg.cxx | 6 |
15 files changed, 87 insertions, 78 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 21f306b14672..6e7370ba06ae 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -366,8 +366,8 @@ class NameTranslationEntry : public HashedEntry protected: OUString maTranslatedName; public: - inline NameTranslationEntry( const OUString& rOriginalName, const OUString& rTranslatedName ); - inline NameTranslationEntry( const ByteString& rOriginalName, const ByteString& rTranslatedName ); + inline NameTranslationEntry( const rtl::OUString& rOriginalName, const rtl::OUString& rTranslatedName ); + inline NameTranslationEntry( const rtl::OString& rOriginalName, const rtl::OString& rTranslatedName ); inline const OUString& GetTranslation() const; }; @@ -378,9 +378,9 @@ inline NameTranslationEntry::NameTranslationEntry( const OUString& rOrg, const O { } -inline NameTranslationEntry::NameTranslationEntry( const ByteString& rOrg, const ByteString& rTrans ): - HashedEntry( OUString( rOrg.GetBuffer(), rOrg.Len(), RTL_TEXTENCODING_ASCII_US ) ), - maTranslatedName( OUString( rTrans.GetBuffer(), rTrans.Len(), RTL_TEXTENCODING_UTF8 ) ) +inline NameTranslationEntry::NameTranslationEntry( const rtl::OString& rOrg, const rtl::OString& rTrans ) + : HashedEntry(rtl::OStringToOUString(rOrg, RTL_TEXTENCODING_ASCII_US)) + , maTranslatedName(rtl::OStringToOUString(rTrans, RTL_TEXTENCODING_UTF8)) { } @@ -438,12 +438,12 @@ void NameTranslationList::Init() ::ucbhelper::Content aTestContent( maTransFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() ); if( aTestContent.isDocument() ) - {// ... also tests the existence of maTransFile by throwing an Exception - const sal_Char* pSection = "TRANSLATIONNAMES"; + { + // ... also tests the existence of maTransFile by throwing an Exception String aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) ); Config aConfig( aFsysName ); - aConfig.SetGroup( ByteString( pSection ) ); + aConfig.SetGroup( rtl::OString(RTL_CONSTASCII_STRINGPARAM("TRANSLATIONNAMES")) ); sal_uInt16 nKeyCnt = aConfig.GetKeyCount(); @@ -969,7 +969,7 @@ void ViewTabListBox_Impl::DeleteEntries() SvLBoxEntry* pEntry = FirstSelected(); String aURL; - ByteString sDialogPosition; + rtl::OString sDialogPosition; while ( pEntry && ( eResult != svtools::QUERYDELETE_CANCEL ) ) { SvLBoxEntry *pCurEntry = pEntry; @@ -1005,7 +1005,7 @@ void ViewTabListBox_Impl::DeleteEntries() { INetURLObject aObj( aURL ); svtools::QueryDeleteDlg_Impl aDlg( NULL, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) ); - if ( sDialogPosition.Len() ) + if ( sDialogPosition.getLength() ) aDlg.SetWindowState( sDialogPosition ); if ( GetSelectionCount() > 1 ) diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 4387aeef5577..5baa6585a05d 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1057,9 +1057,10 @@ void FontNameBox::DataChanged( const DataChangedEvent& rDCEvt ) void FontNameBox::SaveMRUEntries( const String& aFontMRUEntriesFile, xub_Unicode cSep ) const { - ByteString aEntries = ByteString( GetMRUEntries( cSep ), RTL_TEXTENCODING_UTF8 ); + rtl::OString aEntries(rtl::OUStringToOString(GetMRUEntries(cSep), + RTL_TEXTENCODING_UTF8)); - if( ! aEntries.Len() || ! aFontMRUEntriesFile.Len() ) + if (!aEntries.getLength() || !aFontMRUEntriesFile.Len()) return; SvFileStream aStream; @@ -1067,14 +1068,14 @@ void FontNameBox::SaveMRUEntries( const String& aFontMRUEntriesFile, xub_Unicode if( ! (aStream.IsOpen() && aStream.IsWritable()) ) { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontNameBox::SaveMRUEntries: opening mru entries file %s failed\n", ByteString(aFontMRUEntriesFile , RTL_TEXTENCODING_UTF8 ).GetBuffer() ); + fprintf( stderr, "FontNameBox::SaveMRUEntries: opening mru entries file %s failed\n", rtl::OUStringToOString(aFontMRUEntriesFile, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif return; } aStream.SetLineDelimiter( LINEEND_LF ); aStream.WriteLine( aEntries ); - aStream.WriteLine( ByteString() ); + aStream.WriteLine( rtl::OString() ); } // ------------------------------------------------------------------- @@ -1088,14 +1089,15 @@ void FontNameBox::LoadMRUEntries( const String& aFontMRUEntriesFile, xub_Unicode if( ! aStream.IsOpen() ) { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontNameBox::LoadMRUEntries: opening mru entries file %s failed\n", ByteString( aFontMRUEntriesFile, RTL_TEXTENCODING_UTF8 ).GetBuffer() ); + fprintf( stderr, "FontNameBox::LoadMRUEntries: opening mru entries file %s failed\n", rtl::OUStringToOString(aFontMRUEntriesFile, RTL_TEXTENCODING_UTF8).getStr() ); #endif return; } - ByteString aLine; + rtl::OString aLine; aStream.ReadLine( aLine ); - XubString aEntries = XubString( aLine, RTL_TEXTENCODING_UTF8 ); + rtl::OUString aEntries = rtl::OStringToOUString(aLine, + RTL_TEXTENCODING_UTF8); SetMRUEntries( aEntries, cSep ); } diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 83f624435a77..dc736486ef9b 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -917,11 +917,12 @@ long FontSizeNames::Name2Size( const String& rName ) const { if ( mnElem ) { - ByteString aName( rName, RTL_TEXTENCODING_UTF8 ); + rtl::OString aName(rtl::OUStringToOString(rName, + RTL_TEXTENCODING_UTF8)); // linear search is sufficient for this rare case for( long i = mnElem; --i >= 0; ) - if ( aName == mpArray[i].mszUtf8Name ) + if ( aName.equals(mpArray[i].mszUtf8Name) ) return mpArray[i].mnSize; } diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx index dc4e9a3728be..31712f1f8068 100644 --- a/svtools/source/edit/syntaxhighlight.cxx +++ b/svtools/source/edit/syntaxhighlight.cxx @@ -434,14 +434,14 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType, if( bCanBeKeyword ) { String aKWString(rpStartPos, sal::static_int_cast< xub_StrLen >(nCount) ); - ByteString aByteStr( aKWString, RTL_TEXTENCODING_ASCII_US ); - aByteStr.ToLowerAscii(); - if ( bsearch( aByteStr.GetBuffer(), ppListKeyWords, nKeyWordCount, sizeof( char* ), + rtl::OString aByteStr = rtl::OUStringToOString(aKWString, + RTL_TEXTENCODING_ASCII_US).toAsciiLowerCase(); + if ( bsearch( aByteStr.getStr(), ppListKeyWords, nKeyWordCount, sizeof( char* ), compare_strings ) ) { reType = TT_KEYWORDS; - if ( aByteStr.Equals( "rem" ) ) + if (aByteStr.equalsL(RTL_CONSTASCII_STRINGPARAM("rem"))) { // Alle Zeichen bis Zeilen-Ende oder EOF entfernen sal_Unicode cPeek = peekChar(); diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx index b44243e7b87d..1d595c824ff9 100644 --- a/svtools/source/edit/texteng.cxx +++ b/svtools/source/edit/texteng.cxx @@ -2586,7 +2586,7 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) if ( aSel.HasRange() ) aSel = ImpDeleteText( aSel ); - ByteString aLine; + rtl::OString aLine; sal_Bool bDone = rInput.ReadLine( aLine ); String aTmpStr( aLine, rInput.GetStreamCharSet() ), aStr; while ( bDone ) @@ -2687,7 +2687,8 @@ sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bo aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "</P>" ) ); } - rOutput.WriteLine( ByteString( aText, rOutput.GetStreamCharSet() ) ); + rOutput.WriteLine(rtl::OUStringToOString(aText, + rOutput.GetStreamCharSet())); } if ( bHTML ) diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 47a7a690153f..4495302ba10b 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -87,43 +87,42 @@ using namespace ::com::sun::star; -static sal_Int16 GetFilterFormat( String& rExt ) +static sal_Int16 GetFilterFormat(const rtl::OUString& rExt) { sal_Int16 nFormat = FORMAT_UNKNOWN; - ByteString aExt( rExt, RTL_TEXTENCODING_UTF8 ); - if ( aExt.Equals( "JPG" ) ) + if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("JPG"))) nFormat = FORMAT_JPG; - else if ( aExt.Equals( "PNG" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PNG"))) nFormat = FORMAT_PNG; - else if ( aExt.Equals( "BMP" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BMP"))) nFormat = FORMAT_BMP; - else if ( aExt.Equals( "GIF" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GIF"))) nFormat = FORMAT_GIF; - else if ( aExt.Equals( "PBM" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PBM"))) nFormat = FORMAT_PBM; - else if ( aExt.Equals( "PGM" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PGM"))) nFormat = FORMAT_PGM; - else if ( aExt.Equals( "PPM" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PPM"))) nFormat = FORMAT_PPM; - else if ( aExt.Equals( "PCT" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PCT"))) nFormat = FORMAT_PCT; - else if ( aExt.Equals( "RAS" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("RAS"))) nFormat = FORMAT_RAS; - else if ( aExt.Equals( "TIF" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TIF"))) nFormat = FORMAT_TIF; - else if ( aExt.Equals( "XPM" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XPM"))) nFormat = FORMAT_XPM; - else if ( aExt.Equals( "WMF" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("WMF"))) nFormat = FORMAT_WMF; - else if ( aExt.Equals( "EMF" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EMF"))) nFormat = FORMAT_EMF; - else if ( aExt.Equals( "EPS" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EPS"))) nFormat = FORMAT_EPS; - else if ( aExt.Equals( "MET" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MET"))) nFormat = FORMAT_MET; - else if ( aExt.Equals( "SVG" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SVG"))) nFormat = FORMAT_SVG; - else if ( aExt.Equals( "SVM" ) ) + else if (rExt.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SVM"))) nFormat = FORMAT_SVM; return nFormat; } diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index 9bd08214b3a2..a6385a9bb26a 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -2180,7 +2180,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) if( pData ) { sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; - ByteString aShortName; + rtl::OString aShortName; switch( pData->mnFormat ) { case( CVT_BMP ): aShortName = BMP_SHORTNAME; break; @@ -2201,13 +2201,13 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) if( GRAPHIC_NONE == pData->maGraphic.GetType() || pData->maGraphic.GetContext() ) // Import { // Import - nFormat = GetImportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + nFormat = GetImportFormatNumberForShortName( rtl::OStringToOUString( aShortName, RTL_TEXTENCODING_UTF8) ); nRet = ImportGraphic( pData->maGraphic, String(), pData->mrStm, nFormat ) == 0; } - else if( aShortName.Len() ) + else if( aShortName.getLength() ) { // Export - nFormat = GetExportFormatNumberForShortName( String( aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + nFormat = GetExportFormatNumberForShortName( rtl::OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) ); nRet = ExportGraphic( pData->maGraphic, String(), pData->mrStm, nFormat ) == 0; } } diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx index c830afdcc96c..ff928eef393c 100644 --- a/svtools/source/filter/wmf/winmtf.cxx +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -38,6 +38,7 @@ #include <vcl/canvastools.hxx> #include <vcl/metric.hxx> #include <vcl/svapp.hxx> +#include <rtl/strbuf.hxx> #include <rtl/tencinfo.h> // ------------------------------------------------------------------------ @@ -289,14 +290,13 @@ void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) { if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) { - ByteString aText( "WMF/EMF Import: " ); - if ( pAction ) - { - ByteString aAction( pAction ); - aText.Append( aAction ); - } - aText.Append( " needs to be implemented (SJ)" ); - DBG_ASSERT( 0, aText.GetBuffer() ); + rtl::OStringBuffer aText(RTL_CONSTASCII_STRINGPARAM( + "WMF/EMF Import: ")); + if (pAction) + aText.append(pAction); + aText.append(RTL_CONSTASCII_STRINGPARAM( + " needs to be implemented")); + DBG_ASSERT( 0, aText.getStr() ); } nAssertCount++; } diff --git a/svtools/source/graphic/graphicunofactory.cxx b/svtools/source/graphic/graphicunofactory.cxx index bfa77d15ae19..25b8fe89bdcb 100644 --- a/svtools/source/graphic/graphicunofactory.cxx +++ b/svtools/source/graphic/graphicunofactory.cxx @@ -63,7 +63,7 @@ GObjectImpl::GObjectImpl( uno::Sequence< uno::Any > const & args, uno::Reference rtl::OUString sId; if ( !( args[ 0 ] >>= sId ) || sId.getLength() == 0 ) throw lang::IllegalArgumentException(); - ByteString bsId( sId.getStr(), RTL_TEXTENCODING_UTF8 ); + rtl::OString bsId(rtl::OUStringToOString(sId, RTL_TEXTENCODING_UTF8)); mpGObject.reset( new GraphicObject( bsId ) ); } else diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 52621ac5f43e..613fd3d64858 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -1161,7 +1161,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink; if( bLink ) - rOStm << ByteString( rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8 ); + rOStm << rtl::OUStringToOString(rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8); return rOStm; } @@ -1174,7 +1174,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString & if( aURL.Search( aPrefix ) == 0 ) { // graphic manager url - ByteString aUniqueID( String(rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 )), RTL_TEXTENCODING_UTF8 ); + rtl::OString aUniqueID(rtl::OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX) - 1), RTL_TEXTENCODING_UTF8)); return GraphicObject( aUniqueID ); } else diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index a8785a5381b1..7807ffe24733 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -163,8 +163,9 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( co { // graphic manager url String aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) ); - ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 ); - GraphicObject aGrafObj( aUniqueID ); + rtl::OString aUniqueID(rtl::OUStringToOString(aTmpStr, + RTL_TEXTENCODING_UTF8)); + GraphicObject aGrafObj(aUniqueID); // I don't call aGrafObj.GetXGraphic because it will call us back // into implLoadMemory ( with "private:memorygraphic" test ) ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic; @@ -288,9 +289,10 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const : if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:resource" ) ) ) { - ByteString aResMgrName( String( rResourceURL.getToken( 0, '/', nIndex ) ), RTL_TEXTENCODING_ASCII_US ); + rtl::OString aResMgrName(rtl::OUStringToOString( + rResourceURL.getToken(0, '/', nIndex), RTL_TEXTENCODING_ASCII_US)); - ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILocale() ); if( pResMgr ) { diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 59d1085e9d81..3b99c97dc062 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -104,17 +104,18 @@ void IMapObject::Write( SvStream& rOStm, const String& rBaseURL ) const rOStm << GetVersion(); rOStm << ( (sal_uInt16) eEncoding ); - const ByteString aRelURL = ByteString( String(URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL )), eEncoding ); - rOStm.WriteByteString( aRelURL ); - rOStm.WriteByteString( ByteString( aAltText, eEncoding ) ); + const rtl::OString aRelURL = rtl::OUStringToOString( + URIHelper::simpleNormalizedMakeRelative(rBaseURL, aURL), eEncoding); + rOStm.WriteByteString(aRelURL); + rOStm.WriteByteString(rtl::OUStringToOString(aAltText, eEncoding)); rOStm << bActive; - rOStm.WriteByteString( ByteString( aTarget, eEncoding ) ); + rOStm.WriteByteString(rtl::OUStringToOString(aTarget, eEncoding)); pCompat = new IMapCompat( rOStm, STREAM_WRITE ); WriteIMapObject( rOStm ); aEventList.Write( rOStm ); // V4 - rOStm.WriteByteString( ByteString( aName, eEncoding ) ); // V5 + rOStm.WriteByteString(rtl::OUStringToOString(aName, eEncoding)); // V5 delete pCompat; } @@ -1128,10 +1129,10 @@ void ImageMap::Write( SvStream& rOStm, const String& rBaseURL ) const // MagicCode schreiben rOStm << IMAPMAGIC; rOStm << GetVersion(); - rOStm.WriteByteString( ByteString( aImageName, eEncoding ) ); - rOStm.WriteByteString( ByteString( aDummy, eEncoding ) ); + rOStm.WriteByteString(rtl::OUStringToOString(aImageName, eEncoding)); + rOStm.WriteByteString(rtl::OUStringToOString(aDummy, eEncoding)); rOStm << nCount; - rOStm.WriteByteString( ByteString( aImageName, eEncoding ) ); + rOStm.WriteByteString(rtl::OUStringToOString(aImageName, eEncoding)); pCompat = new IMapCompat( rOStm, STREAM_WRITE ); diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index da7ff07fc92e..c30dd849810f 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -648,7 +648,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( pObj ) { const sal_Char *pShape = 0; - ByteString aCoords; + rtl::OString aCoords; switch( pObj->GetType() ) { case( IMAP_OBJ_RECTANGLE ): @@ -956,7 +956,7 @@ rtl::OString HTMLOutFuncs::CreateTableDataOptionsValNum( // printf / scanf ist zu ungenau String aValStr; rFormatter.GetInputLineString( fVal, 0, aValStr ); - ByteString sTmp( aValStr, eDestEnc ); + rtl::OString sTmp(rtl::OUStringToOString(aValStr, eDestEnc)); aStrTD.append(' '). append(OOO_STRING_SVTOOLS_HTML_O_SDval). append(RTL_CONSTASCII_STRINGPARAM("=\"")). diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 8ec3503303e8..17f092d891af 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1927,7 +1927,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader, sTmp.append( cUC < 256U ? (sal_Char)cUC : '.' ); } - sCmp = ByteString( sTmp.makeStringAndClear() ); + sCmp = sTmp.makeStringAndClear(); } else { @@ -2270,9 +2270,10 @@ rtl_TextEncoding HTMLParser::GetEncodingByMIME( const String& rMime ) = aParameters.find("charset"); if (pCharset != 0) { - ByteString sValue( pCharset->m_sValue, RTL_TEXTENCODING_ASCII_US ); + rtl::OString sValue(rtl::OUStringToOString(pCharset->m_sValue, + RTL_TEXTENCODING_ASCII_US)); return GetExtendedCompatibilityTextEncoding( - rtl_getTextEncodingFromMimeCharset( sValue.GetBuffer() ) ); + rtl_getTextEncodingFromMimeCharset( sValue.getStr() ) ); } } return RTL_TEXTENCODING_DONTKNOW; diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 05159f3facb2..aa8dfb37970a 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -51,9 +51,11 @@ sal_Bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const sString += String::CreateFromInt32( aSizePixel.Width() ); sString += TOKEN_SEPARATOR; sString += String::CreateFromInt32( aSizePixel.Height() ); - ByteString sOut( sString, RTL_TEXTENCODING_UTF8 ); - rOStm.Write( sOut.GetBuffer(), sOut.Len() ); + rtl::OString sOut(rtl::OUStringToOString(sString, + RTL_TEXTENCODING_UTF8)); + + rOStm.Write(sOut.getStr(), sOut.getLength()); static const sal_Char aEndChar[2] = { 0 }; rOStm.Write( aEndChar, sizeof( aEndChar )); bRet = 0 == rOStm.GetError(); |