diff options
-rw-r--r-- | automation/source/simplecm/simplecm.cxx | 6 | ||||
-rw-r--r-- | l10ntools/inc/xmlparse.hxx | 5 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 6 | ||||
-rw-r--r-- | svx/inc/svx/galtheme.hxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmpage.cxx | 1 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 37 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 37 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 27 | ||||
-rw-r--r-- | tools/inc/tools/stream.hxx | 6 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 1 |
10 files changed, 64 insertions, 64 deletions
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index 2cc5b93e26f0..b5087f244307 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_automation.hxx" - -#define ENABLE_BYTESTRING_STREAM_OPERATORS #include <tools/solar.h> #include <automation/simplecm.hxx> #include <osl/diagnose.h> @@ -286,7 +284,7 @@ void SimpleCommunicationLinkViaSocket::SetApplication( const ByteString& aApp ) { CommunicationLink::SetApplication( aApp ); SvStream* pData = GetBestCommunicationStream(); - *pData << aApp; + pData->WriteByteString(aApp); SendHandshake( CH_SetApplication, pData ); delete pData; } @@ -458,7 +456,7 @@ void CommunicationManager::CallDataReceived( CommunicationLink* pCL ) case CH_SetApplication: { ByteString aApplication; - *pData >> aApplication; + pData->ReadByteString(aApplication); pCL->CommunicationLink::SetApplication( aApplication ); #if OSL_DEBUG_LEVEL > 1 debug_printf( "Setting Application to " ); diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index 6cf49533e6fb..75db02e77bfb 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -33,9 +33,8 @@ #include <expat.h> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include "tools/string.hxx" -#define ENABLE_BYTESTRING_STREAM_OPERATORS -#include "tools/stream.hxx" +#include <tools/string.hxx> +#include <tools/stream.hxx> #include "export.hxx" #include "xmlutil.hxx" diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 9e55109cde27..04e192ffe1a4 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#define ENABLE_BYTESTRING_STREAM_OPERATORS - #include <algorithm> #include <tools/vcompat.hxx> @@ -1139,7 +1137,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) if( bLink ) { - rIStm >> aLink; + rIStm.ReadByteString(aLink); rGraphicObj.SetLink( UniString( aLink, RTL_TEXTENCODING_UTF8 ) ); } else @@ -1158,7 +1156,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink; if( bLink ) - rOStm << rtl::OUStringToOString(rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8); + rOStm.WriteByteString(rtl::OUStringToOString(rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8)); return rOStm; } diff --git a/svx/inc/svx/galtheme.hxx b/svx/inc/svx/galtheme.hxx index 2dc845d8f087..2bfdddf8ab4f 100644 --- a/svx/inc/svx/galtheme.hxx +++ b/svx/inc/svx/galtheme.hxx @@ -31,8 +31,6 @@ #include "svx/svxdllapi.h" -#define ENABLE_BYTESTRING_STREAM_OPERATORS - #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <vcl/salctype.hxx> diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 75b27ed6033a..3a99d49b0cbc 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -30,7 +30,6 @@ #include "precompiled_svx.hxx" #include <sal/macros.h> -#define ENABLE_BYTESTRING_STREAM_OPERATORS #include <svx/fmpage.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameContainer.hpp> diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 165936cae991..50d398a43711 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#define ENABLE_BYTESTRING_STREAM_OPERATORS - #include <tools/vcompat.hxx> #include <ucbhelper/content.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -44,8 +42,6 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> -#define ENABLE_BYTESTRING_STREAM_OPERATORS - // -------------- // - Namespaces - // -------------- @@ -138,13 +134,16 @@ void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ) SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry ) { - ByteString aDummy; + rOut.WriteByteString(ByteString(rEntry.aThemeName, RTL_TEXTENCODING_UTF8)); - rOut << ByteString( rEntry.aThemeName, RTL_TEXTENCODING_UTF8 ) << - ByteString( rEntry.aUIName, RTL_TEXTENCODING_UTF8 ) << - ByteString( String(rEntry.aURL.GetMainURL( INetURLObject::NO_DECODE )), RTL_TEXTENCODING_UTF8 ) << - ByteString( rEntry.aImportName, RTL_TEXTENCODING_UTF8 ) << - aDummy; + rOut.WriteByteString(ByteString(rEntry.aUIName, RTL_TEXTENCODING_UTF8)); + + rOut.WriteByteString(ByteString(String(rEntry.aURL.GetMainURL( INetURLObject::NO_DECODE )), RTL_TEXTENCODING_UTF8)); + + rOut.WriteByteString(ByteString(rEntry.aImportName, RTL_TEXTENCODING_UTF8)); + + ByteString aDummy; + rOut.WriteByteString(aDummy); return rOut; } @@ -155,11 +154,19 @@ SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry ) { ByteString aTmpStr; - rIn >> aTmpStr; rEntry.aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); - rIn >> aTmpStr; rEntry.aUIName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); - rIn >> aTmpStr; rEntry.aURL = INetURLObject( String( aTmpStr, RTL_TEXTENCODING_UTF8 ) ); - rIn >> aTmpStr; rEntry.aImportName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); - rIn >> aTmpStr; + rIn.ReadByteString(aTmpStr); + rEntry.aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); + + rIn.ReadByteString(aTmpStr); + rEntry.aUIName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); + + rIn.ReadByteString(aTmpStr); + rEntry.aURL = INetURLObject( String( aTmpStr, RTL_TEXTENCODING_UTF8 ) ); + + rIn.ReadByteString(aTmpStr); + rEntry.aImportName = String( aTmpStr, RTL_TEXTENCODING_UTF8 ); + + rIn.ReadByteString(aTmpStr); return rIn; } diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 928e060e338e..2ec60838a962 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#define ENABLE_BYTESTRING_STREAM_OPERATORS - #include <com/sun/star/lang/XUnoTunnel.hpp> #include <sfx2/objsh.hxx> #include <sfx2/docfac.hxx> @@ -172,14 +170,13 @@ void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const String aURLWithoutDestDir = String(aURL.GetMainURL( INetURLObject::NO_DECODE )); aURLWithoutDestDir.SearchAndReplace(rDestDir, String()); - rOut << ByteString( aURLWithoutDestDir, RTL_TEXTENCODING_UTF8 ); + rOut.WriteByteString(ByteString(aURLWithoutDestDir, RTL_TEXTENCODING_UTF8)); } // ------------------------------------------------------------------------ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion ) { - ByteString aTmpStr; sal_uInt32 nTmp32; sal_uInt16 nTmp16; @@ -190,7 +187,9 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion ) else rIn >> aThumbMtf; - rIn >> aTmpStr; aURL = INetURLObject( String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ) ); + ByteString aTmpStr; + rIn.ReadByteString(aTmpStr); + aURL = INetURLObject(rtl::OStringToOUString(aTmpStr,RTL_TEXTENCODING_UTF8)); } // ------------------------------------------------------------------------ @@ -293,28 +292,29 @@ void SgaObjectBmp::Init( const Graphic& rGraphic, const INetURLObject& rURL ) void SgaObjectBmp::WriteData( SvStream& rOut, const String& rDestDir ) const { - String aDummyStr; - char aDummy[ 10 ]; - // Version setzen SgaObject::WriteData( rOut, rDestDir ); + char aDummy[ 10 ]; rOut.Write( aDummy, 10 ); - rOut << ByteString( aDummyStr, RTL_TEXTENCODING_UTF8 ) << ByteString( aTitle, RTL_TEXTENCODING_UTF8 ); + String aDummyStr; + rOut.WriteByteString(rtl::OUStringToOString(aDummyStr, RTL_TEXTENCODING_UTF8)); + rOut.WriteByteString(rtl::OUStringToOString(aTitle, RTL_TEXTENCODING_UTF8)); } // ------------------------------------------------------------------------ void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) { - ByteString aTmpStr; SgaObject::ReadData( rIn, rReadVersion ); rIn.SeekRel( 10 ); // 16, 16, 32, 16 - rIn >> aTmpStr; // dummy + ByteString aTmpStr; + rIn.ReadByteString(aTmpStr); // dummy if( rReadVersion >= 5 ) { - rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); + rIn.ReadByteString(aTmpStr); + aTitle = rtl::OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); } } @@ -381,7 +381,8 @@ Bitmap SgaObjectSound::GetThumbBmp() const void SgaObjectSound::WriteData( SvStream& rOut, const String& rDestDir ) const { SgaObject::WriteData( rOut, rDestDir ); - rOut << (sal_uInt16) eSoundType << ByteString( aTitle, RTL_TEXTENCODING_UTF8 ); + rOut << (sal_uInt16) eSoundType; + rOut.WriteByteString(rtl::OUStringToOString(aTitle, RTL_TEXTENCODING_UTF8)); } // ------------------------------------------------------------------------ @@ -392,14 +393,15 @@ void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) if( rReadVersion >= 5 ) { - ByteString aTmpStr; sal_uInt16 nTmp16; rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16; if( rReadVersion >= 6 ) { - rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); + ByteString aTmpStr; + rIn.ReadByteString(aTmpStr); + aTitle = rtl::OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); } } } @@ -591,7 +593,7 @@ sal_Bool SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& r void SgaObjectSvDraw::WriteData( SvStream& rOut, const String& rDestDir ) const { SgaObject::WriteData( rOut, rDestDir ); - rOut << ByteString( aTitle, RTL_TEXTENCODING_UTF8 ); + rOut.WriteByteString(rtl::OUStringToOString(aTitle, RTL_TEXTENCODING_UTF8)); } // ------------------------------------------------------------------------ @@ -603,7 +605,8 @@ void SgaObjectSvDraw::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) if( rReadVersion >= 5 ) { ByteString aTmpStr; - rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); + rIn.ReadByteString(aTmpStr); + aTitle = rtl::OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); } } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 2926a812846e..791a2a907c09 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#define ENABLE_BYTESTRING_STREAM_OPERATORS - #include <tools/urlobj.hxx> #include <tools/vcompat.hxx> #include <unotools/streamwrap.hxx> @@ -736,9 +734,10 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa if( nVersion <= 0x00ff ) { sal_uInt32 nThemeId = 0; - ByteString aTmpStr; - *pIStm >> aTmpStr; aThemeName = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); + ByteString aTmpStr; + pIStm->ReadByteString(aTmpStr); + aThemeName = rtl::OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); // Charakterkonvertierung durchfuehren if( nVersion >= 0x0004 ) @@ -1363,7 +1362,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const sal_Bool bRel; rOStm << (sal_uInt16) 0x0004; - rOStm << ByteString( GetRealName(), RTL_TEXTENCODING_UTF8 ); + rOStm.WriteByteString(rtl::OUStringToOString(GetRealName(), RTL_TEXTENCODING_UTF8)); rOStm << nCount << (sal_uInt16) gsl_getSystemTextEncoding(); for( sal_uInt32 i = 0; i < nCount; i++ ) @@ -1402,7 +1401,9 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const } aPath.SearchAndReplace(m_aDestDir, String()); - rOStm << bRel << ByteString( aPath, RTL_TEXTENCODING_UTF8 ) << pObj->nOffset << (sal_uInt16) pObj->eObjKind; + rOStm << bRel; + rOStm.WriteByteString(rtl::OUStringToOString(aPath, RTL_TEXTENCODING_UTF8)); + rOStm << pObj->nOffset << (sal_uInt16) pObj->eObjKind; } // neuerdings wird ein 512-Byte-Reservepuffer gechrieben; @@ -1436,12 +1437,14 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) { sal_uInt32 nCount; sal_uInt16 nVersion; - ByteString aTmpStr; String aThemeName; rtl_TextEncoding nTextEncoding; aImportName = String(); - rIStm >> nVersion >> aTmpStr >> nCount; + rIStm >> nVersion; + ByteString aTmpStr; + rIStm.ReadByteString(aTmpStr); + rIStm >> nCount; if( nVersion >= 0x0004 ) { @@ -1452,7 +1455,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) else nTextEncoding = RTL_TEXTENCODING_UTF8; - aThemeName = String( aTmpStr.GetBuffer(), nTextEncoding ); + aThemeName = rtl::OStringToOUString(aTmpStr, nTextEncoding); if( nCount <= ( 1L << 14 ) ) { @@ -1480,10 +1483,12 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) String aPath; sal_uInt16 nTemp; - rIStm >> bRel >> aTempFileName >> pObj->nOffset; + rIStm >> bRel; + rIStm.ReadByteString(aTempFileName); + rIStm >> pObj->nOffset; rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp; - aFileName = String( aTempFileName.GetBuffer(), gsl_getSystemTextEncoding() ); + aFileName = rtl::OStringToOUString(aTempFileName, gsl_getSystemTextEncoding()); if( bRel ) { diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 28e96aea0e03..c320bc2ae892 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -346,9 +346,6 @@ public: SvStream& operator>>( unsigned char& rChar ); SvStream& operator>>( float& rFloat ); SvStream& operator>>( double& rDouble ); -#ifdef ENABLE_BYTESTRING_STREAM_OPERATORS - SvStream& operator>>( ByteString& rString ) { return ReadByteString(rString); } -#endif #ifdef ENABLE_STRING_STREAM_OPERATORS SvStream& operator>>( UniString& rString ) { return ReadByteString(rString); } #endif @@ -367,9 +364,6 @@ public: SvStream& operator<<( const double& rDouble ); SvStream& operator<<( const char* pBuf ); SvStream& operator<<( const unsigned char* pBuf ); -#ifdef ENABLE_BYTESTRING_STREAM_OPERATORS - SvStream& operator<<( const ByteString& rString ) { return WriteByteString( rString ); } -#endif #ifdef ENABLE_STRING_STREAM_OPERATORS SvStream& operator<<( const UniString& rString ) { return WriteByteString(rString); } #endif diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 2b9295b436a4..fb955d16ca4e 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -52,7 +52,6 @@ c >>= 4; \ c |= nSwapTmp; #include <tools/debug.hxx> -#define ENABLE_BYTESTRING_STREAM_OPERATORS #include <tools/stream.hxx> #include <osl/thread.h> #include <algorithm> |