diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /tools | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'tools')
41 files changed, 701 insertions, 706 deletions
diff --git a/tools/inc/tools/StringListResource.hxx b/tools/inc/tools/StringListResource.hxx index 3497d07f29e4..52f22e48a8ef 100644 --- a/tools/inc/tools/StringListResource.hxx +++ b/tools/inc/tools/StringListResource.hxx @@ -29,7 +29,7 @@ namespace tools class StringListResource : public Resource { public: - StringListResource(const ResId& _aResId,::std::vector< ::rtl::OUString>& _rToFill ) : Resource(_aResId) + StringListResource(const ResId& _aResId,::std::vector< OUString>& _rToFill ) : Resource(_aResId) { sal_uInt16 i = 1; while( IsAvailableRes(ResId(i,*m_pResMgr).SetRT(RSC_STRING)) ) diff --git a/tools/inc/tools/appendunixshellword.hxx b/tools/inc/tools/appendunixshellword.hxx index 6461fdb020f4..e5099bdc20c8 100644 --- a/tools/inc/tools/appendunixshellword.hxx +++ b/tools/inc/tools/appendunixshellword.hxx @@ -41,7 +41,7 @@ namespace tools { the text to add */ TOOLS_DLLPUBLIC void appendUnixShellWord( - rtl::OStringBuffer * accumulator, rtl::OString const & text); + OStringBuffer * accumulator, OString const & text); } #endif diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx index ffbc542cd172..d3a2c2f2cff5 100644 --- a/tools/inc/tools/bigint.hxx +++ b/tools/inc/tools/bigint.hxx @@ -66,7 +66,7 @@ public: BigInt( sal_uInt16 nVal ); BigInt( sal_uInt32 nVal ); BigInt( const BigInt& rBigInt ); - BigInt( const rtl::OUString& rString ); + BigInt( const OUString& rString ); #ifdef _TLBIGINT_INT64 BigInt( const SbxINT64 &r ); BigInt( const SbxUINT64 &r ); @@ -80,7 +80,7 @@ public: operator sal_uIntPtr() const; void Set( sal_Bool bSet ) { bIsSet = bSet; } - rtl::OUString GetString() const; + OUString GetString() const; sal_Bool IsSet() const { return bIsSet; } sal_Bool IsNeg() const; diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx index 5c64f49b3d46..1e73d32b5a33 100644 --- a/tools/inc/tools/config.hxx +++ b/tools/inc/tools/config.hxx @@ -28,8 +28,8 @@ struct ImplGroupData; class TOOLS_DLLPUBLIC Config { private: - rtl::OUString maFileName; - rtl::OString maGroupName; + OUString maFileName; + OString maGroupName; ImplConfigData* mpData; ImplGroupData* mpActGroup; sal_uIntPtr mnDataUpdateId; @@ -43,25 +43,25 @@ private: #endif public: - Config( const rtl::OUString& rFileName ); + Config( const OUString& rFileName ); ~Config(); - const rtl::OUString& GetPathName() const { return maFileName; } + const OUString& GetPathName() const { return maFileName; } - void SetGroup(const rtl::OString& rGroup); - const rtl::OString& GetGroup() const { return maGroupName; } - void DeleteGroup(const rtl::OString& rGroup); - rtl::OString GetGroupName(sal_uInt16 nGroup) const; + void SetGroup(const OString& rGroup); + const OString& GetGroup() const { return maGroupName; } + void DeleteGroup(const OString& rGroup); + OString GetGroupName(sal_uInt16 nGroup) const; sal_uInt16 GetGroupCount() const; - sal_Bool HasGroup(const rtl::OString& rGroup) const; + sal_Bool HasGroup(const OString& rGroup) const; - rtl::OString ReadKey(const rtl::OString& rKey) const; - rtl::OUString ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const; - rtl::OString ReadKey(const rtl::OString& rKey, const rtl::OString& rDefault) const; - void WriteKey(const rtl::OString& rKey, const rtl::OString& rValue); - void DeleteKey(const rtl::OString& rKey); - rtl::OString GetKeyName(sal_uInt16 nKey) const; - rtl::OString ReadKey(sal_uInt16 nKey) const; + OString ReadKey(const OString& rKey) const; + OUString ReadKey(const OString& rKey, rtl_TextEncoding eEncoding) const; + OString ReadKey(const OString& rKey, const OString& rDefault) const; + void WriteKey(const OString& rKey, const OString& rValue); + void DeleteKey(const OString& rKey); + OString GetKeyName(sal_uInt16 nKey) const; + OString ReadKey(sal_uInt16 nKey) const; sal_uInt16 GetKeyCount() const; sal_Bool IsLocked() const { return (mnLockCount != 0); } diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index 84afc7bf3fe6..261c0aecaf6d 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -46,17 +46,17 @@ */ #define DBG_UNHANDLED_EXCEPTION() \ ::com::sun::star::uno::Any caught( ::cppu::getCaughtException() ); \ - ::rtl::OString sMessage( "caught an exception!" ); \ + OString sMessage( "caught an exception!" ); \ sMessage += "\nin function:"; \ sMessage += BOOST_CURRENT_FUNCTION; \ sMessage += "\ntype: "; \ - sMessage += ::rtl::OUStringToOString( caught.getValueTypeName(), osl_getThreadTextEncoding() ); \ + sMessage += OUStringToOString( caught.getValueTypeName(), osl_getThreadTextEncoding() ); \ ::com::sun::star::uno::Exception exception; \ caught >>= exception; \ if ( !exception.Message.isEmpty() ) \ { \ sMessage += "\nmessage: "; \ - sMessage += ::rtl::OUStringToOString( exception.Message, osl_getThreadTextEncoding() ); \ + sMessage += OUStringToOString( exception.Message, osl_getThreadTextEncoding() ); \ } \ if ( exception.Context.is() ) \ { \ @@ -70,7 +70,7 @@ if ( caught >>= specialized ) \ { \ sMessage += "\ndetails: "; \ - sMessage += ::rtl::OUStringToOString( \ + sMessage += OUStringToOString( \ specialized.Details, osl_getThreadTextEncoding() ); \ } \ } \ @@ -79,7 +79,7 @@ if ( caught >>= specialized ) \ { \ sMessage += "\ndetails: "; \ - sMessage += ::rtl::OString::valueOf( specialized.ErrCode ); \ + sMessage += OString::valueOf( specialized.ErrCode ); \ } \ } \ sMessage += "\n"; \ diff --git a/tools/inc/tools/getprocessworkingdir.hxx b/tools/inc/tools/getprocessworkingdir.hxx index 16eedfe1b8cd..af529b8edda2 100644 --- a/tools/inc/tools/getprocessworkingdir.hxx +++ b/tools/inc/tools/getprocessworkingdir.hxx @@ -32,7 +32,7 @@ namespace tools { // @param rUrl // Receives the directory URL (with or without a final slash) upon successful // return, and the empty string upon unsuccessful return -TOOLS_DLLPUBLIC bool getProcessWorkingDir(rtl::OUString& rUrl); +TOOLS_DLLPUBLIC bool getProcessWorkingDir(OUString& rUrl); } diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx index 53f097f60c6e..ad04f9e12445 100644 --- a/tools/inc/tools/inetmime.hxx +++ b/tools/inc/tools/inetmime.hxx @@ -488,7 +488,7 @@ public: static void writeHeaderFieldBody(INetMIMEOutputSink & rSink, HeaderFieldType eType, - const rtl::OUString& rBody, + const OUString& rBody, rtl_TextEncoding ePreferredEncoding, bool bInitialSpace = true); @@ -497,8 +497,8 @@ public: rtl_TextEncoding eEncoding, sal_uInt32 & rCharacter); - static rtl::OUString decodeHeaderFieldBody(HeaderFieldType eType, - const rtl::OString& rBody); + static OUString decodeHeaderFieldBody(HeaderFieldType eType, + const OString& rBody); // #i70651#: Prevent warnings on Mac OS X. #ifdef MACOSX @@ -926,13 +926,13 @@ public: /** Write a sequence of octets. - @param rOctets A rtl::OString, interpreted as a sequence of octets. + @param rOctets A OString, interpreted as a sequence of octets. @param nBegin The offset of the first character to write. @param nEnd The offset past the last character to write. */ - void write(const rtl::OString& rOctets, xub_StrLen nBegin, + void write(const OString& rOctets, xub_StrLen nBegin, xub_StrLen nEnd) { writeSequence(rOctets.getStr() + nBegin, rOctets.getStr() + nEnd); @@ -959,11 +959,11 @@ public: /** Write a sequence of octets. - @param rOctets A rtl::OString, interpreted as a sequence of octets. + @param rOctets A OString, interpreted as a sequence of octets. @return This instance. */ - INetMIMEOutputSink & operator <<(const rtl::OString& rOctets) + INetMIMEOutputSink & operator <<(const OString& rOctets) { writeSequence(rOctets.getStr(), rOctets.getStr() + rOctets.getLength()); m_nColumn += rOctets.getLength(); @@ -1047,7 +1047,7 @@ inline void INetMIME::writeEscapeSequence(INetMIMEOutputSink & rSink, class INetMIMEStringOutputSink: public INetMIMEOutputSink { - rtl::OStringBuffer m_aBuffer; + OStringBuffer m_aBuffer; using INetMIMEOutputSink::writeSequence; @@ -1062,7 +1062,7 @@ public: virtual ErrCode getError() const; - rtl::OString takeBuffer() + OString takeBuffer() { return m_aBuffer.makeStringAndClear(); } @@ -1178,17 +1178,17 @@ struct INetContentTypeParameter will only be one item for the complete parameter, with the attribute name lacking any section suffix. */ - const rtl::OString m_sAttribute; + const OString m_sAttribute; /** The optional character set specification (see RFC 2231), in US-ASCII encoding and converted to lower case. */ - const rtl::OString m_sCharset; + const OString m_sCharset; /** The optional language specification (see RFC 2231), in US-ASCII encoding and converted to lower case. */ - const rtl::OString m_sLanguage; + const OString m_sLanguage; /** The attribute value. If the value is a quoted-string, it is 'unpacked.' If a character set is specified, and the value can be @@ -1207,7 +1207,7 @@ struct INetContentTypeParameter within Unicode's Private Use Area (effectively adding 0xF800 to the character's numeric value). */ - const rtl::OUString m_sValue; + const OUString m_sValue; /** This is true if the value is successfuly converted to Unicode, and false if the value is a special mixture of ISO-LATIN-1 characters and @@ -1215,9 +1215,9 @@ struct INetContentTypeParameter */ const bool m_bConverted; - INetContentTypeParameter(const rtl::OString& rTheAttribute, - const rtl::OString& rTheCharset, const rtl::OString& rTheLanguage, - const rtl::OUString& rTheValue, bool bTheConverted) + INetContentTypeParameter(const OString& rTheAttribute, + const OString& rTheCharset, const OString& rTheLanguage, + const OUString& rTheValue, bool bTheConverted) : m_sAttribute(rTheAttribute) , m_sCharset(rTheCharset) , m_sLanguage(rTheLanguage) @@ -1248,7 +1248,7 @@ public: return &(maEntries[nIndex]); } - const INetContentTypeParameter * find(const rtl::OString& rAttribute) const; + const INetContentTypeParameter * find(const OString& rAttribute) const; private: diff --git a/tools/inc/tools/lineend.hxx b/tools/inc/tools/lineend.hxx index b9ee807ffa30..d4c75af92049 100644 --- a/tools/inc/tools/lineend.hxx +++ b/tools/inc/tools/lineend.hxx @@ -45,8 +45,8 @@ inline LineEnd GetSystemLineEnd() #endif } -TOOLS_DLLPUBLIC rtl::OString convertLineEnd(const rtl::OString &rIn, LineEnd eLineEnd); -TOOLS_DLLPUBLIC rtl::OUString convertLineEnd(const rtl::OUString &rIn, LineEnd eLineEnd); +TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd); +TOOLS_DLLPUBLIC OUString convertLineEnd(const OUString &rIn, LineEnd eLineEnd); #endif diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx index b0ae1e3fcdac..678fc94a998a 100644 --- a/tools/inc/tools/multisel.hxx +++ b/tools/inc/tools/multisel.hxx @@ -104,7 +104,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator sal_Int32 mnOffset; bool mbValidInput; - bool setRange( const rtl::OUString& i_rNewRange, bool i_bStrict = false ); + bool setRange( const OUString& i_rNewRange, bool i_bStrict = false ); bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool bMayAdjust ); bool insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers, bool i_bStrict ); bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const; @@ -135,7 +135,7 @@ public: friend class StringRangeEnumerator::Iterator; - StringRangeEnumerator( const rtl::OUString& i_rInput, + StringRangeEnumerator( const OUString& i_rInput, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset = -1 @@ -172,7 +172,7 @@ public: - single number that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be ignored - range that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be adjusted */ - static bool getRangesFromString( const rtl::OUString& i_rPageRange, + static bool getRangesFromString( const OUString& i_rPageRange, std::vector< sal_Int32 >& o_rPageVector, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx index 8ee386474214..a043db47d4d5 100644 --- a/tools/inc/tools/rc.hxx +++ b/tools/inc/tools/rc.hxx @@ -69,10 +69,10 @@ protected: sal_Int16 ReadShortRes() { return m_pResMgr->ReadShort(); } // read a string from resource data and increment pointer - rtl::OUString ReadStringRes() + OUString ReadStringRes() { return m_pResMgr->ReadString(); } // read a byte string from resource data and increment pointer - rtl::OString ReadByteStringRes() + OString ReadByteStringRes() { return m_pResMgr->ReadByteString(); } // free the resource from m_pResMgr's stack (pass this ptr for validation) diff --git a/tools/inc/tools/resary.hxx b/tools/inc/tools/resary.hxx index df40eb9df236..515dd779120b 100644 --- a/tools/inc/tools/resary.hxx +++ b/tools/inc/tools/resary.hxx @@ -32,10 +32,10 @@ class TOOLS_DLLPUBLIC ResStringArray : private boost::noncopyable private: struct ImplResStringItem { - rtl::OUString m_aStr; + OUString m_aStr; long m_nValue; - ImplResStringItem( const rtl::OUString& rStr, long nValue = 0 ) : + ImplResStringItem( const OUString& rStr, long nValue = 0 ) : m_aStr( rStr ), m_nValue( nValue ) {} @@ -47,8 +47,8 @@ public: ResStringArray( const ResId& rResId ); ~ResStringArray(); - const rtl::OUString GetString( sal_uInt32 nIndex ) const - { return (nIndex < m_aStrings.size()) ? m_aStrings[nIndex].m_aStr : rtl::OUString(); } + const OUString GetString( sal_uInt32 nIndex ) const + { return (nIndex < m_aStrings.size()) ? m_aStrings[nIndex].m_aStr : OUString(); } long GetValue( sal_uInt32 nIndex ) const { return (nIndex < m_aStrings.size()) ? m_aStrings[nIndex].m_nValue : -1; } sal_uInt32 Count() const { return sal_uInt32(m_aStrings.size()); } diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx index 1319bfed523e..14c0a11915f7 100644 --- a/tools/inc/tools/resid.hxx +++ b/tools/inc/tools/resid.hxx @@ -147,8 +147,8 @@ public: sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; } RSHEADER_TYPE* GetpResource() const { return m_pResource; } - TOOLS_DLLPUBLIC rtl::OUString toString() const; - TOOLS_DLLPUBLIC operator rtl::OUString() const { return toString(); } + TOOLS_DLLPUBLIC OUString toString() const; + TOOLS_DLLPUBLIC operator OUString() const { return toString(); } }; #endif diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index 3b500b9163ed..603a2c7a2eb5 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -45,7 +45,7 @@ public: inline sal_uInt32 GetLocalOff(); ///< Local offset }; -typedef rtl::OUString (*ResHookProc)( const rtl::OUString& rStr ); +typedef OUString (*ResHookProc)( const OUString& rStr ); // Initialization #define RC_NOTYPE 0x00 @@ -92,7 +92,7 @@ private: { return (((int)nOff >= nCurStack) ? NULL : &aStack[nCurStack-nOff]); } - TOOLS_DLLPRIVATE void Init( const rtl::OUString& rFileName ); + TOOLS_DLLPRIVATE void Init( const OUString& rFileName ); TOOLS_DLLPRIVATE ResMgr( InternalResMgr * pImp ); @@ -162,7 +162,7 @@ public: /// Return a string and its length out of the resource static sal_uInt32 GetString( OUString& rStr, const sal_uInt8* pStr ); /// Return a byte string and its length out of the resource - static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr ); + static sal_uInt32 GetByteString( OString& rStr, const sal_uInt8* pStr ); /// Return the size of a string in the resource static sal_uInt32 GetStringSize( sal_uInt32 nLen ) @@ -183,15 +183,15 @@ public: sal_uInt32 GetRemainSize(); - const rtl::OUString& GetFileName() const; + const OUString& GetFileName() const; sal_Int16 ReadShort(); sal_Int32 ReadLong(); OUString ReadString(); - rtl::OString ReadByteString(); + OString ReadByteString(); /// Generate auto help ID for current resource stack - rtl::OString GetAutoHelpId(); + OString GetAutoHelpId(); static void SetReadStringHook( ResHookProc pProc ); static ResHookProc GetReadStringHook(); diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx index 78021bf92dcc..667454c6150c 100644 --- a/tools/inc/tools/simplerm.hxx +++ b/tools/inc/tools/simplerm.hxx @@ -64,7 +64,7 @@ public: an existent string @seealso IsAvailable */ - rtl::OUString ReadString( sal_uInt32 nId ); + OUString ReadString( sal_uInt32 nId ); /** checks whether a certain resource is availble @param _resourceType diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index bad7f6fe0421..78a0bc3df96f 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -234,7 +234,7 @@ private: CharSet eStreamCharSet; // Encryption - rtl::OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0 -> Encryption used + OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0 -> Encryption used unsigned char nCryptMask; // Userdata @@ -291,8 +291,8 @@ public: { nCompressMode = nNewMode; } sal_uInt16 GetCompressMode() const { return nCompressMode; } - void SetCryptMaskKey(const rtl::OString& rCryptMaskKey); - const rtl::OString& GetCryptMaskKey() const { return m_aCryptMaskKey; } + void SetCryptMaskKey(const OString& rCryptMaskKey); + const OString& GetCryptMaskKey() const { return m_aCryptMaskKey; } void SetStreamCharSet( CharSet eCharSet ) { eStreamCharSet = eCharSet; } @@ -363,8 +363,8 @@ public: @endcode causing endless loops ... */ - sal_Bool ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE ); - sal_Bool WriteLine( const rtl::OString& rStr ); + sal_Bool ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE ); + sal_Bool WriteLine( const OString& rStr ); /** Read a line of bytes. @@ -380,7 +380,7 @@ public: @endcode causing endless loops ... */ - sal_Bool ReadByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, + sal_Bool ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead = 0xFFFE ); sal_Bool ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet ); sal_Bool WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet ); @@ -413,15 +413,15 @@ public: @endcode causing endless loops ... */ - sal_Bool ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepointsToRead = 0xFFFE ); + sal_Bool ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead = 0xFFFE ); /** Read a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise read a 16bit length prefixed sequence of bytes and convert from eSrcCharSet */ - rtl::OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet); + OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet); /** Write a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise convert to eSrcCharSet and write a 16bit length prefixed sequence of bytes */ - SvStream& WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet ); + SvStream& WriteUniOrByteString( const OUString& rStr, rtl_TextEncoding eDestCharSet ); /** Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise read a line of Bytecode and convert from eSrcCharSet @@ -438,7 +438,7 @@ public: @endcode causing endless loops ... */ - sal_Bool ReadUniOrByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, + sal_Bool ReadUniOrByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxCodepointsToRead = 0xFFFE ); /** Write a sequence of Unicode characters if eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write a sequence of @@ -514,28 +514,28 @@ TOOLS_DLLPUBLIC SvStream& endlu( SvStream& rStr ); /// call endlu() if eStreamCharSet==RTL_TEXTECODING_UNICODE otherwise endl() TOOLS_DLLPUBLIC SvStream& endlub( SvStream& rStr ); -/// Attempt to read nUnits 8bit units to an OString, returned rtl::OString's +/// Attempt to read nUnits 8bit units to an OString, returned OString's /// length is number of units successfully read -TOOLS_DLLPUBLIC rtl::OString read_uInt8s_ToOString(SvStream& rStrm, +TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream& rStrm, sal_Size nUnits); /// Attempt to read nUnits 8bit units to an OUString -TOOLS_DLLPUBLIC inline rtl::OUString read_uInt8s_ToOUString(SvStream& rStrm, +TOOLS_DLLPUBLIC inline OUString read_uInt8s_ToOUString(SvStream& rStrm, sal_Size nUnits, rtl_TextEncoding eEnc) { - return rtl::OStringToOUString(read_uInt8s_ToOString(rStrm, nUnits), eEnc); + return OStringToOUString(read_uInt8s_ToOString(rStrm, nUnits), eEnc); } /// Attempt to read nUnits 16bit units to an OUString, returned -/// rtl::OUString's length is number of units successfully read -TOOLS_DLLPUBLIC rtl::OUString read_uInt16s_ToOUString(SvStream& rStrm, +/// OUString's length is number of units successfully read +TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream& rStrm, sal_Size nUnits); /// Attempt to read a pascal-style length (of type prefix) prefixed sequence of -/// 16bit units to an OUString, returned rtl::OString's length is number of +/// 16bit units to an OUString, returned OString's length is number of /// units successfully read. template<typename prefix> -rtl::OUString read_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm) +OUString read_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm) { prefix nUnits = 0; rStrm >> nUnits; @@ -545,10 +545,10 @@ rtl::OUString read_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm) /// Attempt to write a prefixed sequence of nUnits 16bit units from an OUString, /// returned value is number of bytes written TOOLS_DLLPUBLIC sal_Size write_uInt16s_FromOUString(SvStream& rStrm, - const rtl::OUString& rStr, sal_Size nUnits); + const OUString& rStr, sal_Size nUnits); TOOLS_DLLPUBLIC inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm, - const rtl::OUString& rStr) + const OUString& rStr) { return write_uInt16s_FromOUString(rStrm, rStr, rStr.getLength()); } @@ -580,27 +580,27 @@ namespace streamdetail /// of 16bit units from an OUString, returned value is number of bytes written /// (including byte-count of prefix) template<typename prefix> sal_Size write_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm, - const rtl::OUString &rStr) + const OUString &rStr) { - return streamdetail::write_lenPrefixed_seq_From_str<prefix, rtl::OUString, write_uInt16s_FromOUString>(rStrm, rStr); + return streamdetail::write_lenPrefixed_seq_From_str<prefix, OUString, write_uInt16s_FromOUString>(rStrm, rStr); } /// Attempt to read 8bit units to an OString until a zero terminator is -/// encountered, returned rtl::OString's length is number of units *definitely* +/// encountered, returned OString's length is number of units *definitely* /// successfully read, check SvStream::good() to see if null terminator was /// successfully read -TOOLS_DLLPUBLIC rtl::OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStrm); +TOOLS_DLLPUBLIC OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStrm); /// Attempt to read 8bit units assuming source encoding eEnc to an OUString /// until a zero terminator is encountered. Check SvStream::good() to see if /// null terminator was successfully read -TOOLS_DLLPUBLIC rtl::OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rStrm, rtl_TextEncoding eEnc); +TOOLS_DLLPUBLIC OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rStrm, rtl_TextEncoding eEnc); /// Attempt to read a pascal-style length (of type prefix) prefixed sequence of -/// 8bit units to an OString, returned rtl::OString's length is number of units +/// 8bit units to an OString, returned OString's length is number of units /// successfully read. template<typename prefix> -rtl::OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm) +OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm) { prefix nUnits = 0; rStrm >> nUnits; @@ -610,21 +610,21 @@ rtl::OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm) /// Attempt to read a pascal-style length (of type prefix) prefixed sequence of /// 8bit units to an OUString template<typename prefix> -rtl::OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm, +OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm, rtl_TextEncoding eEnc) { - return rtl::OStringToOUString(read_lenPrefixed_uInt8s_ToOString<prefix>(rStrm), eEnc); + return OStringToOUString(read_lenPrefixed_uInt8s_ToOString<prefix>(rStrm), eEnc); } /// Attempt to write a prefixed sequence of nUnits 8bit units from an OString, /// returned value is number of bytes written -TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const rtl::OString& rStr, +TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr, sal_Size nUnits) { return rStrm.Write(rStr.getStr(), nUnits); } -TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const rtl::OString& rStr) +TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr) { return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength()); } @@ -633,18 +633,18 @@ TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const /// of 8bit units from an OString, returned value is number of bytes written /// (including byte-count of prefix) template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm, - const rtl::OString &rStr) + const OString &rStr) { - return streamdetail::write_lenPrefixed_seq_From_str<prefix, rtl::OString, write_uInt8s_FromOString>(rStrm, rStr); + return streamdetail::write_lenPrefixed_seq_From_str<prefix, OString, write_uInt8s_FromOString>(rStrm, rStr); } /// Attempt to write a pascal-style length (of type prefix) prefixed sequence /// of 8bit units from an OUString, returned value is number of bytes written /// (including byte-count of prefix) template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm, - const rtl::OUString &rStr, rtl_TextEncoding eEnc) + const OUString &rStr, rtl_TextEncoding eEnc) { - return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, rtl::OUStringToOString(rStr, eEnc)); + return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, OUStringToOString(rStr, eEnc)); } // FileStream diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 1c73fe4fb230..5efcd3e3d933 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -121,12 +121,12 @@ private: TOOLS_DLLPRIVATE UniString( const sal_Char*, sal_Int32 ); //detect and reject wrong way to attempt to create a UniString from a substring of - //a rtl::OString - TOOLS_DLLPRIVATE UniString(const rtl::OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen, + //a OString + TOOLS_DLLPRIVATE UniString(const OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen, sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS); //no longer implemented - TOOLS_DLLPRIVATE UniString( const rtl::OString& rByteStr, + TOOLS_DLLPRIVATE UniString( const OString& rByteStr, rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS ); TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr ); @@ -139,7 +139,7 @@ public: UniString( const ResId& rResId ); UniString( const UniString& rStr ); UniString( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen ); - UniString( const rtl::OUString& rStr ); + UniString( const OUString& rStr ); UniString(char c); // ...but allow "UniString('a')" UniString( const sal_Char* pByteStr, rtl_TextEncoding eTextEncoding, @@ -149,19 +149,19 @@ public: sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS ); ~UniString(); - operator rtl::OUString () const + operator OUString () const { - return rtl::OUString( rtl_uStringBuffer_refReturn( + return OUString( rtl_uStringBuffer_refReturn( reinterpret_cast<rtl_uString*>(mpData)), SAL_NO_ACQUIRE ); } #ifdef RTL_FAST_STRING template< typename T1, typename T2 > UniString( const rtl::OUStringConcat< T1, T2 >& concat ) - : mpData(NULL) { Assign( rtl::OUString( concat )); } + : mpData(NULL) { Assign( OUString( concat )); } template< typename T1, typename T2 > UniString& operator =( const rtl::OUStringConcat< T1, T2 >& concat ) - { return Assign( rtl::OUString( concat )); } + { return Assign( OUString( concat )); } template< typename T1, typename T2 > UniString& operator +=( const rtl::OUStringConcat< T1, T2 >& concat ) { return Append( UniString( concat ) ); } @@ -172,7 +172,7 @@ public: sal_Int64 ToInt64() const; UniString& Assign( const UniString& rStr ); - UniString& Assign( const rtl::OUString& rStr ); + UniString& Assign( const OUString& rStr ); UniString& Assign( const sal_Unicode* pCharStr ); UniString& Assign( sal_Unicode c ); inline UniString & Assign(char c) // ...but allow "Assign('a')" @@ -181,7 +181,7 @@ public: UniString& AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ); UniString& operator =( const UniString& rStr ) { return Assign( rStr ); } - UniString& operator =( const rtl::OUString& rStr ) + UniString& operator =( const OUString& rStr ) { return Assign( rStr ); } UniString& operator =( const sal_Unicode* pCharStr ) { return Assign( pCharStr ); } @@ -200,7 +200,7 @@ public: UniString& AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ); UniString& operator +=( const UniString& rStr ) { return Append( rStr ); } - UniString& operator +=( const rtl::OUString& rStr ) + UniString& operator +=( const OUString& rStr ) { return Append( UniString(rStr) ); } UniString& operator +=( const sal_Unicode* pCharStr ) { return Append( pCharStr ); } @@ -312,7 +312,7 @@ operator <<( std::basic_ostream<charT, traits> & stream, UniString const & string) { return stream << - rtl::OUStringToOString(string, RTL_TEXTENCODING_UTF8).getStr(); + OUStringToOString(string, RTL_TEXTENCODING_UTF8).getStr(); // best effort; potentially loses data due to conversion failures // (stray surrogate halves) and embedded null characters } @@ -334,24 +334,24 @@ struct ToStringHelper< UniString > // some compare operators, so that conversions from String to OUString don't // have to insert conversions all over the place -inline bool operator==(UniString const& rLeft, ::rtl::OUString const& rRight) +inline bool operator==(UniString const& rLeft, OUString const& rRight) { - return ::rtl::OUString(rLeft) == rRight; + return OUString(rLeft) == rRight; } -inline bool operator==(::rtl::OUString const& rLeft, UniString const& rRight) +inline bool operator==(OUString const& rLeft, UniString const& rRight) { - return rLeft == ::rtl::OUString(rRight); + return rLeft == OUString(rRight); } -inline bool operator!=(UniString const& rLeft, ::rtl::OUString const& rRight) +inline bool operator!=(UniString const& rLeft, OUString const& rRight) { - return ::rtl::OUString(rLeft) != rRight; + return OUString(rLeft) != rRight; } -inline bool operator!=(::rtl::OUString const& rLeft, UniString const& rRight) +inline bool operator!=(OUString const& rLeft, UniString const& rRight) { - return rLeft != ::rtl::OUString(rRight); + return rLeft != OUString(rRight); } #ifdef RTL_FAST_STRING diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx index 2f4319968042..fef9f469c359 100644 --- a/tools/inc/tools/urlobj.hxx +++ b/tools/inc/tools/urlobj.hxx @@ -113,9 +113,9 @@ public: /** The way input strings that represent (parts of) URIs are interpreted in set-methods. - @descr Most set-methods accept either a rtl::OString or a rtl::OUString - as input. Using a rtl::OString, octets in the range 0x80--0xFF are - replaced by single escape sequences. Using a rtl::OUString , UTF-32 + @descr Most set-methods accept either a OString or a OUString + as input. Using a OString, octets in the range 0x80--0xFF are + replaced by single escape sequences. Using a OUString , UTF-32 characters in the range 0x80--0x10FFFF are replaced by sequences of escape sequences, representing the UTF-8 coded characters. @@ -191,20 +191,20 @@ public: inline bool HasError() const { return m_eScheme == INET_PROT_NOT_VALID; } - inline rtl::OUString GetMainURL(DecodeMechanism eMechanism, + inline OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aAbsURIRef, getEscapePrefix(), eMechanism, eCharset); } - rtl::OUString GetURLNoPass(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetURLNoPass(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; - rtl::OUString GetURLNoMark(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetURLNoMark(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; - rtl::OUString + OUString getAbbreviated(com::sun::star::uno::Reference< com::sun::star::util::XStringWidth > const & rStringWidth, @@ -225,26 +225,26 @@ public: // Strict Parsing: - inline INetURLObject(const rtl::OString& rTheAbsURIRef, + inline INetURLObject(const OString& rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline INetURLObject(rtl::OUString const & rTheAbsURIRef, + inline INetURLObject(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetURL(const rtl::OString& rTheAbsURIRef, + inline bool SetURL(const OString& rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetURL(rtl::OUString const & rTheAbsURIRef, + inline bool SetURL(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - bool ConcatData(INetProtocol eTheScheme, rtl::OUString const & rTheUser, - rtl::OUString const & rThePassword, - rtl::OUString const & rTheHost, sal_uInt32 nThePort, - rtl::OUString const & rThePath, + bool ConcatData(INetProtocol eTheScheme, OUString const & rTheUser, + OUString const & rThePassword, + OUString const & rTheHost, sal_uInt32 nThePort, + OUString const & rThePath, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -347,7 +347,7 @@ public: FSYS_DETECT = FSYS_VOS | FSYS_UNX | FSYS_DOS }; - inline INetURLObject(rtl::OUString const & rTheAbsURIRef, + inline INetURLObject(OUString const & rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, @@ -357,19 +357,19 @@ public: { m_eSmartScheme = eTheSmartScheme; } inline bool - SetSmartURL(const rtl::OString& rTheAbsURIRef, + SetSmartURL(const OString& rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); inline bool - SetSmartURL(rtl::OUString const & rTheAbsURIRef, + SetSmartURL(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); inline INetURLObject - smartRel2Abs(const rtl::OString& rTheRelURIRef, + smartRel2Abs(const OString& rTheRelURIRef, bool & rWasAbsolute, bool bIgnoreFragment = false, EncodeMechanism eMechanism = WAS_ENCODED, @@ -378,7 +378,7 @@ public: FSysStyle eStyle = FSYS_DETECT) const; inline INetURLObject - smartRel2Abs(rtl::OUString const & rTheRelURIRef, + smartRel2Abs(OUString const & rTheRelURIRef, bool & rWasAbsolute, bool bIgnoreFragment = false, EncodeMechanism eMechanism = WAS_ENCODED, @@ -389,7 +389,7 @@ public: // Relative URLs: inline bool - GetNewAbsURL(const rtl::OString& rTheRelURIRef, + GetNewAbsURL(const OString& rTheRelURIRef, INetURLObject * pTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, @@ -397,7 +397,7 @@ public: const; inline bool - GetNewAbsURL(rtl::OUString const & rTheRelURIRef, + GetNewAbsURL(OUString const & rTheRelURIRef, INetURLObject * pTheAbsURIRef, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, @@ -411,26 +411,26 @@ public: then rTheRelURIRef is returned unmodified; otherwise, an empty string is returned. */ - static rtl::OUString - GetAbsURL(rtl::OUString const & rTheBaseURIRef, - rtl::OUString const & rTheRelURIRef, + static OUString + GetAbsURL(OUString const & rTheBaseURIRef, + OUString const & rTheRelURIRef, bool bIgnoreFragment = false, EncodeMechanism eEncodeMechanism = WAS_ENCODED, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); - static inline rtl::OUString - GetRelURL(const rtl::OString& rTheBaseURIRef, - const rtl::OString& rTheAbsURIRef, + static inline OUString + GetRelURL(const OString& rTheBaseURIRef, + const OString& rTheAbsURIRef, EncodeMechanism eEncodeMechanism = WAS_ENCODED, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); - static inline rtl::OUString - GetRelURL(rtl::OUString const & rTheBaseURIRef, - rtl::OUString const & rTheAbsURIRef, + static inline OUString + GetRelURL(OUString const & rTheBaseURIRef, + OUString const & rTheAbsURIRef, EncodeMechanism eEncodeMechanism = WAS_ENCODED, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, @@ -438,33 +438,33 @@ public: // External URLs: - rtl::OUString getExternalURL(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString getExternalURL(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; - static inline bool translateToExternal(const rtl::OString& rTheIntURIRef, - rtl::OUString & rTheExtURIRef, + static inline bool translateToExternal(const OString& rTheIntURIRef, + OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - static inline bool translateToExternal(rtl::OUString const & rTheIntURIRef, - rtl::OUString & rTheExtURIRef, + static inline bool translateToExternal(OUString const & rTheIntURIRef, + OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - static inline bool translateToInternal(const rtl::OString& rTheExtURIRef, - rtl::OUString & rTheIntURIRef, + static inline bool translateToInternal(const OString& rTheExtURIRef, + OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - static inline bool translateToInternal(rtl::OUString const & rTheExtURIRef, - rtl::OUString & rTheIntURIRef, + static inline bool translateToInternal(OUString const & rTheExtURIRef, + OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset @@ -482,13 +482,13 @@ public: @return The 'prefix' of URLs of the given scheme. */ - static rtl::OUString GetScheme(INetProtocol eTheScheme); + static OUString GetScheme(INetProtocol eTheScheme); - static inline INetProtocol CompareProtocolScheme(const rtl::OString& + static inline INetProtocol CompareProtocolScheme(const OString& rTheAbsURIRef) { return CompareProtocolScheme(extend(rTheAbsURIRef)); } - static INetProtocol CompareProtocolScheme(rtl::OUString const & + static INetProtocol CompareProtocolScheme(OUString const & rTheAbsURIRef); // User Info: @@ -498,42 +498,42 @@ public: inline bool IsEmptyUser() const { return m_aUser.isPresent() && m_aUser.isEmpty(); } - inline rtl::OUString GetUser(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetUser(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aUser, getEscapePrefix(), eMechanism, eCharset); } - inline rtl::OUString GetPass(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetPass(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aAuth, getEscapePrefix(), eMechanism, eCharset); } - inline bool SetUser(const rtl::OString& rTheUser, + inline bool SetUser(const OString& rTheUser, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setUser(extend(rTheUser), true, eMechanism, eCharset); } - inline bool SetUser(rtl::OUString const & rTheUser, + inline bool SetUser(OUString const & rTheUser, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setUser(rTheUser, false, eMechanism, eCharset); } - inline bool SetPass(const rtl::OString& rThePassword, + inline bool SetPass(const OString& rThePassword, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetPass(rtl::OUString const & rThePassword, + inline bool SetPass(OUString const & rThePassword, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetUserAndPass(const rtl::OString& rTheUser, - const rtl::OString& rThePassword, + inline bool SetUserAndPass(const OString& rTheUser, + const OString& rThePassword, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetUserAndPass(rtl::OUString const & rTheUser, - rtl::OUString const & rThePassword, + inline bool SetUserAndPass(OUString const & rTheUser, + OUString const & rThePassword, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -542,22 +542,22 @@ public: inline bool HasPort() const { return m_aPort.isPresent(); } - inline rtl::OUString GetHost(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetHost(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aHost, getEscapePrefix(), eMechanism, eCharset); } - rtl::OUString GetHostPort(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetHostPort(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); sal_uInt32 GetPort() const; - inline bool SetHost(const rtl::OString& rTheHost, + inline bool SetHost(const OString& rTheHost, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setHost(extend(rTheHost), true, eMechanism, eCharset); } - inline bool SetHost(rtl::OUString const & rTheHost, + inline bool SetHost(OUString const & rTheHost, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setHost(rTheHost, false, eMechanism, eCharset); } @@ -568,17 +568,17 @@ public: inline bool HasURLPath() const { return !m_aPath.isEmpty(); } - inline rtl::OUString GetURLPath(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetURLPath(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aPath, getEscapePrefix(), eMechanism, eCharset); } - inline bool SetURLPath(const rtl::OString& rThePath, + inline bool SetURLPath(const OString& rThePath, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setPath(extend(rThePath), true, eMechanism, eCharset); } - inline bool SetURLPath(rtl::OUString const & rThePath, + inline bool SetURLPath(OUString const & rThePath, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return setPath(rThePath, false, eMechanism, eCharset); } @@ -661,7 +661,7 @@ public: the specified place to insert the new segment does not exist, false is returned. If false is returned, the object is not modified. */ - inline bool insertName(rtl::OUString const & rTheName, + inline bool insertName(OUString const & rTheName, bool bAppendFinalSlash = false, sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, @@ -684,7 +684,7 @@ public: hierarchical, or the specified segment does not exits, an empty string is returned. */ - rtl::OUString getName(sal_Int32 nIndex = LAST_SEGMENT, + OUString getName(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) @@ -710,7 +710,7 @@ public: the specified segment does not exist, false is returned. If false is returned, the object is not modified. */ - bool setName(rtl::OUString const & rTheName, + bool setName(OUString const & rTheName, sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, @@ -732,7 +732,7 @@ public: not hierarchical, or the specified segment does not exits, an empty string is returned. */ - rtl::OUString getBase(sal_Int32 nIndex = LAST_SEGMENT, + OUString getBase(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) @@ -757,7 +757,7 @@ public: the specified segment does not exist, false is returned. If false is returned, the object is not modified. */ - bool setBase(rtl::OUString const & rTheBase, + bool setBase(OUString const & rTheBase, sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, @@ -794,7 +794,7 @@ public: not hierarchical, or the specified segment does not exits, an empty string is returned. */ - rtl::OUString getExtension(sal_Int32 nIndex = LAST_SEGMENT, + OUString getExtension(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) @@ -820,7 +820,7 @@ public: the specified segment does not exist, false is returned. If false is returned, the object is not modified. */ - bool setExtension(rtl::OUString const & rTheExtension, + bool setExtension(OUString const & rTheExtension, sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, EncodeMechanism eMechanism = WAS_ENCODED, @@ -873,16 +873,16 @@ public: inline bool HasParam() const { return m_aQuery.isPresent(); } - inline rtl::OUString GetParam(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetParam(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aQuery, getEscapePrefix(), eMechanism, eCharset); } - inline bool SetParam(const rtl::OString& rTheQuery, + inline bool SetParam(const OString& rTheQuery, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetParam(rtl::OUString const & rTheQuery, + inline bool SetParam(OUString const & rTheQuery, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -890,16 +890,16 @@ public: inline bool HasMark() const { return m_aFragment.isPresent(); } - inline rtl::OUString GetMark(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetMark(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aFragment, getEscapePrefix(), eMechanism, eCharset); } - inline bool SetMark(const rtl::OString& rTheFragment, + inline bool SetMark(const OString& rTheFragment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline bool SetMark(rtl::OUString const & rTheFragment, + inline bool SetMark(OUString const & rTheFragment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -911,7 +911,7 @@ public: @param eStyle The notation of rFSysPath. */ - inline INetURLObject(rtl::OUString const & rFSysPath, FSysStyle eStyle); + inline INetURLObject(OUString const & rFSysPath, FSysStyle eStyle); /** Set this INetURLObject to a file URL constructed from a file system path. @@ -923,7 +923,7 @@ public: @return True if this INetURLObject has successfully been changed. If false is returned, this INetURLObject has not been modified. */ - bool setFSysPath(rtl::OUString const & rFSysPath, FSysStyle eStyle); + bool setFSysPath(OUString const & rFSysPath, FSysStyle eStyle); /** Return the file system path represented by a file URL (ignoring any fragment part). @@ -942,12 +942,12 @@ public: specified notation, or if this is not a file URL at all, an empty string is returned. */ - rtl::OUString getFSysPath(FSysStyle eStyle, sal_Unicode * pDelimiter = 0) + OUString getFSysPath(FSysStyle eStyle, sal_Unicode * pDelimiter = 0) const; // POP3 and URLs: - rtl::OUString GetMsgId(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetMsgId(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -1014,7 +1014,7 @@ public: @return The encoded representation of the text ('forbidden' characters replaced by escape sequences). */ - static inline rtl::OUString encode(const rtl::OString& rText, Part ePart, + static inline OUString encode(const OString& rText, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset @@ -1039,7 +1039,7 @@ public: @return The text, encoded according to the given mechanism and charset ('forbidden' characters replaced by escape sequences). */ - static inline rtl::OUString encode(rtl::OUString const & rText, Part ePart, + static inline OUString encode(OUString const & rText, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset @@ -1059,23 +1059,23 @@ public: @return The text, decoded according to the given mechanism and charset (escape sequences replaced by 'raw' characters). */ - static inline rtl::OUString decode(rtl::OUString const & rText, + static inline OUString decode(OUString const & rText, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - static inline rtl::OUString decode(rtl::OUStringBuffer const & rText, + static inline OUString decode(OUStringBuffer const & rText, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - static void appendUCS4Escape(rtl::OUStringBuffer & rTheText, + static void appendUCS4Escape(OUStringBuffer & rTheText, sal_Char cEscapePrefix, sal_uInt32 nUCS4); - static void appendUCS4(rtl::OUStringBuffer & rTheText, sal_uInt32 nUCS4, + static void appendUCS4(OUStringBuffer & rTheText, sal_uInt32 nUCS4, EscapeType eEscapeType, bool bOctets, Part ePart, sal_Char cEscapePrefix, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes); @@ -1095,7 +1095,7 @@ public: // OBSOLETE Hierarchical Path: - rtl::OUString GetPartBeforeLastName(DecodeMechanism eMechanism + OUString GetPartBeforeLastName(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -1110,7 +1110,7 @@ public: the last unencoded '/'). Not that this last segment may be empty. If the URL is not hierarchical, an empty string is returned. */ - rtl::OUString GetLastName(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetLastName(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -1125,16 +1125,16 @@ public: be empty. If the URL is not hierarchical, or if the last segment does not contain an unencoded '.', an empty string is returned. */ - rtl::OUString GetFileExtension(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetFileExtension(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; - inline bool Append(const rtl::OString& rTheSegment, + inline bool Append(const OString& rTheSegment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return appendSegment(extend(rTheSegment), true, eMechanism, eCharset); } - inline bool Append(rtl::OUString const & rTheSegment, + inline bool Append(OUString const & rTheSegment, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) { return appendSegment(rTheSegment, false, eMechanism, eCharset); } @@ -1143,36 +1143,36 @@ public: // OBSOLETE File URLs: - rtl::OUString PathToFileName() const; + OUString PathToFileName() const; - rtl::OUString GetFull() const; + OUString GetFull() const; - rtl::OUString GetPath() const; + OUString GetPath() const; - void SetBase(rtl::OUString const & rTheBase); + void SetBase(OUString const & rTheBase); - rtl::OUString GetBase() const; + OUString GetBase() const; - void SetName(rtl::OUString const & rTheName, + void SetName(OUString const & rTheName, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline rtl::OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return GetLastName(eMechanism, eCharset); } - void SetExtension(rtl::OUString const & rTheExtension, + void SetExtension(OUString const & rTheExtension, EncodeMechanism eMechanism = WAS_ENCODED, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline rtl::OUString GetExtension( + inline OUString GetExtension( DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return GetFileExtension(eMechanism, eCharset); } - rtl::OUString CutExtension(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString CutExtension(DecodeMechanism eMechanism = DECODE_TO_IURI, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); bool IsCaseSensitive() const; @@ -1203,24 +1203,24 @@ private: inline sal_Int32 clear(); - inline sal_Int32 set(rtl::OUStringBuffer & rString, - rtl::OUString const & rSubString, + inline sal_Int32 set(OUStringBuffer & rString, + OUString const & rSubString, sal_Int32 nTheBegin); - inline sal_Int32 set(rtl::OUString & rString, - rtl::OUString const & rSubString); + inline sal_Int32 set(OUString & rString, + OUString const & rSubString); - inline sal_Int32 set(rtl::OUStringBuffer & rString, - rtl::OUString const & rSubString); + inline sal_Int32 set(OUStringBuffer & rString, + OUString const & rSubString); inline void operator +=(sal_Int32 nDelta); int compare(SubString const & rOther, - rtl::OUStringBuffer const & rThisString, - rtl::OUStringBuffer const & rOtherString) const; + OUStringBuffer const & rThisString, + OUStringBuffer const & rOtherString) const; }; - rtl::OUStringBuffer m_aAbsURIRef; + OUStringBuffer m_aAbsURIRef; SubString m_aScheme; SubString m_aUser; SubString m_aAuth; @@ -1235,35 +1235,35 @@ private: TOOLS_DLLPRIVATE void setInvalid(); bool setAbsURIRef( - rtl::OUString const & rTheAbsURIRef, bool bOctets, + OUString const & rTheAbsURIRef, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSmart, FSysStyle eStyle); // Relative URLs: bool convertRelToAbs( - rtl::OUString const & rTheRelURIRef, bool bOctets, + OUString const & rTheRelURIRef, bool bOctets, INetURLObject & rTheAbsURIRef, bool & rWasAbsolute, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bIgnoreFragment, bool bSmart, bool bRelativeNonURIs, FSysStyle eStyle) const; bool convertAbsToRel( - rtl::OUString const & rTheAbsURIRef, bool bOctets, - rtl::OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, + OUString const & rTheAbsURIRef, bool bOctets, + OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) const; // External URLs: static bool convertIntToExt( - rtl::OUString const & rTheIntURIRef, bool bOctets, - rtl::OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism, + OUString const & rTheIntURIRef, bool bOctets, + OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset); static bool convertExtToInt( - rtl::OUString const & rTheExtURIRef, bool bOctets, - rtl::OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism, + OUString const & rTheExtURIRef, bool bOctets, + OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset); // Scheme: @@ -1287,28 +1287,28 @@ private: // User Info: bool setUser( - rtl::OUString const & rTheUser, bool bOctets, + OUString const & rTheUser, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); bool clearPassword(); bool setPassword( - rtl::OUString const & rThePassword, bool bOctets, + OUString const & rThePassword, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Host and Port: TOOLS_DLLPRIVATE static bool parseHost( sal_Unicode const *& rBegin, sal_Unicode const * pEnd, - rtl::OUString & rCanonic); + OUString & rCanonic); TOOLS_DLLPRIVATE static bool parseHostOrNetBiosName( sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, - bool bNetBiosName, rtl::OUStringBuffer* pCanonic); + bool bNetBiosName, OUStringBuffer* pCanonic); bool setHost( - rtl::OUString const & rTheHost, bool bOctets, + OUString const & rTheHost, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Path: @@ -1319,10 +1319,10 @@ private: rtl_TextEncoding eCharset, bool bSkippedInitialSlash, sal_uInt32 nSegmentDelimiter, sal_uInt32 nAltSegmentDelimiter, sal_uInt32 nQueryDelimiter, sal_uInt32 nFragmentDelimiter, - rtl::OUStringBuffer &rSynPath); + OUStringBuffer &rSynPath); bool setPath( - rtl::OUString const & rThePath, bool bOctets, + OUString const & rThePath, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Hierarchical Path: @@ -1330,14 +1330,14 @@ private: TOOLS_DLLPRIVATE bool checkHierarchical() const; bool appendSegment( - rtl::OUString const & rTheSegment, bool bOctets, + OUString const & rTheSegment, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); TOOLS_DLLPRIVATE SubString getSegment( sal_Int32 nIndex, bool bIgnoreFinalSlash) const; bool insertName( - rtl::OUString const & rTheName, bool bOctets, bool bAppendFinalSlash, + OUString const & rTheName, bool bOctets, bool bAppendFinalSlash, sal_Int32 nIndex, bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); @@ -1346,7 +1346,7 @@ private: bool clearQuery(); bool setQuery( - rtl::OUString const & rTheQuery, bool bOctets, + OUString const & rTheQuery, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // Fragment: @@ -1354,7 +1354,7 @@ private: bool clearFragment(); bool setFragment( - rtl::OUString const & rTheMark, bool bOctets, + OUString const & rTheMark, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset); // FILE URLs: @@ -1363,9 +1363,9 @@ private: // Coding: - static inline rtl::OUString extend(const rtl::OString& rOctets) + static inline OUString extend(const OString& rOctets) { - return rtl::OStringToOUString(rOctets, RTL_TEXTENCODING_ISO_8859_1); + return OStringToOUString(rOctets, RTL_TEXTENCODING_ISO_8859_1); } static inline sal_Char getEscapePrefix(INetProtocol eTheScheme) @@ -1375,24 +1375,24 @@ private: { return getEscapePrefix(m_eScheme); } TOOLS_DLLPRIVATE static inline void appendEscape( - rtl::OUStringBuffer & rTheText, sal_Char cEscapePrefix, + OUStringBuffer & rTheText, sal_Char cEscapePrefix, sal_uInt32 nOctet); - static rtl::OUString encodeText( + static OUString encodeText( sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes); - static inline rtl::OUString encodeText( - rtl::OUString const & rTheText, bool bOctets, Part ePart, + static inline OUString encodeText( + OUString const & rTheText, bool bOctets, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes); - static rtl::OUString decode( + static OUString decode( sal_Unicode const * pBegin, sal_Unicode const * pEnd, sal_Char cEscapePrefix, DecodeMechanism, rtl_TextEncoding eCharset); - inline rtl::OUString decode( + inline OUString decode( SubString const & rSubString, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const; @@ -1406,7 +1406,7 @@ private: }; // static -inline rtl::OUString INetURLObject::encodeText(rtl::OUString const & rTheText, +inline OUString INetURLObject::encodeText(OUString const & rTheText, bool bOctets, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, @@ -1419,7 +1419,7 @@ inline rtl::OUString INetURLObject::encodeText(rtl::OUString const & rTheText, bKeepVisibleEscapes); } -inline rtl::OUString INetURLObject::decode(SubString const & rSubString, +inline OUString INetURLObject::decode(SubString const & rSubString, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const @@ -1428,10 +1428,10 @@ inline rtl::OUString INetURLObject::decode(SubString const & rSubString, decode(m_aAbsURIRef.getStr() + rSubString.getBegin(), m_aAbsURIRef.getStr() + rSubString.getEnd(), cEscapePrefix, eMechanism, eCharset) : - rtl::OUString(); + OUString(); } -inline INetURLObject::INetURLObject(const rtl::OString& rTheAbsURIRef, +inline INetURLObject::INetURLObject(const OString& rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset): m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP) @@ -1440,7 +1440,7 @@ inline INetURLObject::INetURLObject(const rtl::OString& rTheAbsURIRef, FSysStyle(0)); } -inline INetURLObject::INetURLObject(rtl::OUString const & rTheAbsURIRef, +inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset): m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP) @@ -1449,7 +1449,7 @@ inline INetURLObject::INetURLObject(rtl::OUString const & rTheAbsURIRef, FSysStyle(0)); } -inline bool INetURLObject::SetURL(const rtl::OString& rTheAbsURIRef, +inline bool INetURLObject::SetURL(const OString& rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1457,7 +1457,7 @@ inline bool INetURLObject::SetURL(const rtl::OString& rTheAbsURIRef, false, FSysStyle(0)); } -inline bool INetURLObject::SetURL(rtl::OUString const & rTheAbsURIRef, +inline bool INetURLObject::SetURL(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1465,7 +1465,7 @@ inline bool INetURLObject::SetURL(rtl::OUString const & rTheAbsURIRef, FSysStyle(0)); } -inline INetURLObject::INetURLObject(rtl::OUString const & rTheAbsURIRef, +inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, @@ -1475,7 +1475,7 @@ inline INetURLObject::INetURLObject(rtl::OUString const & rTheAbsURIRef, setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, true, eStyle); } -inline bool INetURLObject::SetSmartURL(const rtl::OString& rTheAbsURIRef, +inline bool INetURLObject::SetSmartURL(const OString& rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) @@ -1484,7 +1484,7 @@ inline bool INetURLObject::SetSmartURL(const rtl::OString& rTheAbsURIRef, true, eStyle); } -inline bool INetURLObject::SetSmartURL(rtl::OUString const & rTheAbsURIRef, +inline bool INetURLObject::SetSmartURL(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) @@ -1494,7 +1494,7 @@ inline bool INetURLObject::SetSmartURL(rtl::OUString const & rTheAbsURIRef, } inline INetURLObject -INetURLObject::smartRel2Abs(const rtl::OString& rTheRelURIRef, +INetURLObject::smartRel2Abs(const OString& rTheRelURIRef, bool & rWasAbsolute, bool bIgnoreFragment, EncodeMechanism eMechanism, @@ -1510,7 +1510,7 @@ INetURLObject::smartRel2Abs(const rtl::OString& rTheRelURIRef, } inline INetURLObject -INetURLObject::smartRel2Abs(rtl::OUString const & rTheRelURIRef, +INetURLObject::smartRel2Abs(OUString const & rTheRelURIRef, bool & rWasAbsolute, bool bIgnoreFragment, EncodeMechanism eMechanism, @@ -1525,7 +1525,7 @@ INetURLObject::smartRel2Abs(rtl::OUString const & rTheRelURIRef, return aTheAbsURIRef; } -inline bool INetURLObject::GetNewAbsURL(const rtl::OString& rTheRelURIRef, +inline bool INetURLObject::GetNewAbsURL(const OString& rTheRelURIRef, INetURLObject * pTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, @@ -1543,7 +1543,7 @@ inline bool INetURLObject::GetNewAbsURL(const rtl::OString& rTheRelURIRef, return true; } -inline bool INetURLObject::GetNewAbsURL(rtl::OUString const & rTheRelURIRef, +inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef, INetURLObject * pTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, @@ -1562,14 +1562,14 @@ inline bool INetURLObject::GetNewAbsURL(rtl::OUString const & rTheRelURIRef, } // static -inline rtl::OUString INetURLObject::GetRelURL(const rtl::OString& rTheBaseURIRef, - const rtl::OString& rTheAbsURIRef, +inline OUString INetURLObject::GetRelURL(const OString& rTheBaseURIRef, + const OString& rTheAbsURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) { - rtl::OUString aTheRelURIRef; + OUString aTheRelURIRef; INetURLObject(rTheBaseURIRef, eEncodeMechanism, eCharset). convertAbsToRel(extend(rTheAbsURIRef), true, aTheRelURIRef, eEncodeMechanism, eDecodeMechanism, eCharset, eStyle); @@ -1577,14 +1577,14 @@ inline rtl::OUString INetURLObject::GetRelURL(const rtl::OString& rTheBaseURIRef } // static -inline rtl::OUString INetURLObject::GetRelURL(rtl::OUString const & rTheBaseURIRef, - rtl::OUString const & rTheAbsURIRef, +inline OUString INetURLObject::GetRelURL(OUString const & rTheBaseURIRef, + OUString const & rTheAbsURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) { - rtl::OUString aTheRelURIRef; + OUString aTheRelURIRef; INetURLObject(rTheBaseURIRef, eEncodeMechanism, eCharset). convertAbsToRel(rTheAbsURIRef, false, aTheRelURIRef, eEncodeMechanism, eDecodeMechanism, eCharset, eStyle); @@ -1592,13 +1592,13 @@ inline rtl::OUString INetURLObject::GetRelURL(rtl::OUString const & rTheBaseURIR } // static -inline bool INetURLObject::translateToExternal(const rtl::OString& rTheIntURIRef, - rtl::OUString & rTheExtURIRef, +inline bool INetURLObject::translateToExternal(const OString& rTheIntURIRef, + OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) { - rtl::OUString aTheExtURIRef; + OUString aTheExtURIRef; bool bRet = convertIntToExt(extend(rTheIntURIRef), true, aTheExtURIRef, eDecodeMechanism, eCharset); rTheExtURIRef = aTheExtURIRef; @@ -1606,9 +1606,9 @@ inline bool INetURLObject::translateToExternal(const rtl::OString& rTheIntURIRef } // static -inline bool INetURLObject::translateToExternal(rtl::OUString const & +inline bool INetURLObject::translateToExternal(OUString const & rTheIntURIRef, - rtl::OUString & rTheExtURIRef, + OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) @@ -1618,14 +1618,14 @@ inline bool INetURLObject::translateToExternal(rtl::OUString const & } // static -inline bool INetURLObject::translateToInternal(const rtl::OString& +inline bool INetURLObject::translateToInternal(const OString& rTheExtURIRef, - rtl::OUString & rTheIntURIRef, + OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) { - rtl::OUString aTheIntURIRef; + OUString aTheIntURIRef; bool bRet = convertExtToInt(extend(rTheExtURIRef), true, aTheIntURIRef, eDecodeMechanism, eCharset); rTheIntURIRef = aTheIntURIRef; @@ -1633,9 +1633,9 @@ inline bool INetURLObject::translateToInternal(const rtl::OString& } // static -inline bool INetURLObject::translateToInternal(rtl::OUString const & +inline bool INetURLObject::translateToInternal(OUString const & rTheExtURIRef, - rtl::OUString & rTheIntURIRef, + OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) @@ -1644,7 +1644,7 @@ inline bool INetURLObject::translateToInternal(rtl::OUString const & eDecodeMechanism, eCharset); } -inline bool INetURLObject::SetPass(const rtl::OString& rThePassword, +inline bool INetURLObject::SetPass(const OString& rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1653,7 +1653,7 @@ inline bool INetURLObject::SetPass(const rtl::OString& rThePassword, setPassword(extend(rThePassword), true, eMechanism, eCharset); } -inline bool INetURLObject::SetPass(rtl::OUString const & rThePassword, +inline bool INetURLObject::SetPass(OUString const & rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1662,8 +1662,8 @@ inline bool INetURLObject::SetPass(rtl::OUString const & rThePassword, setPassword(rThePassword, false, eMechanism, eCharset); } -inline bool INetURLObject::SetUserAndPass(const rtl::OString& rTheUser, - const rtl::OString& rThePassword, +inline bool INetURLObject::SetUserAndPass(const OString& rTheUser, + const OString& rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1674,8 +1674,8 @@ inline bool INetURLObject::SetUserAndPass(const rtl::OString& rTheUser, eCharset)); } -inline bool INetURLObject::SetUserAndPass(rtl::OUString const & rTheUser, - rtl::OUString const & rThePassword, +inline bool INetURLObject::SetUserAndPass(OUString const & rTheUser, + OUString const & rThePassword, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1685,7 +1685,7 @@ inline bool INetURLObject::SetUserAndPass(rtl::OUString const & rTheUser, setPassword(rThePassword, false, eMechanism, eCharset)); } -inline bool INetURLObject::insertName(rtl::OUString const & rTheName, +inline bool INetURLObject::insertName(OUString const & rTheName, bool bAppendFinalSlash, sal_Int32 nIndex, bool bIgnoreFinalSlash, @@ -1696,7 +1696,7 @@ inline bool INetURLObject::insertName(rtl::OUString const & rTheName, bIgnoreFinalSlash, eMechanism, eCharset); } -inline bool INetURLObject::SetParam(const rtl::OString& rTheQuery, +inline bool INetURLObject::SetParam(const OString& rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1705,7 +1705,7 @@ inline bool INetURLObject::SetParam(const rtl::OString& rTheQuery, setQuery(extend(rTheQuery), true, eMechanism, eCharset); } -inline bool INetURLObject::SetParam(rtl::OUString const & rTheQuery, +inline bool INetURLObject::SetParam(OUString const & rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1714,7 +1714,7 @@ inline bool INetURLObject::SetParam(rtl::OUString const & rTheQuery, setQuery(rTheQuery, false, eMechanism, eCharset); } -inline bool INetURLObject::SetMark(const rtl::OString& rTheFragment, +inline bool INetURLObject::SetMark(const OString& rTheFragment, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1723,7 +1723,7 @@ inline bool INetURLObject::SetMark(const rtl::OString& rTheFragment, setFragment(extend(rTheFragment), true, eMechanism, eCharset); } -inline bool INetURLObject::SetMark(rtl::OUString const & rTheFragment, +inline bool INetURLObject::SetMark(OUString const & rTheFragment, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -1732,7 +1732,7 @@ inline bool INetURLObject::SetMark(rtl::OUString const & rTheFragment, setFragment(rTheFragment, false, eMechanism, eCharset); } -inline INetURLObject::INetURLObject(rtl::OUString const & rFSysPath, +inline INetURLObject::INetURLObject(OUString const & rFSysPath, FSysStyle eStyle): m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP) { @@ -1740,7 +1740,7 @@ inline INetURLObject::INetURLObject(rtl::OUString const & rFSysPath, } // static -inline rtl::OUString INetURLObject::encode(const rtl::OString& rText, Part ePart, +inline OUString INetURLObject::encode(const OString& rText, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -1750,7 +1750,7 @@ inline rtl::OUString INetURLObject::encode(const rtl::OString& rText, Part ePart } // static -inline rtl::OUString INetURLObject::encode(rtl::OUString const & rText, Part ePart, +inline OUString INetURLObject::encode(OUString const & rText, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -1760,7 +1760,7 @@ inline rtl::OUString INetURLObject::encode(rtl::OUString const & rText, Part ePa } // static -inline rtl::OUString INetURLObject::decode(rtl::OUString const & rText, +inline OUString INetURLObject::decode(OUString const & rText, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -1769,7 +1769,7 @@ inline rtl::OUString INetURLObject::decode(rtl::OUString const & rText, cEscapePrefix, eMechanism, eCharset); } -inline rtl::OUString INetURLObject::decode(rtl::OUStringBuffer const & rText, +inline OUString INetURLObject::decode(OUStringBuffer const & rText, sal_Char cEscapePrefix, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx index cf82984cfa52..8991b8882474 100644 --- a/tools/inc/tools/wldcrd.hxx +++ b/tools/inc/tools/wldcrd.hxx @@ -26,7 +26,7 @@ class TOOLS_DLLPUBLIC WildCard { private: - rtl::OString aWildString; + OString aWildString; char cSepSymbol; sal_uInt16 ImpMatch( const char *pWild, const char *pStr ) const; @@ -38,20 +38,20 @@ public: { } - WildCard(const rtl::OUString& rWildCard, const char cSeparator = '\0') - : aWildString(rtl::OUStringToOString(rWildCard, osl_getThreadTextEncoding())) + WildCard(const OUString& rWildCard, const char cSeparator = '\0') + : aWildString(OUStringToOString(rWildCard, osl_getThreadTextEncoding())) , cSepSymbol(cSeparator) { } - const rtl::OUString getGlob() const + const OUString getGlob() const { - return rtl::OStringToOUString(aWildString, osl_getThreadTextEncoding()); + return OStringToOUString(aWildString, osl_getThreadTextEncoding()); } - void setGlob(const rtl::OUString& rString) + void setGlob(const OUString& rString) { - aWildString = rtl::OUStringToOString(rString, osl_getThreadTextEncoding()); + aWildString = OUStringToOString(rString, osl_getThreadTextEncoding()); } sal_Bool Matches( const String& rStr ) const; diff --git a/tools/qa/cppunit/test_inetmime.cxx b/tools/qa/cppunit/test_inetmime.cxx index 06d8d4952f08..5770ff31ba15 100644 --- a/tools/qa/cppunit/test_inetmime.cxx +++ b/tools/qa/cppunit/test_inetmime.cxx @@ -41,7 +41,7 @@ namespace bool Test::testDecode(char const * input, char const * expected) { - rtl::OUString result = INetMIME::decodeHeaderFieldBody( + OUString result = INetMIME::decodeHeaderFieldBody( INetMIME::HEADER_FIELD_TEXT, input); return result.equalsAscii(expected); } diff --git a/tools/qa/cppunit/test_reversemap.cxx b/tools/qa/cppunit/test_reversemap.cxx index af232c0bcb1e..f20ffb32c7a8 100644 --- a/tools/qa/cppunit/test_reversemap.cxx +++ b/tools/qa/cppunit/test_reversemap.cxx @@ -80,14 +80,14 @@ namespace //Some slots are unused, so don't map to private, just set them to 'X' sal_uInt32 convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE; - rtl::OUString sOrigText(&aAllChars[0], aAllChars.size(), eEncoding, convertFlags); + OUString sOrigText(&aAllChars[0], aAllChars.size(), eEncoding, convertFlags); sOrigText = sOrigText.replace( 0xfffd, 'X' ); //Should clearly be equal sal_Int32 nLength = aAllChars.size(); CPPUNIT_ASSERT_EQUAL(sOrigText.getLength(), nLength); - rtl::OUString sFinalText; + OUString sFinalText; //Split up in chunks of the same encoding returned by //getBestMSEncodingByChar, convert to it, and back @@ -99,16 +99,16 @@ namespace rtl_TextEncoding eCurrEncoding = getBestMSEncodingByChar(pStr[i]); if (eCurrEncoding != ePrevEncoding) { - rtl::OString aChunk(pStr+nChunkStart, i-nChunkStart, ePrevEncoding); - sFinalText += rtl::OStringToOUString(aChunk, ePrevEncoding); + OString aChunk(pStr+nChunkStart, i-nChunkStart, ePrevEncoding); + sFinalText += OStringToOUString(aChunk, ePrevEncoding); nChunkStart = i; } ePrevEncoding = eCurrEncoding; } if (nChunkStart < 255) { - rtl::OString aChunk(pStr+nChunkStart, 255-nChunkStart, ePrevEncoding); - sFinalText += rtl::OStringToOUString(aChunk, ePrevEncoding); + OString aChunk(pStr+nChunkStart, 255-nChunkStart, ePrevEncoding); + sFinalText += OStringToOUString(aChunk, ePrevEncoding); } //Final text should be the same as original diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx index a65b6be290cb..d1029ca82e63 100644 --- a/tools/qa/cppunit/test_stream.cxx +++ b/tools/qa/cppunit/test_stream.cxx @@ -154,18 +154,18 @@ namespace char foo[] = "foobar"; SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); - rtl::OString aOne = read_uInt8s_ToOString(aMemStream, 3); + OString aOne = read_uInt8s_ToOString(aMemStream, 3); CPPUNIT_ASSERT(aOne == "foo"); - rtl::OString aTwo = read_uInt8s_ToOString(aMemStream, 3); + OString aTwo = read_uInt8s_ToOString(aMemStream, 3); CPPUNIT_ASSERT(aTwo == "bar"); - rtl::OString aThree = read_uInt8s_ToOString(aMemStream, 3); + OString aThree = read_uInt8s_ToOString(aMemStream, 3); CPPUNIT_ASSERT(aThree.isEmpty()); aMemStream.Seek(0); - rtl::OString aFour = read_uInt8s_ToOString(aMemStream, 100); + OString aFour = read_uInt8s_ToOString(aMemStream, 100); CPPUNIT_ASSERT(aFour == foo); } @@ -174,7 +174,7 @@ namespace char foo[] = "foobar"; SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); - rtl::OString aOne = read_zeroTerminated_uInt8s_ToOString(aMemStream); + OString aOne = read_zeroTerminated_uInt8s_ToOString(aMemStream); CPPUNIT_ASSERT(aOne == "foobar"); CPPUNIT_ASSERT(!aMemStream.good()); CPPUNIT_ASSERT(!aMemStream.bad()); @@ -182,7 +182,7 @@ namespace aMemStream.Seek(0); foo[3] = 0; - rtl::OString aTwo = read_zeroTerminated_uInt8s_ToOString(aMemStream); + OString aTwo = read_zeroTerminated_uInt8s_ToOString(aMemStream); CPPUNIT_ASSERT(aTwo == "foo"); CPPUNIT_ASSERT(aMemStream.good()); } @@ -192,7 +192,7 @@ namespace char foo[] = "\3foobar"; SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); - rtl::OString aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt8>(aMemStream); + OString aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt8>(aMemStream); CPPUNIT_ASSERT(aFoo == "foo"); CPPUNIT_ASSERT(aMemStream.good()); CPPUNIT_ASSERT(!aMemStream.bad()); @@ -234,7 +234,7 @@ namespace char foo[] = "foo\nbar\n\n"; SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); - rtl::OString aFoo; + OString aFoo; sal_Bool bRet; bRet = aMemStream.ReadLine(aFoo); diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx index c53f2b18fdb7..ded7f6e5eeb8 100644 --- a/tools/qa/cppunit/test_urlobj.cxx +++ b/tools/qa/cppunit/test_urlobj.cxx @@ -33,7 +33,7 @@ #include <cppunit/extensions/HelperMacros.h> #include "tools/urlobj.hxx" -#define OUSTR_TO_STDSTR( oustr ) std::string( rtl::OUStringToOString( oustr, RTL_TEXTENCODING_ASCII_US ).getStr() ) +#define OUSTR_TO_STDSTR( oustr ) std::string( OUStringToOString( oustr, RTL_TEXTENCODING_ASCII_US ).getStr() ) CPPUNIT_NS_BEGIN diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx index 46f1bedd53bf..1aaac1863681 100644 --- a/tools/source/fsys/tempfile.cxx +++ b/tools/source/fsys/tempfile.cxx @@ -30,7 +30,7 @@ using namespace osl; -namespace { struct TempNameBase_Impl : public rtl::Static< ::rtl::OUString, TempNameBase_Impl > {}; } +namespace { struct TempNameBase_Impl : public rtl::Static< OUString, TempNameBase_Impl > {}; } struct TempFile_Impl { @@ -40,7 +40,7 @@ struct TempFile_Impl OUString ConstructTempDir_Impl() { // use system directory - ::rtl::OUString& rTempNameBase_Impl = TempNameBase_Impl::get(); + OUString& rTempNameBase_Impl = TempNameBase_Impl::get(); if ( rTempNameBase_Impl.isEmpty() ) osl::FileBase::getTempDirURL( rTempNameBase_Impl ); OUString aName = rTempNameBase_Impl; @@ -59,14 +59,14 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru // ER 13.07.00 why not radix 36 [0-9A-Z] ?!? const unsigned nRadix = 26; String aName( rName ); - aName += rtl::OUString("sv"); + aName += OUString("sv"); rName.Erase(); static unsigned long u = Time::GetSystemTicks(); for ( unsigned long nOld = u; ++u != nOld; ) { u %= (nRadix*nRadix*nRadix); - rtl::OUString aTmp = rtl::OUStringBuffer(aName). + OUString aTmp = OUStringBuffer(aName). append((sal_Int32)(unsigned)u, nRadix). append(".tmp"). makeStringAndClear(); @@ -140,13 +140,13 @@ TempFile::TempFile( const String& rLeadingChars, const String* pExtension ) aName += rLeadingChars; for ( sal_Int32 i=0;; i++ ) { - rtl::OUStringBuffer aTmpBuffer(aName); + OUStringBuffer aTmpBuffer(aName); aTmpBuffer.append(i); if ( pExtension ) aTmpBuffer.append(*pExtension); else aTmpBuffer.append(".tmp"); - rtl::OUString aTmp = aTmpBuffer.makeStringAndClear(); + OUString aTmp = aTmpBuffer.makeStringAndClear(); File aFile( aTmp ); FileBase::RC err = aFile.open(osl_File_OpenFlag_Create); @@ -174,7 +174,7 @@ TempFile::~TempFile() String TempFile::GetName() const { - rtl::OUString aTmp; + OUString aTmp; aTmp = pImp->aName; return aTmp; } diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index b839e6deb515..93d4febe4bab 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -252,17 +252,17 @@ inline sal_Int32 INetURLObject::SubString::clear() return nDelta; } -inline sal_Int32 INetURLObject::SubString::set(rtl::OUStringBuffer & rString, - rtl::OUString const & rSubString) +inline sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString, + OUString const & rSubString) { - rtl::OUString sTemp(rString.makeStringAndClear()); + OUString sTemp(rString.makeStringAndClear()); sal_Int32 nDelta = set(sTemp, rSubString); rString.append(sTemp); return nDelta; } -inline sal_Int32 INetURLObject::SubString::set(rtl::OUString & rString, - rtl::OUString const & rSubString) +inline sal_Int32 INetURLObject::SubString::set(OUString & rString, + OUString const & rSubString) { sal_Int32 nDelta = rSubString.getLength() - m_nLength; @@ -272,8 +272,8 @@ inline sal_Int32 INetURLObject::SubString::set(rtl::OUString & rString, return nDelta; } -inline sal_Int32 INetURLObject::SubString::set(rtl::OUStringBuffer & rString, - rtl::OUString const & rSubString, +inline sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString, + OUString const & rSubString, sal_Int32 nTheBegin) { m_nBegin = nTheBegin; @@ -287,8 +287,8 @@ inline void INetURLObject::SubString::operator +=(sal_Int32 nDelta) } int INetURLObject::SubString::compare(SubString const & rOther, - rtl::OUStringBuffer const & rThisString, - rtl::OUStringBuffer const & rOtherString) const + OUStringBuffer const & rThisString, + OUStringBuffer const & rOtherString) const { sal_Int32 len = std::min(m_nLength, rOther.m_nLength); sal_Unicode const * p1 = rThisString.getStr() + m_nBegin; @@ -416,7 +416,7 @@ inline INetURLObject::SchemeInfo const & INetURLObject::getSchemeInfo() const } // static -inline void INetURLObject::appendEscape(rtl::OUStringBuffer & rTheText, +inline void INetURLObject::appendEscape(OUStringBuffer & rTheText, sal_Char cEscapePrefix, sal_uInt32 nOctet) { @@ -625,7 +625,7 @@ INetURLObject::FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin, INetURLObject::FSYS_DOS : INetURLObject::FSYS_MAC; } -rtl::OUString parseScheme( +OUString parseScheme( sal_Unicode const ** begin, sal_Unicode const * end, sal_uInt32 fragmentDelimiter) { @@ -641,18 +641,18 @@ rtl::OUString parseScheme( if (end - p > 1 && p[0] == ':' && p[1] != fragmentDelimiter && p - *begin >= 2) { - rtl::OUString scheme( - rtl::OUString(*begin, p - *begin).toAsciiLowerCase()); + OUString scheme( + OUString(*begin, p - *begin).toAsciiLowerCase()); *begin = p + 1; return scheme; } } - return rtl::OUString(); + return OUString(); } } -bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, +bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, @@ -666,7 +666,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, sal_uInt32 nFragmentDelimiter = '#'; - rtl::OUStringBuffer aSynAbsURIRef; + OUStringBuffer aSynAbsURIRef; // Parse <scheme>: sal_Unicode const * p = pPos; @@ -676,7 +676,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, pPos = p; m_eScheme = pPrefix->m_eScheme; - rtl::OUString sTemp(rtl::OUString::createFromAscii(pPrefix->m_eKind + OUString sTemp(OUString::createFromAscii(pPrefix->m_eKind >= PrefixInfo::EXTERNAL ? pPrefix->m_pTranslatedPrefix : pPrefix->m_pPrefix)); @@ -795,7 +795,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, } } - rtl::OUString aSynScheme; + OUString aSynScheme; if (m_eScheme == INET_PROT_NOT_VALID) { sal_Unicode const * p1 = pPos; aSynScheme = parseScheme(&p1, pEnd, nFragmentDelimiter); @@ -819,7 +819,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, } if (m_eScheme != INET_PROT_GENERIC) { - aSynScheme = rtl::OUString::createFromAscii(getSchemeInfo().m_pScheme); + aSynScheme = OUString::createFromAscii(getSchemeInfo().m_pScheme); } m_aScheme.set(aSynAbsURIRef, aSynScheme, aSynAbsURIRef.getLength()); aSynAbsURIRef.append(sal_Unicode(':')); @@ -850,7 +850,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, return false; } aSynAbsURIRef.append("//"); - rtl::OUStringBuffer aSynAuthority; + OUStringBuffer aSynAuthority; while (pPos < pEnd && *pPos != '/' && *pPos != '?' && *pPos != nFragmentDelimiter) @@ -876,7 +876,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, { pPos += 2; aSynAbsURIRef.append("//"); - rtl::OUStringBuffer aSynAuthority; + OUStringBuffer aSynAuthority; while (pPos < pEnd && *pPos != '/' && *pPos != '?' && *pPos != nFragmentDelimiter) @@ -920,7 +920,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, return false; } aSynAbsURIRef.append("//"); - rtl::OUStringBuffer aSynUser; + OUStringBuffer aSynUser; bool bHasUser = false; while (pPos < pEnd && *pPos != '@' @@ -938,7 +938,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, bHasUser = *pPos == '@'; } - rtl::OUStringBuffer aSynAuthority; + OUStringBuffer aSynAuthority; if ( !bHasUser ) { aSynAuthority = aSynUser; @@ -1232,7 +1232,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, bool bSupportsAuth = !bSupportsPassword && getSchemeInfo().m_bAuth; bool bHasAuth = false; - rtl::OUStringBuffer aSynUser; + OUStringBuffer aSynUser; sal_Unicode const * p1 = pUserInfoBegin; while (p1 < pUserInfoEnd) { @@ -1270,7 +1270,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, if (bSupportsPassword) { aSynAbsURIRef.append(sal_Unicode(':')); - rtl::OUStringBuffer aSynAuth; + OUStringBuffer aSynAuth; while (p1 < pUserInfoEnd) { EscapeType eEscapeType; @@ -1287,7 +1287,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, else { aSynAbsURIRef.append(";AUTH="); - rtl::OUStringBuffer aSynAuth; + OUStringBuffer aSynAuth; while (p1 < pUserInfoEnd) { EscapeType eEscapeType; @@ -1350,7 +1350,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, } break; } - rtl::OUStringBuffer aSynHost; + OUStringBuffer aSynHost; if (!parseHostOrNetBiosName( pHostPortBegin, pPort, bOctets, eMechanism, eCharset, bNetBiosName, &aSynHost)) @@ -1364,14 +1364,14 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, { aSynAbsURIRef.append(sal_Unicode(':')); m_aPort.set(aSynAbsURIRef, - rtl::OUString(pPort + 1, pHostPortEnd - (pPort + 1)), + OUString(pPort + 1, pHostPortEnd - (pPort + 1)), aSynAbsURIRef.getLength()); } } } // Parse <path> - rtl::OUStringBuffer aSynPath; + OUStringBuffer aSynPath; if (!parsePath(m_eScheme, &pPos, pEnd, bOctets, eMechanism, eCharset, bSkippedInitialSlash, nSegmentDelimiter, nAltSegmentDelimiter, @@ -1388,7 +1388,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, if (getSchemeInfo().m_bQuery && pPos < pEnd && *pPos == '?') { aSynAbsURIRef.append(sal_Unicode('?')); - rtl::OUStringBuffer aSynQuery; + OUStringBuffer aSynQuery; for (++pPos; pPos < pEnd && *pPos != nFragmentDelimiter;) { EscapeType eEscapeType; @@ -1405,7 +1405,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, if (pPos < pEnd && *pPos == nFragmentDelimiter) { aSynAbsURIRef.append(sal_Unicode(nFragmentDelimiter)); - rtl::OUStringBuffer aSynFragment; + OUStringBuffer aSynFragment; for (++pPos; pPos < pEnd;) { EscapeType eEscapeType; @@ -1450,7 +1450,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, } void INetURLObject::changeScheme(INetProtocol eTargetScheme) { - ::rtl::OUString aTmpStr=m_aAbsURIRef.makeStringAndClear(); + OUString aTmpStr=m_aAbsURIRef.makeStringAndClear(); int oldSchemeLen=strlen(getSchemeInfo().m_pScheme); m_eScheme=eTargetScheme; int newSchemeLen=strlen(getSchemeInfo().m_pScheme); @@ -1466,7 +1466,7 @@ void INetURLObject::changeScheme(INetProtocol eTargetScheme) { m_aFragment+=delta; } -bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef, +bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, bool bOctets, INetURLObject & rTheAbsURIRef, bool & rWasAbsolute, @@ -1616,7 +1616,7 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef, enum State { STATE_AUTH, STATE_ABS_PATH, STATE_REL_PATH, STATE_FRAGMENT, STATE_DONE }; - rtl::OUStringBuffer aSynAbsURIRef; + OUStringBuffer aSynAbsURIRef; // make sure that the scheme is copied for generic schemes: getSchemeInfo().m_pScheme // is empty ("") in that case, so take the scheme from m_aAbsURIRef if (m_eScheme != INET_PROT_GENERIC) @@ -1867,8 +1867,8 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef, return true; } -bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef, - bool bOctets, rtl::OUString & rTheRelURIRef, +bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef, + bool bOctets, OUString & rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, @@ -1973,7 +1973,7 @@ bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef, // only "/"---but see handling of file URLs above---, the complete subject // path could go into the new relative URL instead, but some people don't // like that): - rtl::OUStringBuffer aSynRelURIRef; + OUStringBuffer aSynRelURIRef; for (sal_Unicode const * p = pBasePathBegin + nMatch; p != pBasePathEnd; ++p) { @@ -2034,14 +2034,14 @@ bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef, } // static -bool INetURLObject::convertIntToExt(rtl::OUString const & rTheIntURIRef, - bool bOctets, rtl::OUString & rTheExtURIRef, +bool INetURLObject::convertIntToExt(OUString const & rTheIntURIRef, + bool bOctets, OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) { sal_Char cEscapePrefix = getEscapePrefix(CompareProtocolScheme(rTheIntURIRef)); - rtl::OUString aSynExtURIRef(encodeText(rTheIntURIRef, bOctets, PART_VISIBLE, + OUString aSynExtURIRef(encodeText(rTheIntURIRef, bOctets, PART_VISIBLE, cEscapePrefix, NOT_CANONIC, eCharset, true)); sal_Unicode const * pBegin = aSynExtURIRef.getStr(); @@ -2053,7 +2053,7 @@ bool INetURLObject::convertIntToExt(rtl::OUString const & rTheIntURIRef, { aSynExtURIRef = aSynExtURIRef.replaceAt(0, p - pBegin, - rtl::OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); + OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); } rTheExtURIRef = decode(aSynExtURIRef, cEscapePrefix, eDecodeMechanism, eCharset); @@ -2061,14 +2061,14 @@ bool INetURLObject::convertIntToExt(rtl::OUString const & rTheIntURIRef, } // static -bool INetURLObject::convertExtToInt(rtl::OUString const & rTheExtURIRef, - bool bOctets, rtl::OUString & rTheIntURIRef, +bool INetURLObject::convertExtToInt(OUString const & rTheExtURIRef, + bool bOctets, OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset) { sal_Char cEscapePrefix = getEscapePrefix(CompareProtocolScheme(rTheExtURIRef)); - rtl::OUString aSynIntURIRef(encodeText(rTheExtURIRef, bOctets, PART_VISIBLE, + OUString aSynIntURIRef(encodeText(rTheExtURIRef, bOctets, PART_VISIBLE, cEscapePrefix, NOT_CANONIC, eCharset, true)); sal_Unicode const * pBegin = aSynIntURIRef.getStr(); @@ -2080,7 +2080,7 @@ bool INetURLObject::convertExtToInt(rtl::OUString const & rTheExtURIRef, { aSynIntURIRef = aSynIntURIRef.replaceAt(0, p - pBegin, - rtl::OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); + OUString::createFromAscii(pPrefix->m_pTranslatedPrefix)); } rTheIntURIRef = decode(aSynIntURIRef, cEscapePrefix, eDecodeMechanism, eCharset); @@ -2254,7 +2254,7 @@ INetURLObject::SubString INetURLObject::getAuthority() const return SubString(nBegin, nEnd - nBegin); } -bool INetURLObject::setUser(rtl::OUString const & rTheUser, +bool INetURLObject::setUser(OUString const & rTheUser, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -2266,7 +2266,7 @@ bool INetURLObject::setUser(rtl::OUString const & rTheUser, return false; } - rtl::OUString aNewUser(encodeText(rTheUser, bOctets, + OUString aNewUser(encodeText(rTheUser, bOctets, m_eScheme == INET_PROT_IMAP ? PART_IMAP_ACHAR : m_eScheme == INET_PROT_VIM ? @@ -2297,10 +2297,10 @@ bool INetURLObject::setUser(rtl::OUString const & rTheUser, namespace { - void lcl_Erase(rtl::OUStringBuffer &rBuf, sal_Int32 index, sal_Int32 count) + void lcl_Erase(OUStringBuffer &rBuf, sal_Int32 index, sal_Int32 count) { - rtl::OUString sTemp(rBuf.makeStringAndClear()); - rBuf.append(sTemp.replaceAt(index, count, rtl::OUString())); + OUString sTemp(rBuf.makeStringAndClear()); + rBuf.append(sTemp.replaceAt(index, count, OUString())); } } @@ -2322,13 +2322,13 @@ bool INetURLObject::clearPassword() return true; } -bool INetURLObject::setPassword(rtl::OUString const & rThePassword, +bool INetURLObject::setPassword(OUString const & rThePassword, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (!getSchemeInfo().m_bPassword) return false; - rtl::OUString aNewAuth(encodeText(rThePassword, bOctets, + OUString aNewAuth(encodeText(rThePassword, bOctets, m_eScheme == INET_PROT_VIM ? PART_VIM : PART_USER_PASSWORD, getEscapePrefix(), eMechanism, eCharset, @@ -2345,8 +2345,8 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword, else if (m_aHost.isPresent()) { m_aAbsURIRef.insert(m_aHost.getBegin(), - rtl::OUString( ":@" )); - m_aUser.set(m_aAbsURIRef, rtl::OUString(), m_aHost.getBegin()); + OUString( ":@" )); + m_aUser.set(m_aAbsURIRef, OUString(), m_aHost.getBegin()); nDelta = m_aAuth.set(m_aAbsURIRef, aNewAuth, m_aHost.getBegin() + 1) + 2; } @@ -2355,7 +2355,7 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword, else { m_aAbsURIRef.insert(m_aPath.getBegin(), sal_Unicode(':')); - m_aUser.set(m_aAbsURIRef, rtl::OUString(), m_aPath.getBegin()); + m_aUser.set(m_aAbsURIRef, OUString(), m_aPath.getBegin()); nDelta = m_aAuth.set(m_aAbsURIRef, aNewAuth, m_aPath.getBegin() + 1) + 1; } @@ -2369,7 +2369,7 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword, // static bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * pEnd, - rtl::OUString & rCanonic) + OUString & rCanonic) { // RFC 2373 is inconsistent about how to write an IPv6 address in which an // IPv4 address directly follows the abbreviating "::". The ABNF in @@ -2383,7 +2383,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p STATE_IP6_HEXSEQ1_MAYBE_IP4, STATE_IP6_HEXSEQ2, STATE_IP6_HEXSEQ2_COLON, STATE_IP6_HEXSEQ2_MAYBE_IP4, STATE_IP6_IP4, STATE_IP6_IP4_DOT, STATE_IP6_DONE }; - rtl::OUStringBuffer aTheCanonic; + OUStringBuffer aTheCanonic; sal_uInt32 nNumber = 0; int nDigits = 0; int nOctets = 0; @@ -2466,7 +2466,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (nOctets < 4) { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); aTheCanonic.append(sal_Unicode('.')); ++nOctets; eState = STATE_IP4_DOT; @@ -2565,13 +2565,13 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (*p == ']') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); eState = STATE_IP6_DONE; } else if (*p == ':') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); aTheCanonic.append(sal_Unicode(':')); eState = STATE_IP6_HEXSEQ1_COLON; } @@ -2610,13 +2610,13 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (*p == ']') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); eState = STATE_IP6_DONE; } else if (*p == ':') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); aTheCanonic.append(sal_Unicode(':')); eState = STATE_IP6_HEXSEQ1_COLON; } @@ -2625,7 +2625,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p nNumber = 100 * (nNumber >> 8) + 10 * (nNumber >> 4 & 15) + (nNumber & 15); aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); aTheCanonic.append(sal_Unicode('.')); nOctets = 2; eState = STATE_IP6_IP4_DOT; @@ -2649,13 +2649,13 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (*p == ']') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); eState = STATE_IP6_DONE; } else if (*p == ':') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); aTheCanonic.append(sal_Unicode(':')); eState = STATE_IP6_HEXSEQ2_COLON; } @@ -2689,13 +2689,13 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (*p == ']') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); eState = STATE_IP6_DONE; } else if (*p == ':') { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber), 16)); + OUString::valueOf(sal_Int32(nNumber), 16)); aTheCanonic.append(sal_Unicode(':')); eState = STATE_IP6_HEXSEQ2_COLON; } @@ -2704,7 +2704,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p nNumber = 100 * (nNumber >> 8) + 10 * (nNumber >> 4 & 15) + (nNumber & 15); aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); aTheCanonic.append(sal_Unicode('.')); nOctets = 2; eState = STATE_IP6_IP4_DOT; @@ -2729,7 +2729,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (nOctets == 4) { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); eState = STATE_IP6_DONE; } else @@ -2738,7 +2738,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (nOctets < 4) { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); aTheCanonic.append(sal_Unicode('.')); ++nOctets; eState = STATE_IP6_IP4_DOT; @@ -2784,7 +2784,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p if (nOctets == 4) { aTheCanonic.append( - rtl::OUString::valueOf(sal_Int32(nNumber))); + OUString::valueOf(sal_Int32(nNumber))); rBegin = p; rCanonic = aTheCanonic.makeStringAndClear(); return true; @@ -2806,9 +2806,9 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p bool INetURLObject::parseHostOrNetBiosName( sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bNetBiosName, - rtl::OUStringBuffer* pCanonic) + OUStringBuffer* pCanonic) { - rtl::OUString aTheCanonic; + OUString aTheCanonic; if (pBegin < pEnd) { sal_Unicode const * p = pBegin; @@ -2816,7 +2816,7 @@ bool INetURLObject::parseHostOrNetBiosName( { if (bNetBiosName) { - rtl::OUStringBuffer buf; + OUStringBuffer buf; while (pBegin < pEnd) { EscapeType eEscapeType; @@ -2864,19 +2864,19 @@ bool INetURLObject::parseHostOrNetBiosName( return true; } -bool INetURLObject::setHost(rtl::OUString const & rTheHost, bool bOctets, +bool INetURLObject::setHost(OUString const & rTheHost, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (!getSchemeInfo().m_bHost) return false; - rtl::OUStringBuffer aSynHost(rTheHost); + OUStringBuffer aSynHost(rTheHost); bool bNetBiosName = false; switch (m_eScheme) { case INET_PROT_FILE: { - rtl::OUString sTemp(aSynHost.toString()); + OUString sTemp(aSynHost.toString()); if (sTemp.equalsIgnoreAsciiCase("localhost")) { aSynHost.setLength(0); @@ -2918,12 +2918,12 @@ bool INetURLObject::parsePath(INetProtocol eScheme, sal_uInt32 nAltSegmentDelimiter, sal_uInt32 nQueryDelimiter, sal_uInt32 nFragmentDelimiter, - rtl::OUStringBuffer &rSynPath) + OUStringBuffer &rSynPath) { DBG_ASSERT(pBegin, "INetURLObject::parsePath(): Null output param"); sal_Unicode const * pPos = *pBegin; - rtl::OUStringBuffer aTheSynPath; + OUStringBuffer aTheSynPath; switch (eScheme) { @@ -3084,7 +3084,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme, while (p < pEnd && *pPos != nQueryDelimiter && *pPos != nFragmentDelimiter) ++p; - rtl::OUString aCanonic; + OUString aCanonic; if (!parseHost(pPos, p, aCanonic)) return false; aTheSynPath.append(aCanonic); @@ -3225,7 +3225,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme, eCharset, false); } bool bInbox; - rtl::OUString sCompare(aTheSynPath.toString()); + OUString sCompare(aTheSynPath.toString()); if ( sCompare == "/inbox" ) bInbox = true; else if ( sCompare == "/newsgroups" ) @@ -3374,11 +3374,11 @@ bool INetURLObject::parsePath(INetProtocol eScheme, return true; } -bool INetURLObject::setPath(rtl::OUString const & rThePath, bool bOctets, +bool INetURLObject::setPath(OUString const & rThePath, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { - rtl::OUStringBuffer aSynPath; + OUStringBuffer aSynPath; sal_Unicode const * p = rThePath.getStr(); sal_Unicode const * pEnd = p + rThePath.getLength(); if (!parsePath(m_eScheme, &p, pEnd, bOctets, eMechanism, eCharset, false, @@ -3401,7 +3401,7 @@ bool INetURLObject::checkHierarchical() const { } } -bool INetURLObject::appendSegment(rtl::OUString const & rTheSegment, +bool INetURLObject::appendSegment(OUString const & rTheSegment, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -3455,7 +3455,7 @@ INetURLObject::SubString INetURLObject::getSegment(sal_Int32 nIndex, pSegEnd - pSegBegin); } -bool INetURLObject::insertName(rtl::OUString const & rTheName, bool bOctets, +bool INetURLObject::insertName(OUString const & rTheName, bool bOctets, bool bAppendFinalSlash, sal_Int32 nIndex, bool bIgnoreFinalSlash, EncodeMechanism eMechanism, @@ -3528,7 +3528,7 @@ bool INetURLObject::insertName(rtl::OUString const & rTheName, bool bOctets, } } - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pPrefixEnd - pPathBegin); aNewPath.append(sal_Unicode('/')); aNewPath.append(encodeText(rTheName, bOctets, PART_PCHAR, getEscapePrefix(), @@ -3555,13 +3555,13 @@ bool INetURLObject::clearQuery() return false; } -bool INetURLObject::setQuery(rtl::OUString const & rTheQuery, bool bOctets, +bool INetURLObject::setQuery(OUString const & rTheQuery, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (!getSchemeInfo().m_bQuery) return false; - rtl::OUString aNewQuery(encodeText(rTheQuery, bOctets, PART_URIC, + OUString aNewQuery(encodeText(rTheQuery, bOctets, PART_URIC, getEscapePrefix(), eMechanism, eCharset, true)); sal_Int32 nDelta; @@ -3589,13 +3589,13 @@ bool INetURLObject::clearFragment() return true; } -bool INetURLObject::setFragment(rtl::OUString const & rTheFragment, +bool INetURLObject::setFragment(OUString const & rTheFragment, bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { if (HasError()) return false; - rtl::OUString aNewFragment(encodeText(rTheFragment, bOctets, PART_URIC, + OUString aNewFragment(encodeText(rTheFragment, bOctets, PART_URIC, getEscapePrefix(), eMechanism, eCharset, true)); if (m_aFragment.isPresent()) @@ -3620,14 +3620,14 @@ bool INetURLObject::hasDosVolume(FSysStyle eStyle) const } // static -rtl::OUString INetURLObject::encodeText(sal_Unicode const * pBegin, +OUString INetURLObject::encodeText(sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets, Part ePart, sal_Char cEscapePrefix, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes) { - rtl::OUStringBuffer aResult; + OUStringBuffer aResult; while (pBegin < pEnd) { EscapeType eEscapeType; @@ -3640,7 +3640,7 @@ rtl::OUString INetURLObject::encodeText(sal_Unicode const * pBegin, } // static -rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin, +OUString INetURLObject::decode(sal_Unicode const * pBegin, sal_Unicode const * pEnd, sal_Char cEscapePrefix, DecodeMechanism eMechanism, @@ -3649,7 +3649,7 @@ rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin, switch (eMechanism) { case NO_DECODE: - return rtl::OUString(pBegin, pEnd - pBegin); + return OUString(pBegin, pEnd - pBegin); case DECODE_TO_IURI: eCharset = RTL_TEXTENCODING_UTF8; @@ -3658,7 +3658,7 @@ rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin, default: break; } - rtl::OUStringBuffer aResult; + OUStringBuffer aResult; while (pBegin < pEnd) { EscapeType eEscapeType; @@ -3696,7 +3696,7 @@ rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin, return aResult.makeStringAndClear(); } -rtl::OUString INetURLObject::GetURLNoPass(DecodeMechanism eMechanism, +OUString INetURLObject::GetURLNoPass(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { INetURLObject aTemp(*this); @@ -3704,7 +3704,7 @@ rtl::OUString INetURLObject::GetURLNoPass(DecodeMechanism eMechanism, return aTemp.GetMainURL(eMechanism, eCharset); } -rtl::OUString INetURLObject::GetURLNoMark(DecodeMechanism eMechanism, +OUString INetURLObject::GetURLNoMark(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { INetURLObject aTemp(*this); @@ -3712,7 +3712,7 @@ rtl::OUString INetURLObject::GetURLNoMark(DecodeMechanism eMechanism, return aTemp.GetMainURL(eMechanism, eCharset); } -rtl::OUString +OUString INetURLObject::getAbbreviated( star::uno::Reference< star::util::XStringWidth > const & rStringWidth, sal_Int32 nWidth, @@ -3722,7 +3722,7 @@ INetURLObject::getAbbreviated( { OSL_ENSURE(rStringWidth.is(), "specification violation"); sal_Char cEscapePrefix = getEscapePrefix(); - rtl::OUStringBuffer aBuffer; + OUStringBuffer aBuffer; // make sure that the scheme is copied for generic schemes: getSchemeInfo().m_pScheme // is empty ("") in that case, so take the scheme from m_aAbsURIRef if (m_eScheme != INET_PROT_GENERIC) @@ -3754,12 +3754,12 @@ INetURLObject::getAbbreviated( bool bSegment = false; if (getSchemeInfo().m_bHierarchical) { - rtl::OUString aRest; + OUString aRest; if (m_aQuery.isPresent()) aRest = "?..."; else if (m_aFragment.isPresent()) aRest = "#..."; - rtl::OUStringBuffer aTrailer; + OUStringBuffer aTrailer; sal_Unicode const * pBegin = pCoreBegin; sal_Unicode const * pEnd = pCoreEnd; sal_Unicode const * pPrefixBegin = pBegin; @@ -3777,7 +3777,7 @@ INetURLObject::getAbbreviated( --p; if (bAuthority && p == pCoreBegin + 1) --p; - rtl::OUString + OUString aSegment(decode(p + (p == pBegin && pBegin != pCoreBegin ? 1 : 0), pSuffixEnd, @@ -3785,7 +3785,7 @@ INetURLObject::getAbbreviated( eMechanism, eCharset)); pSuffixEnd = p; - rtl::OUStringBuffer aResult(aBuffer); + OUStringBuffer aResult(aBuffer); if (pSuffixEnd != pBegin) aResult.append("..."); aResult.append(aSegment); @@ -3817,7 +3817,7 @@ INetURLObject::getAbbreviated( ++p; if (p == pCoreEnd - 1 && *p == '/') ++p; - rtl::OUString + OUString aSegment(decode(pPrefixBegin + (pPrefixBegin == pCoreBegin ? 0 : 1), @@ -3826,7 +3826,7 @@ INetURLObject::getAbbreviated( eMechanism, eCharset)); pPrefixBegin = p; - rtl::OUStringBuffer aResult(aBuffer); + OUStringBuffer aResult(aBuffer); aResult.append(aSegment); if (pPrefixBegin != pEnd) aResult.append("..."); @@ -3875,7 +3875,7 @@ INetURLObject::getAbbreviated( } if (aBuffer.getLength() != 0) { - rtl::OUStringBuffer aResult(aBuffer); + OUStringBuffer aResult(aBuffer); if (rStringWidth->queryStringWidth(aResult.makeStringAndClear()) > nWidth) for (sal_Int32 i = aBuffer.getLength();;) @@ -3919,8 +3919,8 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const || GetParam(NO_DECODE) != rObject.GetParam(NO_DECODE) || GetMsgId(NO_DECODE) != rObject.GetMsgId(NO_DECODE)) return false; - rtl::OUString aPath1(GetURLPath(NO_DECODE)); - rtl::OUString aPath2(rObject.GetURLPath(NO_DECODE)); + OUString aPath1(GetURLPath(NO_DECODE)); + OUString aPath2(rObject.GetURLPath(NO_DECODE)); switch (m_eScheme) { case INET_PROT_FILE: @@ -3985,8 +3985,8 @@ bool INetURLObject::operator <(INetURLObject const & rObject) const return true; else if (nCompare > 0) return false; - const rtl::OUString &rPath1(GetURLPath(NO_DECODE)); - const rtl::OUString &rPath2(rObject.GetURLPath(NO_DECODE)); + const OUString &rPath1(GetURLPath(NO_DECODE)); + const OUString &rPath2(rObject.GetURLPath(NO_DECODE)); nCompare = rPath1.compareTo(rPath2); if (nCompare < 0) return true; @@ -4001,11 +4001,11 @@ bool INetURLObject::operator <(INetURLObject const & rObject) const } bool INetURLObject::ConcatData(INetProtocol eTheScheme, - rtl::OUString const & rTheUser, - rtl::OUString const & rThePassword, - rtl::OUString const & rTheHost, + OUString const & rTheUser, + OUString const & rThePassword, + OUString const & rTheHost, sal_uInt32 nThePort, - rtl::OUString const & rThePath, + OUString const & rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -4071,13 +4071,13 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, m_aAbsURIRef.append(sal_Unicode('@')); if (getSchemeInfo().m_bHost) { - rtl::OUStringBuffer aSynHost(rTheHost); + OUStringBuffer aSynHost(rTheHost); bool bNetBiosName = false; switch (m_eScheme) { case INET_PROT_FILE: { - rtl::OUString sTemp(aSynHost.toString()); + OUString sTemp(aSynHost.toString()); if (sTemp.equalsIgnoreAsciiCase( "localhost" )) { aSynHost.setLength(0); @@ -4117,7 +4117,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, { m_aAbsURIRef.append(sal_Unicode(':')); m_aPort.set(m_aAbsURIRef, - rtl::OUString::valueOf(sal_Int64(nThePort)), + OUString::valueOf(sal_Int64(nThePort)), m_aAbsURIRef.getLength()); } else @@ -4133,7 +4133,7 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, return false; } } - rtl::OUStringBuffer aSynPath; + OUStringBuffer aSynPath; sal_Unicode const * p = rThePath.getStr(); sal_Unicode const * pEnd = p + rThePath.getLength(); if (!parsePath(m_eScheme, &p, pEnd, false, eMechanism, eCharset, false, '/', @@ -4149,8 +4149,8 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, } // static -rtl::OUString INetURLObject::GetAbsURL(rtl::OUString const & rTheBaseURIRef, - rtl::OUString const & rTheRelURIRef, +OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef, + OUString const & rTheRelURIRef, bool bIgnoreFragment, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, @@ -4175,23 +4175,23 @@ rtl::OUString INetURLObject::GetAbsURL(rtl::OUString const & rTheBaseURIRef, rTheRelURIRef; } -rtl::OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism, +OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { - rtl::OUString aTheExtURIRef; + OUString aTheExtURIRef; translateToExternal( m_aAbsURIRef.toString(), aTheExtURIRef, eMechanism, eCharset); return aTheExtURIRef; } // static -rtl::OUString INetURLObject::GetScheme(INetProtocol eTheScheme) +OUString INetURLObject::GetScheme(INetProtocol eTheScheme) { - return rtl::OUString::createFromAscii(getSchemeInfo(eTheScheme).m_pPrefix); + return OUString::createFromAscii(getSchemeInfo(eTheScheme).m_pPrefix); } // static -INetProtocol INetURLObject::CompareProtocolScheme(rtl::OUString const & +INetProtocol INetURLObject::CompareProtocolScheme(OUString const & rTheAbsURIRef) { sal_Unicode const * p = rTheAbsURIRef.getStr(); @@ -4199,14 +4199,14 @@ INetProtocol INetURLObject::CompareProtocolScheme(rtl::OUString const & return pPrefix ? pPrefix->m_eScheme : INET_PROT_NOT_VALID; } -rtl::OUString INetURLObject::GetHostPort(DecodeMechanism eMechanism, +OUString INetURLObject::GetHostPort(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) { // Check because PROT_VND_SUN_STAR_HELP, PROT_VND_SUN_STAR_HIER, and // PROT_VND_SUN_STAR_PKG misuse m_aHost: if (!getSchemeInfo().m_bHost) - return rtl::OUString(); - rtl::OUStringBuffer aHostPort(decode(m_aHost, getEscapePrefix(), + return OUString(); + OUStringBuffer aHostPort(decode(m_aHost, getEscapePrefix(), eMechanism, eCharset)); if (m_aPort.isPresent()) { @@ -4234,7 +4234,7 @@ bool INetURLObject::SetPort(sal_uInt32 nThePort) { if (getSchemeInfo().m_bPort && m_aHost.isPresent()) { - rtl::OUString aNewPort(rtl::OUString::valueOf(sal_Int64(nThePort))); + OUString aNewPort(OUString::valueOf(sal_Int64(nThePort))); sal_Int32 nDelta; if (m_aPort.isPresent()) nDelta = m_aPort.set(m_aAbsURIRef, aNewPort); @@ -4274,7 +4274,7 @@ bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash) if (!aSegment.isPresent()) return false; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(m_aAbsURIRef.getStr() + m_aPath.getBegin(), aSegment.getBegin() - m_aPath.getBegin()); if (bIgnoreFinalSlash && aSegment.getEnd() == m_aPath.getEnd()) @@ -4292,13 +4292,13 @@ bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash) RTL_TEXTENCODING_UTF8); } -rtl::OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash, +OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash)); if (!aSegment.isPresent()) - return rtl::OUString(); + return OUString(); sal_Unicode const * pSegBegin = m_aAbsURIRef.getStr() + aSegment.getBegin(); @@ -4313,7 +4313,7 @@ rtl::OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash, return decode(pSegBegin, p, getEscapePrefix(), eMechanism, eCharset); } -bool INetURLObject::setName(rtl::OUString const & rTheName, sal_Int32 nIndex, +bool INetURLObject::setName(OUString const & rTheName, sal_Int32 nIndex, bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -4335,7 +4335,7 @@ bool INetURLObject::setName(rtl::OUString const & rTheName, sal_Int32 nIndex, while (p != pSegEnd && *p != ';') ++p; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pSegBegin - pPathBegin); aNewPath.append(encodeText(rTheName, false, PART_PCHAR, getEscapePrefix(), eMechanism, eCharset, true)); @@ -4364,13 +4364,13 @@ bool INetURLObject::hasExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash) return false; } -rtl::OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash, +OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash)); if (!aSegment.isPresent()) - return rtl::OUString(); + return OUString(); sal_Unicode const * pSegBegin = m_aAbsURIRef.getStr() + aSegment.getBegin(); @@ -4390,7 +4390,7 @@ rtl::OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash, eCharset); } -bool INetURLObject::setBase(rtl::OUString const & rTheBase, sal_Int32 nIndex, +bool INetURLObject::setBase(OUString const & rTheBase, sal_Int32 nIndex, bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -4416,7 +4416,7 @@ bool INetURLObject::setBase(rtl::OUString const & rTheBase, sal_Int32 nIndex, if (!pExtension) pExtension = p; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pSegBegin - pPathBegin); aNewPath.append(encodeText(rTheBase, false, PART_PCHAR, getEscapePrefix(), eMechanism, eCharset, true)); @@ -4426,14 +4426,14 @@ bool INetURLObject::setBase(rtl::OUString const & rTheBase, sal_Int32 nIndex, RTL_TEXTENCODING_UTF8); } -rtl::OUString INetURLObject::getExtension(sal_Int32 nIndex, +OUString INetURLObject::getExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash)); if (!aSegment.isPresent()) - return rtl::OUString(); + return OUString(); sal_Unicode const * pSegBegin = m_aAbsURIRef.getStr() + aSegment.getBegin(); @@ -4448,12 +4448,12 @@ rtl::OUString INetURLObject::getExtension(sal_Int32 nIndex, pExtension = p; if (!pExtension) - return rtl::OUString(); + return OUString(); return decode(pExtension + 1, p, getEscapePrefix(), eMechanism, eCharset); } -bool INetURLObject::setExtension(rtl::OUString const & rTheExtension, +bool INetURLObject::setExtension(OUString const & rTheExtension, sal_Int32 nIndex, bool bIgnoreFinalSlash, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) @@ -4479,7 +4479,7 @@ bool INetURLObject::setExtension(rtl::OUString const & rTheExtension, if (!pExtension) pExtension = p; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pExtension - pPathBegin); aNewPath.append(sal_Unicode('.')); aNewPath.append(encodeText(rTheExtension, false, PART_PCHAR, @@ -4513,7 +4513,7 @@ bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash) if (!pExtension) return true; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pExtension - pPathBegin); aNewPath.append(p, pPathEnd - p); @@ -4543,7 +4543,7 @@ bool INetURLObject::setFinalSlash() if (pPathEnd > pPathBegin && pPathEnd[-1] == '/') return true; - rtl::OUStringBuffer aNewPath; + OUStringBuffer aNewPath; aNewPath.append(pPathBegin, pPathEnd - pPathBegin); aNewPath.append(sal_Unicode('/')); @@ -4565,12 +4565,12 @@ bool INetURLObject::removeFinalSlash() --pPathEnd; if (pPathEnd == pPathBegin && *pPathBegin == '/') return false; - rtl::OUString aNewPath(pPathBegin, pPathEnd - pPathBegin); + OUString aNewPath(pPathBegin, pPathEnd - pPathBegin); return setPath(aNewPath, false, NOT_CANONIC, RTL_TEXTENCODING_UTF8); } -bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, +bool INetURLObject::setFSysPath(OUString const & rFSysPath, FSysStyle eStyle) { sal_Unicode const * pFSysBegin = rFSysPath.getStr(); @@ -4602,7 +4602,7 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, } sal_Unicode const * p = pFSysBegin + 2; - rtl::OUString aHost; + OUString aHost; if (parseHost(p, pFSysEnd, aHost) && (p == pFSysEnd || *p == '/')) { @@ -4617,7 +4617,7 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, && pFSysBegin[1] == '\\') { sal_Unicode const * p = pFSysBegin + 2; - rtl::OUString aHost; + OUString aHost; if (parseHost(p, pFSysEnd, aHost) && (p == pFSysEnd || *p == '\\')) { @@ -4646,7 +4646,7 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, break; } - rtl::OUStringBuffer aSynAbsURIRef(rtl::OUString("file://")); + OUStringBuffer aSynAbsURIRef(OUString("file://")); switch (eStyle) { @@ -4766,11 +4766,11 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath, return true; } -rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, +OUString INetURLObject::getFSysPath(FSysStyle eStyle, sal_Unicode * pDelimiter) const { if (m_eScheme != INET_PROT_FILE) - return rtl::OUString(); + return OUString(); if ((eStyle & FSYS_VOS ? 1 : 0) + (eStyle & FSYS_UNX ? 1 : 0) @@ -4800,7 +4800,7 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, if (pDelimiter) *pDelimiter = '/'; - rtl::OUStringBuffer aSynFSysPath; + OUStringBuffer aSynFSysPath; aSynFSysPath.append("//"); if (m_aHost.isPresent() && m_aHost.getLength() > 0) aSynFSysPath.append(decode(m_aHost, '%', DECODE_WITH_CHARSET, @@ -4815,7 +4815,7 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, case FSYS_UNX: { if (m_aHost.isPresent() && m_aHost.getLength() > 0) - return rtl::OUString(); + return OUString(); if (pDelimiter) *pDelimiter = '/'; @@ -4829,7 +4829,7 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, if (pDelimiter) *pDelimiter = '\\'; - rtl::OUStringBuffer aSynFSysPath; + OUStringBuffer aSynFSysPath; if (m_aHost.isPresent() && m_aHost.getLength() > 0) { aSynFSysPath.append("\\\\"); @@ -4860,12 +4860,12 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, case FSYS_MAC: { if (m_aHost.isPresent() && m_aHost.getLength() > 0) - return rtl::OUString(); + return OUString(); if (pDelimiter) *pDelimiter = ':'; - rtl::OUStringBuffer aSynFSysPath; + OUStringBuffer aSynFSysPath; sal_Unicode const * p = m_aAbsURIRef.getStr() + m_aPath.getBegin(); sal_Unicode const * pEnd = p + m_aPath.getLength(); @@ -4887,25 +4887,25 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle, } default: - return rtl::OUString(); + return OUString(); } } -rtl::OUString INetURLObject::GetMsgId(DecodeMechanism eMechanism, +OUString INetURLObject::GetMsgId(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { if (m_eScheme != INET_PROT_POP3) - return rtl::OUString(); + return OUString(); sal_Unicode const * p = m_aAbsURIRef.getStr() + m_aPath.getBegin(); sal_Unicode const * pEnd = p + m_aPath.getLength(); for (; p < pEnd; ++p) if (*p == '<') return decode(p, pEnd, getEscapePrefix(), eMechanism, eCharset); - return rtl::OUString(); + return OUString(); } // static -void INetURLObject::appendUCS4Escape(rtl::OUStringBuffer & rTheText, +void INetURLObject::appendUCS4Escape(OUStringBuffer & rTheText, sal_Char cEscapePrefix, sal_uInt32 nUCS4) { DBG_ASSERT(nUCS4 < 0x80000000, @@ -4950,7 +4950,7 @@ void INetURLObject::appendUCS4Escape(rtl::OUStringBuffer & rTheText, } // static -void INetURLObject::appendUCS4(rtl::OUStringBuffer& rTheText, sal_uInt32 nUCS4, +void INetURLObject::appendUCS4(OUStringBuffer& rTheText, sal_uInt32 nUCS4, EscapeType eEscapeType, bool bOctets, Part ePart, sal_Char cEscapePrefix, rtl_TextEncoding eCharset, @@ -5230,12 +5230,12 @@ bool INetURLObject::scanIPv6reference(sal_Unicode const *& rBegin, return false; } -rtl::OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism, +OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { if (!checkHierarchical()) - return rtl::OUString(); + return OUString(); INetURLObject aTemp(*this); aTemp.clearFragment(); aTemp.clearQuery(); @@ -5244,13 +5244,13 @@ rtl::OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism, return aTemp.GetMainURL(eMechanism, eCharset); } -rtl::OUString INetURLObject::GetLastName(DecodeMechanism eMechanism, +OUString INetURLObject::GetLastName(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { return getName(LAST_SEGMENT, true, eMechanism, eCharset); } -rtl::OUString INetURLObject::GetFileExtension(DecodeMechanism eMechanism, +OUString INetURLObject::GetFileExtension(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const { return getExtension(LAST_SEGMENT, false, eMechanism, eCharset); @@ -5267,29 +5267,29 @@ bool INetURLObject::CutLastName() return true; } -rtl::OUString INetURLObject::PathToFileName() const +OUString INetURLObject::PathToFileName() const { if (m_eScheme != INET_PROT_FILE) - return rtl::OUString(); - rtl::OUString aSystemPath; + return OUString(); + OUString aSystemPath; if (osl::FileBase::getSystemPathFromFileURL( decode(m_aAbsURIRef.getStr(), m_aAbsURIRef.getStr() + m_aPath.getEnd(), getEscapePrefix(), NO_DECODE, RTL_TEXTENCODING_UTF8), aSystemPath) != osl::FileBase::E_None) - return rtl::OUString(); + return OUString(); return aSystemPath; } -rtl::OUString INetURLObject::GetFull() const +OUString INetURLObject::GetFull() const { INetURLObject aTemp(*this); aTemp.removeFinalSlash(); return aTemp.PathToFileName(); } -rtl::OUString INetURLObject::GetPath() const +OUString INetURLObject::GetPath() const { INetURLObject aTemp(*this); aTemp.removeSegment(LAST_SEGMENT, true); @@ -5297,17 +5297,17 @@ rtl::OUString INetURLObject::GetPath() const return aTemp.PathToFileName(); } -void INetURLObject::SetBase(rtl::OUString const & rTheBase) +void INetURLObject::SetBase(OUString const & rTheBase) { setBase(rTheBase, LAST_SEGMENT, true, ENCODE_ALL); } -rtl::OUString INetURLObject::GetBase() const +OUString INetURLObject::GetBase() const { return getBase(LAST_SEGMENT, true, DECODE_WITH_CHARSET); } -void INetURLObject::SetName(rtl::OUString const & rTheName, +void INetURLObject::SetName(OUString const & rTheName, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { @@ -5318,20 +5318,20 @@ void INetURLObject::SetName(rtl::OUString const & rTheName, *this = aTemp; } -void INetURLObject::SetExtension(rtl::OUString const & rTheExtension, +void INetURLObject::SetExtension(OUString const & rTheExtension, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { setExtension(rTheExtension, LAST_SEGMENT, false, eMechanism, eCharset); } -rtl::OUString INetURLObject::CutExtension(DecodeMechanism eMechanism, +OUString INetURLObject::CutExtension(DecodeMechanism eMechanism, rtl_TextEncoding eCharset) { - rtl::OUString aTheExtension(getExtension(LAST_SEGMENT, false, eMechanism, + OUString aTheExtension(getExtension(LAST_SEGMENT, false, eMechanism, eCharset)); return removeExtension(LAST_SEGMENT, false) - ? aTheExtension : rtl::OUString(); + ? aTheExtension : OUString(); } bool INetURLObject::IsCaseSensitive() const diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx index 303b59cfbc11..a38c66eda085 100644 --- a/tools/source/fsys/wldcrd.cxx +++ b/tools/source/fsys/wldcrd.cxx @@ -88,8 +88,8 @@ sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const sal_Bool WildCard::Matches( const String& rString ) const { - rtl::OString aTmpWild = aWildString; - rtl::OString aString(rtl::OUStringToOString(rString, osl_getThreadTextEncoding())); + OString aTmpWild = aWildString; + OString aString(OUStringToOString(rString, osl_getThreadTextEncoding())); sal_Int32 nSepPos; diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx index 49341cfb5d47..7104fe2e8657 100644 --- a/tools/source/generic/bigint.cxx +++ b/tools/source/generic/bigint.cxx @@ -483,7 +483,7 @@ BigInt::BigInt( const BigInt& rBigInt ) } } -BigInt::BigInt( const rtl::OUString& rString ) +BigInt::BigInt( const OUString& rString ) { bIsSet = sal_True; bIsNeg = sal_False; @@ -606,7 +606,7 @@ BigInt::operator double() const } } -rtl::OUString BigInt::GetString() const +OUString BigInt::GetString() const { String aString; diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index dac13f01b863..64c0fdf23f06 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -38,8 +38,8 @@ struct ImplKeyData { ImplKeyData* mpNext; - rtl::OString maKey; - rtl::OString maValue; + OString maKey; + OString maValue; sal_Bool mbIsComment; }; @@ -47,14 +47,14 @@ struct ImplGroupData { ImplGroupData* mpNext; ImplKeyData* mpFirstKey; - rtl::OString maGroupName; + OString maGroupName; sal_uInt16 mnEmptyLines; }; struct ImplConfigData { ImplGroupData* mpFirstGroup; - rtl::OUString maFileName; + OUString maFileName; sal_uIntPtr mnDataUpdateId; sal_uIntPtr mnTimeStamp; LineEnd meLineEnd; @@ -66,7 +66,7 @@ struct ImplConfigData static String toUncPath( const String& rPath ) { - ::rtl::OUString aFileURL; + OUString aFileURL; // check if rFileName is already a URL; if not make it so if( rPath.CompareToAscii( "file://", 7 ) == COMPARE_EQUAL ) @@ -77,7 +77,7 @@ static String toUncPath( const String& rPath ) return aFileURL; } -static sal_uIntPtr ImplSysGetConfigTimeStamp( const rtl::OUString& rFileName ) +static sal_uIntPtr ImplSysGetConfigTimeStamp( const OUString& rFileName ) { sal_uIntPtr nTimeStamp = 0; ::osl::DirectoryItem aItem; @@ -92,7 +92,7 @@ static sal_uIntPtr ImplSysGetConfigTimeStamp( const rtl::OUString& rFileName ) return nTimeStamp; } -static sal_uInt8* ImplSysReadConfig( const rtl::OUString& rFileName, +static sal_uInt8* ImplSysReadConfig( const OUString& rFileName, sal_uInt64& rRead, sal_Bool& rbRead, sal_Bool& rbIsUTF8BOM, sal_uIntPtr& rTimeStamp ) { sal_uInt8* pBuf = NULL; @@ -136,7 +136,7 @@ static sal_uInt8* ImplSysReadConfig( const rtl::OUString& rFileName, return pBuf; } -static sal_Bool ImplSysWriteConfig( const rtl::OUString& rFileName, +static sal_Bool ImplSysWriteConfig( const OUString& rFileName, const sal_uInt8* pBuf, sal_uIntPtr nBufLen, sal_Bool rbIsUTF8BOM, sal_uIntPtr& rTimeStamp ) { sal_Bool bSuccess = sal_False; @@ -177,7 +177,7 @@ static sal_Bool ImplSysWriteConfig( const rtl::OUString& rFileName, } namespace { -rtl::OString makeOString(const sal_uInt8* p, sal_uInt64 n) +OString makeOString(const sal_uInt8* p, sal_uInt64 n) { if (n > SAL_MAX_INT32) { @@ -187,7 +187,7 @@ rtl::OString makeOString(const sal_uInt8* p, sal_uInt64 n) ::std::abort(); //TODO: handle this gracefully #endif } - return rtl::OString( + return OString( reinterpret_cast< char const * >(p), sal::static_int_cast< sal_Int32 >(n)); } @@ -580,7 +580,7 @@ static void ImplDeleteConfigData( ImplConfigData* pData ) pData->mpFirstGroup = NULL; } -static ImplConfigData* ImplGetConfigData( const rtl::OUString& rFileName ) +static ImplConfigData* ImplGetConfigData( const OUString& rFileName ) { ImplConfigData* pData; @@ -654,7 +654,7 @@ ImplGroupData* Config::ImplGetGroup() const return mpActGroup; } -Config::Config( const rtl::OUString& rFileName ) +Config::Config( const OUString& rFileName ) { // Initialize config data maFileName = toUncPath( rFileName ); @@ -665,8 +665,8 @@ Config::Config( const rtl::OUString& rFileName ) mbPersistence = sal_True; #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::Config( "); - aTraceStr.append(rtl::OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); + OStringBuffer aTraceStr("Config::Config( "); + aTraceStr.append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); aTraceStr.append(" )"); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -682,7 +682,7 @@ Config::~Config() ImplFreeConfigData( mpData ); } -void Config::SetGroup(const rtl::OString& rGroup) +void Config::SetGroup(const OString& rGroup) { // If group is to be reset, it needs to be updated on next call if ( maGroupName != rGroup ) @@ -692,7 +692,7 @@ void Config::SetGroup(const rtl::OString& rGroup) } } -void Config::DeleteGroup(const rtl::OString& rGroup) +void Config::DeleteGroup(const OString& rGroup) { // Update config data if necessary if ( !mnLockCount || !mpData->mbRead ) @@ -744,7 +744,7 @@ void Config::DeleteGroup(const rtl::OString& rGroup) } } -rtl::OString Config::GetGroupName(sal_uInt16 nGroup) const +OString Config::GetGroupName(sal_uInt16 nGroup) const { // Update config data if necessary if ( !mnLockCount ) @@ -752,7 +752,7 @@ rtl::OString Config::GetGroupName(sal_uInt16 nGroup) const ImplGroupData* pGroup = mpData->mpFirstGroup; sal_uInt16 nGroupCount = 0; - rtl::OString aGroupName; + OString aGroupName; while ( pGroup ) { if ( nGroup == nGroupCount ) @@ -785,7 +785,7 @@ sal_uInt16 Config::GetGroupCount() const return nGroupCount; } -sal_Bool Config::HasGroup(const rtl::OString& rGroup) const +sal_Bool Config::HasGroup(const OString& rGroup) const { // Update config data if necessary if ( !mnLockCount ) @@ -808,27 +808,27 @@ sal_Bool Config::HasGroup(const rtl::OString& rGroup) const return bRet; } -rtl::OString Config::ReadKey(const rtl::OString& rKey) const +OString Config::ReadKey(const OString& rKey) const { - return ReadKey(rKey, rtl::OString()); + return ReadKey(rKey, OString()); } -rtl::OUString Config::ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const +OUString Config::ReadKey(const OString& rKey, rtl_TextEncoding eEncoding) const { if ( mpData->mbIsUTF8BOM ) eEncoding = RTL_TEXTENCODING_UTF8; - return rtl::OStringToOUString(ReadKey(rKey), eEncoding); + return OStringToOUString(ReadKey(rKey), eEncoding); } -rtl::OString Config::ReadKey(const rtl::OString& rKey, const rtl::OString& rDefault) const +OString Config::ReadKey(const OString& rKey, const OString& rDefault) const { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::ReadKey( "); + OStringBuffer aTraceStr("Config::ReadKey( "); aTraceStr.append(rKey); aTraceStr.append(" ) from "); aTraceStr.append(GetGroup()); aTraceStr.append(" in "); - aTraceStr.append(rtl::OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); + aTraceStr.append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -853,17 +853,17 @@ rtl::OString Config::ReadKey(const rtl::OString& rKey, const rtl::OString& rDefa return rDefault; } -void Config::WriteKey(const rtl::OString& rKey, const rtl::OString& rStr) +void Config::WriteKey(const OString& rKey, const OString& rStr) { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::WriteKey( "); + OStringBuffer aTraceStr("Config::WriteKey( "); aTraceStr.append(rKey); aTraceStr.append(", "); aTraceStr.append(rStr); aTraceStr.append(" ) to "); aTraceStr.append(GetGroup()); aTraceStr.append(" in "); - aTraceStr.append(rtl::OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); + aTraceStr.append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -919,7 +919,7 @@ void Config::WriteKey(const rtl::OString& rKey, const rtl::OString& rStr) } } -void Config::DeleteKey(const rtl::OString& rKey) +void Config::DeleteKey(const OString& rKey) { // Update config data if necessary if ( !mnLockCount || !mpData->mbRead ) @@ -966,11 +966,11 @@ void Config::DeleteKey(const rtl::OString& rKey) sal_uInt16 Config::GetKeyCount() const { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::GetKeyCount()"); + OStringBuffer aTraceStr("Config::GetKeyCount()"); aTraceStr.append(" from "); aTraceStr.append(GetGroup()); aTraceStr.append(" in "); - aTraceStr.append(rtl::OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); + aTraceStr.append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -996,15 +996,15 @@ sal_uInt16 Config::GetKeyCount() const return nCount; } -rtl::OString Config::GetKeyName(sal_uInt16 nKey) const +OString Config::GetKeyName(sal_uInt16 nKey) const { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::GetKeyName( "); + OStringBuffer aTraceStr("Config::GetKeyName( "); aTraceStr.append(static_cast<sal_Int32>(nKey)); aTraceStr.append(" ) from "); aTraceStr.append(GetGroup()); aTraceStr.append(" in "); - aTraceStr.append(rtl::OUStringToOString( + aTraceStr.append(OUStringToOString( maFileName, RTL_TEXTENCODING_UTF8)); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -1027,18 +1027,18 @@ rtl::OString Config::GetKeyName(sal_uInt16 nKey) const } } - return rtl::OString(); + return OString(); } -rtl::OString Config::ReadKey(sal_uInt16 nKey) const +OString Config::ReadKey(sal_uInt16 nKey) const { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("Config::ReadKey( "); + OStringBuffer aTraceStr("Config::ReadKey( "); aTraceStr.append(static_cast<sal_Int32>(nKey)); aTraceStr.append(" ) from "); aTraceStr.append(GetGroup()); aTraceStr.append(" in "); - aTraceStr.append(rtl::OUStringToOString(maFileName, + aTraceStr.append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -1061,7 +1061,7 @@ rtl::OString Config::ReadKey(sal_uInt16 nKey) const } } - return rtl::OString(); + return OString(); } void Config::Flush() diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 423f32f448e1..30bdf43f9a1e 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -100,25 +100,25 @@ namespace unnamed_tools_inetmime { struct Parameter { Parameter * m_pNext; - rtl::OString m_aAttribute; - rtl::OString m_aCharset; - rtl::OString m_aLanguage; - rtl::OString m_aValue; + OString m_aAttribute; + OString m_aCharset; + OString m_aLanguage; + OString m_aValue; sal_uInt32 m_nSection; bool m_bExtended; - inline Parameter(Parameter * pTheNext, const rtl::OString& rTheAttribute, - const rtl::OString& rTheCharset, - const rtl::OString& rTheLanguage, - const rtl::OString& rTheValue, sal_uInt32 nTheSection, + inline Parameter(Parameter * pTheNext, const OString& rTheAttribute, + const OString& rTheCharset, + const OString& rTheLanguage, + const OString& rTheValue, sal_uInt32 nTheSection, bool bTheExtended); }; inline Parameter::Parameter(Parameter * pTheNext, - const rtl::OString& rTheAttribute, - const rtl::OString& rTheCharset, - const rtl::OString& rTheLanguage, - const rtl::OString& rTheValue, + const OString& rTheAttribute, + const OString& rTheCharset, + const OString& rTheLanguage, + const OString& rTheValue, sal_uInt32 nTheSection, bool bTheExtended): m_pNext(pTheNext), m_aAttribute(rTheAttribute), @@ -137,7 +137,7 @@ struct ParameterList inline ~ParameterList(); - Parameter ** find(const rtl::OString& rAttribute, sal_uInt32 nSection, + Parameter ** find(const OString& rAttribute, sal_uInt32 nSection, bool & rPresent); }; @@ -222,7 +222,7 @@ void INetMIMECharsetList_Impl::reset() // ParameterList -Parameter ** ParameterList::find(const rtl::OString& rAttribute, +Parameter ** ParameterList::find(const OString& rAttribute, sal_uInt32 nSection, bool & rPresent) { Parameter ** p = &m_pList; @@ -304,7 +304,7 @@ bool parseParameters(ParameterList const & rInput, bBadEncoding = true; break; } - aValue += rtl::OUString(pUnicode, static_cast<sal_Int32>(nSize)); + aValue += OUString(pUnicode, static_cast<sal_Int32>(nSize)); delete[] pUnicode; pNext = pNext->m_pNext; } @@ -759,7 +759,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, } if (p == pAttributeBegin) break; - rtl::OString aAttribute = rtl::OString( + OString aAttribute = OString( pAttributeBegin, p - pAttributeBegin, RTL_TEXTENCODING_ASCII_US); if (bDowncaseAttribute) @@ -793,9 +793,9 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, p = skipLinearWhiteSpaceComment(p + 1, pEnd); - rtl::OString aCharset; - rtl::OString aLanguage; - rtl::OString aValue; + OString aCharset; + OString aLanguage; + OString aValue; if (bExtended) { if (nSection == 0) @@ -811,7 +811,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, break; if (pParameters) { - aCharset = rtl::OString( + aCharset = OString( pCharsetBegin, p - pCharsetBegin, RTL_TEXTENCODING_ASCII_US); @@ -846,7 +846,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, break; if (pParameters) { - aLanguage = rtl::OString( + aLanguage = OString( pLanguageBegin, p - pLanguageBegin, RTL_TEXTENCODING_ASCII_US); @@ -942,7 +942,7 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin, if (p == pTokenBegin) break; if (pParameters) - aValue = rtl::OString( + aValue = OString( pTokenBegin, p - pTokenBegin, RTL_TEXTENCODING_UTF8); } @@ -1579,7 +1579,7 @@ void INetMIME::writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar) // static void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink, HeaderFieldType eType, - const rtl::OUString& rBody, + const OUString& rBody, rtl_TextEncoding ePreferredEncoding, bool bInitialSpace) { @@ -2387,8 +2387,8 @@ bool INetMIME::translateUTF8Char(const sal_Char *& rBegin, } // static -rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, - const rtl::OString& rBody) +OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, + const OString& rBody) { // Due to a bug in INetCoreRFC822MessageStream::ConvertTo7Bit(), old // versions of StarOffice send mails with header fields where encoded @@ -2423,7 +2423,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, for (const sal_Char * p = pBegin; p != pEnd;) { - rtl::OUString sEncodedText; + OUString sEncodedText; if (p != pEnd && *p == '=' /* && bStartEncodedWord */) { const sal_Char * q = p + 1; @@ -2517,7 +2517,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, bEncodedWord = bEncodedWord && q != pEnd && *q++ == '?'; - rtl::OStringBuffer sText; + OStringBuffer sText; if (bEncodedWord) { if (bEncodingB) @@ -2671,7 +2671,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType, static_cast< xub_StrLen >(nUnicodeSize)); else if (nCommentLevel == 0) { - sEncodedText = rtl::OUString(pUnicodeBuffer, nUnicodeSize); + sEncodedText = OUString(pUnicodeBuffer, nUnicodeSize); if (!bQuotedEncodedText) { const sal_Unicode * pTextPtr = pUnicodeBuffer; @@ -3732,7 +3732,7 @@ void INetContentTypeParameterList::Clear() } const INetContentTypeParameter * -INetContentTypeParameterList::find(const rtl::OString& rAttribute) const +INetContentTypeParameterList::find(const OString& rAttribute) const { boost::ptr_vector<INetContentTypeParameter>::const_iterator iter; for (iter = maEntries.begin(); iter != maEntries.end(); ++iter) diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 544f23de15b3..9bef89cb1ddc 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -414,13 +414,13 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) // Check for header or body. if (!IsHeaderParsed()) { - rtl::OString aField(pData); + OString aField(pData); sal_Int32 nPos = aField.indexOf(':'); if (nPos != -1) { - rtl::OString aName( + OString aName( aField.copy(0, nPos)); - rtl::OString aValue( + OString aValue( aField.copy(nPos + 1, aField.getLength() - nPos + 1)); aValue = comphelper::string::stripStart(aValue, ' '); @@ -1272,7 +1272,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) if (pMsg->IsMultipart()) { // Insert multipart delimiter. - rtl::OStringBuffer aDelim("--"); + OStringBuffer aDelim("--"); aDelim.append(pMsg->GetMultipartBoundary()); aDelim.append("\r\n"); @@ -1290,7 +1290,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) if (pMsg->IsMultipart()) { // Insert close delimiter. - rtl::OStringBuffer aDelim("--"); + OStringBuffer aDelim("--"); aDelim.append(pMsg->GetMultipartBoundary()); aDelim.append("--\r\n"); @@ -1437,12 +1437,12 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) if (pMsg->GetMultipartBoundary().getLength() == 0) { // Determine boundary. - rtl::OString aType(rtl::OUStringToOString( + OString aType(OUStringToOString( pMsg->GetContentType(), RTL_TEXTENCODING_ASCII_US)); - rtl::OString aLowerType(aType.toAsciiLowerCase()); + OString aLowerType(aType.toAsciiLowerCase()); sal_Int32 nPos = aLowerType.indexOf("boundary="); - rtl::OString aBoundary(aType.copy(nPos + 9)); + OString aBoundary(aType.copy(nPos + 9)); aBoundary = comphelper::string::strip(aBoundary, ' '); aBoundary = comphelper::string::strip(aBoundary, '"'); @@ -1451,15 +1451,15 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) pMsg->SetMultipartBoundary (aBoundary); } - rtl::OString aPlainDelim (pMsg->GetMultipartBoundary()); - rtl::OString aDelim = rtl::OStringBuffer("--"). + OString aPlainDelim (pMsg->GetMultipartBoundary()); + OString aDelim = OStringBuffer("--"). append(aPlainDelim). makeStringAndClear(); - rtl::OString aPlainClose = rtl::OStringBuffer( + OString aPlainClose = OStringBuffer( aPlainDelim). append("--"). makeStringAndClear(); - rtl::OString aClose = rtl::OStringBuffer( + OString aClose = OStringBuffer( aDelim). append("--"). makeStringAndClear(); diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index b079e1750f69..1219dd5da3a7 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -34,7 +34,6 @@ #define DBG(x) #endif -using ::rtl::OUString; #ifdef MI_DEBUG static void Print( const MultiSelection* pSel ) @@ -606,7 +605,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange ) // StringRangeEnumerator -StringRangeEnumerator::StringRangeEnumerator( const rtl::OUString& i_rInput, +StringRangeEnumerator::StringRangeEnumerator( const OUString& i_rInput, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset @@ -703,13 +702,13 @@ bool StringRangeEnumerator::insertJoinedRanges( return true; } -bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange, bool i_bStrict ) +bool StringRangeEnumerator::setRange( const OUString& i_rNewRange, bool i_bStrict ) { mnCount = 0; maSequence.clear(); const sal_Unicode* pInput = i_rNewRange.getStr(); - rtl::OUStringBuffer aNumberBuf( 16 ); + OUStringBuffer aNumberBuf( 16 ); std::vector< sal_Int32 > aNumbers; bool bSequence = false; while( *pInput ) diff --git a/tools/source/misc/appendunixshellword.cxx b/tools/source/misc/appendunixshellword.cxx index 6a15a1f5163c..96e9b65846b2 100644 --- a/tools/source/misc/appendunixshellword.cxx +++ b/tools/source/misc/appendunixshellword.cxx @@ -33,7 +33,7 @@ namespace tools { void appendUnixShellWord( - rtl::OStringBuffer * accumulator, rtl::OString const & text) + OStringBuffer * accumulator, OString const & text) { OSL_ASSERT(accumulator != NULL); if (text.isEmpty()) { diff --git a/tools/source/misc/extendapplicationenvironment.cxx b/tools/source/misc/extendapplicationenvironment.cxx index 68181ade22d2..e8b3ff8686b9 100644 --- a/tools/source/misc/extendapplicationenvironment.cxx +++ b/tools/source/misc/extendapplicationenvironment.cxx @@ -51,9 +51,9 @@ void extendApplicationEnvironment() { #endif // Make sure URE_BOOTSTRAP environment variable is set (failure is fatal): - rtl::OUStringBuffer env; - rtl::OUString envVar("URE_BOOTSTRAP"); - rtl::OUString uri; + OUStringBuffer env; + OUString envVar("URE_BOOTSTRAP"); + OUString uri; if (rtl::Bootstrap::get(envVar, uri)) { if (!uri.matchIgnoreAsciiCase("vnd.sun.star.pathname:")) @@ -72,7 +72,7 @@ void extendApplicationEnvironment() { env.append(rtl::Bootstrap::encode(uri)); env.append(SAL_CONFIGFILE("fundamental")); } - rtl::OUString envValue(env.makeStringAndClear()); + OUString envValue(env.makeStringAndClear()); if (osl_setEnvironment(envVar.pData, envValue.pData) != osl_Process_E_None) { abort(); } diff --git a/tools/source/misc/getprocessworkingdir.cxx b/tools/source/misc/getprocessworkingdir.cxx index 115e5c86aa2b..f3bcf8cd1c97 100644 --- a/tools/source/misc/getprocessworkingdir.cxx +++ b/tools/source/misc/getprocessworkingdir.cxx @@ -31,10 +31,10 @@ namespace tools { -bool getProcessWorkingDir(rtl::OUString &rUrl) +bool getProcessWorkingDir(OUString &rUrl) { - rUrl = rtl::OUString(); - rtl::OUString s("$OOO_CWD"); + rUrl = OUString(); + OUString s("$OOO_CWD"); rtl::Bootstrap::expandMacros(s); if (s.isEmpty()) { diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 7ad7092d800e..519dcea67eeb 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -51,10 +51,6 @@ #include <list> #include <set> -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OUStringBuffer; -using ::rtl::OUStringHash; using namespace osl; @@ -183,7 +179,7 @@ void ResMgrContainer::init() assert( m_aResFiles.empty() ); // get resource path - rtl::OUString uri("$BRAND_BASE_DIR/program/resource/"); + OUString uri("$BRAND_BASE_DIR/program/resource/"); rtl::Bootstrap::expandMacros(uri); //TODO: detect failure // collect all possible resource files @@ -450,8 +446,8 @@ InternalResMgr::~InternalResMgr() { SvFileStream aStm( OUString::createFromAscii( pLogFile ), STREAM_WRITE ); aStm.Seek( STREAM_SEEK_TO_END ); - rtl::OStringBuffer aLine("FileName: "); - aLine.append(rtl::OUStringToOString(aFileName, + OStringBuffer aLine("FileName: "); + aLine.append(OUStringToOString(aFileName, RTL_TEXTENCODING_UTF8)); aStm.WriteLine(aLine.makeStringAndClear()); @@ -629,7 +625,7 @@ OUString GetTypeRes_Impl( const ResId& rTypeId ) { // Return on resource errors static int bInUse = sal_False; - rtl::OUString aTypStr(OUString::number(rTypeId.GetId())); + OUString aTypStr(OUString::number(rTypeId.GetId())); if ( !bInUse ) { @@ -667,14 +663,14 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr, ResMgr* pNewResMgr = new ResMgr( pImp ); - rtl::OStringBuffer aStr(rtl::OUStringToOString(pResMgr->GetFileName(), + OStringBuffer aStr(OUStringToOString(pResMgr->GetFileName(), RTL_TEXTENCODING_UTF8)); if (aStr.getLength()) aStr.append('\n'); aStr.append("Class: "); - aStr.append(rtl::OUStringToOString(GetTypeRes_Impl(ResId(nRT, *pNewResMgr)), + aStr.append(OUStringToOString(GetTypeRes_Impl(ResId(nRT, *pNewResMgr)), RTL_TEXTENCODING_UTF8)); aStr.append(", Id: "); aStr.append(static_cast<sal_Int32>(nId)); @@ -685,7 +681,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr, while( nDepth > 0 ) { aStr.append("Class: "); - aStr.append(rtl::OUStringToOString(GetTypeRes_Impl( + aStr.append(OUStringToOString(GetTypeRes_Impl( ResId(rResStack[nDepth].pResource->GetRT(), *pNewResMgr)), RTL_TEXTENCODING_UTF8)); aStr.append(", Id: "); @@ -802,7 +798,7 @@ void ResMgr::Init( const OUString& rFileName ) if ( !pImpRes ) { #ifdef DBG_UTIL - rtl::OStringBuffer aStr("Resourcefile not found:\n"); + OStringBuffer aStr("Resourcefile not found:\n"); aStr.append(OUStringToOString(rFileName, RTL_TEXTENCODING_UTF8)); OSL_FAIL(aStr.getStr()); #endif @@ -1049,10 +1045,10 @@ sal_Bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj ) { pTop->Flags |= RC_FALLBACK_DOWN; #ifdef DBG_UTIL - rtl::OStringBuffer aMess("found resource "); + OStringBuffer aMess("found resource "); aMess.append(static_cast<sal_Int32>(nId)); aMess.append(" in fallback "); - aMess.append(rtl::OUStringToOString( + aMess.append(OUStringToOString( pFallbackResMgr->GetFileName(), osl_getThreadTextEncoding())); aMess.append('\n'); @@ -1217,11 +1213,11 @@ sal_uInt32 ResMgr::GetString( OUString& rStr, const sal_uInt8* pStr ) return nRet; } -sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const sal_uInt8* pStr ) +sal_uInt32 ResMgr::GetByteString( OString& rStr, const sal_uInt8* pStr ) { sal_uInt32 nLen=0; sal_uInt32 nRet = GetStringSize( pStr, nLen ); - rStr = rtl::OString( (const sal_Char*)pStr, nLen ); + rStr = OString( (const sal_Char*)pStr, nLen ); return nRet; } @@ -1596,14 +1592,14 @@ OUString ResMgr::ReadString() return aRet; } -rtl::OString ResMgr::ReadByteString() +OString ResMgr::ReadByteString() { osl::Guard<osl::Mutex> aGuard( getResMgrMutex() ); if( pFallbackResMgr ) return pFallbackResMgr->ReadByteString(); - rtl::OString aRet; + OString aRet; const ImpRCStack& rTop = aStack[nCurStack]; if( (rTop.Flags & RC_NOTFOUND) ) @@ -1618,7 +1614,7 @@ rtl::OString ResMgr::ReadByteString() return aRet; } -rtl::OString ResMgr::GetAutoHelpId() +OString ResMgr::GetAutoHelpId() { osl::Guard<osl::Mutex> aGuard( getResMgrMutex() ); @@ -1627,11 +1623,11 @@ rtl::OString ResMgr::GetAutoHelpId() OSL_ENSURE( nCurStack, "resource stack empty in Auto help id generation" ); if( nCurStack < 1 || nCurStack > 2 ) - return rtl::OString(); + return OString(); // prepare HID, start with resource prefix - rtl::OStringBuffer aHID( 32 ); - aHID.append( rtl::OUStringToOString( pImpRes->aPrefix, RTL_TEXTENCODING_UTF8 ) ); + OStringBuffer aHID( 32 ); + aHID.append( OUStringToOString( pImpRes->aPrefix, RTL_TEXTENCODING_UTF8 ) ); aHID.append( '.' ); // append type @@ -1648,7 +1644,7 @@ rtl::OString ResMgr::GetAutoHelpId() case RSC_FLOATINGWINDOW: aHID.append( "FloatingWindow" ); break; case RSC_MODALDIALOG: aHID.append( "ModalDialog" ); break; case RSC_TABPAGE: aHID.append( "TabPage" ); break; - default: return rtl::OString(); + default: return OString(); } } else @@ -1693,11 +1689,11 @@ rtl::OString ResMgr::GetAutoHelpId() case RSC_MOREBUTTON: aHID.append( "MoreButton" ); break; default: // no type, no auto HID - return rtl::OString(); + return OString(); } break; default: - return rtl::OString(); + return OString(); } } @@ -1772,7 +1768,7 @@ bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourc return m_pResImpl->IsGlobalAvailable( _resourceType, _resourceId ); } -rtl::OUString SimpleResMgr::ReadString( sal_uInt32 nId ) +OUString SimpleResMgr::ReadString( sal_uInt32 nId ) { osl::MutexGuard aGuard(m_aAccessSafety); diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx index 5631d4627fa1..0ac0de87a9ac 100644 --- a/tools/source/ref/errinf.cxx +++ b/tools/source/ref/errinf.cxx @@ -177,10 +177,10 @@ public: static void aDspFunc(const OUString &rErr, const OUString &rAction) { - rtl::OStringBuffer aErr("Aktion: "); - aErr.append(rtl::OUStringToOString(rAction, RTL_TEXTENCODING_ASCII_US)); + OStringBuffer aErr("Aktion: "); + aErr.append(OUStringToOString(rAction, RTL_TEXTENCODING_ASCII_US)); aErr.append(" Fehler: "); - aErr.append(rtl::OUStringToOString(rErr, RTL_TEXTENCODING_ASCII_US)); + aErr.append(OUStringToOString(rErr, RTL_TEXTENCODING_ASCII_US)); OSL_FAIL(aErr.getStr()); } @@ -307,10 +307,10 @@ sal_uInt16 ErrorHandler::HandleError_Impl( { if(!pData->pDsp) { - rtl::OStringBuffer aStr("Action: "); - aStr.append(rtl::OUStringToOString(aAction, RTL_TEXTENCODING_ASCII_US)); + OStringBuffer aStr("Action: "); + aStr.append(OUStringToOString(aAction, RTL_TEXTENCODING_ASCII_US)); aStr.append("\nFehler: "); - aStr.append(rtl::OUStringToOString(aErr, RTL_TEXTENCODING_ASCII_US)); + aStr.append(OUStringToOString(aErr, RTL_TEXTENCODING_ASCII_US)); OSL_FAIL(aStr.getStr()); } else @@ -377,7 +377,7 @@ sal_Bool SimpleErrorHandler::CreateString( const ErrorInfo *pInfo, OUString &rStr, sal_uInt16 &) const { sal_uIntPtr nId = pInfo->GetErrorCode(); - rtl::OStringBuffer aStr("Id "); + OStringBuffer aStr("Id "); aStr.append(static_cast<sal_Int32>(nId)); aStr.append(" only handled by SimpleErrorHandler"); aStr.append("\nErrorCode: "); @@ -395,7 +395,7 @@ sal_Bool SimpleErrorHandler::CreateString( aStr.append("\nDId "); aStr.append(static_cast<sal_Int32>(*pDyn)); } - rStr = rtl::OStringToOUString(aStr.makeStringAndClear(), + rStr = OStringToOUString(aStr.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); return sal_True; } diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index 503cf70ecf2b..1ed7b0e12e1b 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -222,7 +222,7 @@ void SvGlobalName::MakeFromMemory( void * pData ) sal_Bool SvGlobalName::MakeId( const String & rIdStr ) { - rtl::OString aStr(rtl::OUStringToOString(rIdStr, + OString aStr(OUStringToOString(rIdStr, RTL_TEXTENCODING_ASCII_US)); const sal_Char *pStr = aStr.getStr(); if( rIdStr.Len() == 36 @@ -300,7 +300,7 @@ sal_Bool SvGlobalName::MakeId( const String & rIdStr ) String SvGlobalName::GetHexName() const { - rtl::OStringBuffer aHexBuffer; + OStringBuffer aHexBuffer; sal_Char buf[ 10 ]; sal_uInt32 Data1; @@ -328,7 +328,7 @@ String SvGlobalName::GetHexName() const sprintf( buf, "%2.2x", pImp->szData[ i ] ); aHexBuffer.append(buf); } - return rtl::OStringToOUString(aHexBuffer.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); + return OStringToOUString(aHexBuffer.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); } com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index ffe8d348176c..66e4a28909c7 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -110,7 +110,7 @@ void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream & #ifdef DBG_UTIL if( nObjLen + nObjPos != rStm.Tell() ) { - rtl::OStringBuffer aStr("false list len: read = "); + OStringBuffer aStr("false list len: read = "); aStr.append(static_cast<sal_Int64>(rStm.Tell() - nObjPos)); aStr.append(", should = "); aStr.append(static_cast<sal_Int64>(nObjLen)); @@ -586,7 +586,7 @@ sal_uInt32 SvPersistStream::ReadObj if( !pFunc ) { #ifdef DBG_UTIL - rtl::OStringBuffer aStr("no class with id: " ); + OStringBuffer aStr("no class with id: " ); aStr.append(static_cast<sal_Int32>(nClassId)); aStr.append(" registered"); DBG_WARNING(aStr.getStr()); @@ -613,7 +613,7 @@ sal_uInt32 SvPersistStream::ReadObj #ifdef DBG_UTIL if( nObjLen + nObjPos != Tell() ) { - rtl::OStringBuffer aStr("false object len: read = "); + OStringBuffer aStr("false object len: read = "); aStr.append(static_cast<sal_Int64>((long)(Tell() - nObjPos))); aStr.append(", should = "); aStr.append(static_cast<sal_Int32>(nObjLen)); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index d9fc89a80cef..18ff853f678e 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -519,24 +519,24 @@ void SvStream::ResetError() ClearError(); } -sal_Bool SvStream::ReadByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, +sal_Bool SvStream::ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead ) { - rtl::OString aStr; + OString aStr; sal_Bool bRet = ReadLine( aStr, nMaxBytesToRead); - rStr = rtl::OStringToOUString(aStr, eSrcCharSet); + rStr = OStringToOUString(aStr, eSrcCharSet); return bRet; } sal_Bool SvStream::ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet ) { - rtl::OString aStr; + OString aStr; sal_Bool bRet = ReadLine(aStr); - rStr = rtl::OStringToOUString(aStr, eSrcCharSet); + rStr = OStringToOUString(aStr, eSrcCharSet); return bRet; } -sal_Bool SvStream::ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead ) +sal_Bool SvStream::ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead ) { sal_Char buf[256+1]; sal_Bool bEnd = sal_False; @@ -544,7 +544,7 @@ sal_Bool SvStream::ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead ) sal_Char c = 0; sal_Size nTotalLen = 0; - rtl::OStringBuffer aBuf(4096); + OStringBuffer aBuf(4096); while( !bEnd && !GetError() ) // Don't test for EOF as we // are reading block-wise! { @@ -555,7 +555,7 @@ sal_Bool SvStream::ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead ) { // Exit on first block-read error bIsEof = sal_True; - rStr = rtl::OString(); + rStr = OString(); return sal_False; } else @@ -610,7 +610,7 @@ sal_Bool SvStream::ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead ) return bEnd; } -sal_Bool SvStream::ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepointsToRead ) +sal_Bool SvStream::ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead ) { sal_Unicode buf[256+1]; sal_Bool bEnd = sal_False; @@ -620,7 +620,7 @@ sal_Bool SvStream::ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepoi DBG_ASSERT( sizeof(sal_Unicode) == sizeof(sal_uInt16), "ReadUniStringLine: swapping sizeof(sal_Unicode) not implemented" ); - rtl::OUStringBuffer aBuf(4096); + OUStringBuffer aBuf(4096); while( !bEnd && !GetError() ) // Don't test for EOF as we // are reading block-wise! { @@ -632,7 +632,7 @@ sal_Bool SvStream::ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepoi { // exit on first BlockRead error bIsEof = sal_True; - rStr = rtl::OUString(); + rStr = OUString(); return sal_False; } else @@ -696,7 +696,7 @@ sal_Bool SvStream::ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepoi return bEnd; } -sal_Bool SvStream::ReadUniOrByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, +sal_Bool SvStream::ReadUniOrByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxCodepointsToRead ) { if ( eSrcCharSet == RTL_TEXTENCODING_UNICODE ) @@ -705,9 +705,9 @@ sal_Bool SvStream::ReadUniOrByteStringLine( rtl::OUString& rStr, rtl_TextEncodin return ReadByteStringLine( rStr, eSrcCharSet, nMaxCodepointsToRead ); } -rtl::OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStream) +OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStream) { - rtl::OStringBuffer aOutput(256); + OStringBuffer aOutput(256); sal_Char buf[ 256 + 1 ]; sal_Bool bEnd = sal_False; @@ -738,15 +738,15 @@ rtl::OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStream) return aOutput.makeStringAndClear(); } -rtl::OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rStream, rtl_TextEncoding eEnc) +OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rStream, rtl_TextEncoding eEnc) { - return rtl::OStringToOUString( + return OStringToOUString( read_zeroTerminated_uInt8s_ToOString(rStream), eEnc); } /** Attempt to write a prefixed sequence of nUnits 16bit units from an OUString, returned value is number of bytes written */ -sal_Size write_uInt16s_FromOUString(SvStream& rStrm, const rtl::OUString& rStr, +sal_Size write_uInt16s_FromOUString(SvStream& rStrm, const OUString& rStr, sal_Size nUnits) { DBG_ASSERT( sizeof(sal_Unicode) == sizeof(sal_uInt16), "write_uInt16s_FromOUString: swapping sizeof(sal_Unicode) not implemented" ); @@ -782,7 +782,7 @@ sal_Bool SvStream::WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding } else { - rtl::OString aStr(rtl::OUStringToOString(rStr, eDestCharSet)); + OString aStr(OUStringToOString(rStr, eDestCharSet)); write_uInt8s_FromOString(*this, aStr, aStr.getLength()); return nError == SVSTREAM_OK; } @@ -790,10 +790,10 @@ sal_Bool SvStream::WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding sal_Bool SvStream::WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet ) { - return WriteLine(rtl::OUStringToOString(rStr, eDestCharSet)); + return WriteLine(OUStringToOString(rStr, eDestCharSet)); } -sal_Bool SvStream::WriteLine(const rtl::OString& rStr) +sal_Bool SvStream::WriteLine(const OString& rStr) { Write(rStr.getStr(), rStr.getLength()); endl(*this); @@ -806,7 +806,7 @@ sal_Bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCha *this << ch; else { - rtl::OString aStr(&ch, 1, eDestCharSet); + OString aStr(&ch, 1, eDestCharSet); Write(aStr.getStr(), aStr.getLength()); } return nError == SVSTREAM_OK; @@ -1228,7 +1228,7 @@ SvStream& SvStream::operator<< ( SvStream& rStream ) return *this; } -rtl::OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet ) +OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet ) { // read UTF-16 string directly from stream ? if (eSrcCharSet == RTL_TEXTENCODING_UNICODE) @@ -1236,7 +1236,7 @@ rtl::OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet ) return read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(*this, eSrcCharSet); } -SvStream& SvStream::WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet ) +SvStream& SvStream::WriteUniOrByteString( const OUString& rStr, rtl_TextEncoding eDestCharSet ) { // write UTF-16 string directly into stream ? if (eDestCharSet == RTL_TEXTENCODING_UNICODE) @@ -1605,7 +1605,7 @@ unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long nVersi return nCryptMask; } -void SvStream::SetCryptMaskKey(const rtl::OString& rCryptMaskKey) +void SvStream::SetCryptMaskKey(const OString& rCryptMaskKey) { m_aCryptMaskKey = rCryptMaskKey; nCryptMask = implGetCryptMask(m_aCryptMaskKey.getStr(), @@ -1967,7 +1967,7 @@ void SvDataCopyStream::Assign( const SvDataCopyStream& ) } //Create a OString of nLen bytes from rStream -rtl::OString read_uInt8s_ToOString(SvStream& rStrm, sal_Size nLen) +OString read_uInt8s_ToOString(SvStream& rStrm, sal_Size nLen) { rtl_String *pStr = NULL; if (nLen) @@ -1988,11 +1988,11 @@ rtl::OString read_uInt8s_ToOString(SvStream& rStrm, sal_Size nLen) } //take ownership of buffer and return, otherwise return empty string - return pStr ? rtl::OString(pStr, SAL_NO_ACQUIRE) : rtl::OString(); + return pStr ? OString(pStr, SAL_NO_ACQUIRE) : OString(); } //Create a OUString of nLen sal_Unicodes from rStream -rtl::OUString read_uInt16s_ToOUString(SvStream& rStrm, sal_Size nLen) +OUString read_uInt16s_ToOUString(SvStream& rStrm, sal_Size nLen) { rtl_uString *pStr = NULL; if (nLen) @@ -2018,7 +2018,7 @@ rtl::OUString read_uInt16s_ToOUString(SvStream& rStrm, sal_Size nLen) } //take ownership of buffer and return, otherwise return empty string - return pStr ? rtl::OUString(pStr, SAL_NO_ACQUIRE) : rtl::OUString(); + return pStr ? OUString(pStr, SAL_NO_ACQUIRE) : OUString(); } namespace @@ -2102,14 +2102,14 @@ namespace } } -rtl::OString convertLineEnd(const rtl::OString &rIn, LineEnd eLineEnd) +OString convertLineEnd(const OString &rIn, LineEnd eLineEnd) { - return tmpl_convertLineEnd<rtl::OString, rtl::OStringBuffer>(rIn, eLineEnd); + return tmpl_convertLineEnd<OString, OStringBuffer>(rIn, eLineEnd); } -rtl::OUString convertLineEnd(const rtl::OUString &rIn, LineEnd eLineEnd) +OUString convertLineEnd(const OUString &rIn, LineEnd eLineEnd) { - return tmpl_convertLineEnd<rtl::OUString, rtl::OUStringBuffer>(rIn, eLineEnd); + return tmpl_convertLineEnd<OUString, OUStringBuffer>(rIn, eLineEnd); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 08ac00634e5c..65b051a253f7 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -73,7 +73,7 @@ InternalStreamLock::InternalStreamLock( osl::DirectoryItem::get( m_pStream->GetFileName(), m_aItem ); LockList::get().push_back( this ); #if OSL_DEBUG_LEVEL > 1 - rtl::OString aFileName(rtl::OUStringToOString(m_pStream->GetFileName(), + OString aFileName(OUStringToOString(m_pStream->GetFileName(), osl_getThreadTextEncoding())); fprintf( stderr, "locked %s", aFileName.getStr() ); if( m_nStartPos || m_nEndPos ) @@ -94,7 +94,7 @@ InternalStreamLock::~InternalStreamLock() } } #if OSL_DEBUG_LEVEL > 1 - rtl::OString aFileName(rtl::OUStringToOString(m_pStream->GetFileName(), + OString aFileName(OUStringToOString(m_pStream->GetFileName(), osl_getThreadTextEncoding())); fprintf( stderr, "unlocked %s", aFileName.getStr() ); if( m_nStartPos || m_nEndPos ) @@ -303,7 +303,7 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode ) SetBufferSize( 1024 ); // convert URL to SystemPath, if necessary - ::rtl::OUString aSystemFileName; + OUString aSystemFileName; if( FileBase::getSystemPathFromFileURL( rFileName , aSystemFileName ) != FileBase::E_None ) { @@ -348,10 +348,10 @@ sal_uInt16 SvFileStream::IsA() const sal_Size SvFileStream::GetData( void* pData, sal_Size nSize ) { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("SvFileStream::GetData(): "); + OStringBuffer aTraceStr("SvFileStream::GetData(): "); aTraceStr.append(static_cast<sal_Int64>(nSize)); aTraceStr.append(" Bytes from "); - aTraceStr.append(rtl::OUStringToOString(aFilename, + aTraceStr.append(OUStringToOString(aFilename, osl_getThreadTextEncoding())); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -372,10 +372,10 @@ sal_Size SvFileStream::GetData( void* pData, sal_Size nSize ) sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize ) { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("SvFileStream::PutData(): "); + OStringBuffer aTraceStr("SvFileStream::PutData(): "); aTraceStr.append(static_cast<sal_Int64>(nSize)); aTraceStr.append(" Bytes to "); - aTraceStr.append(rtl::OUStringToOString(aFilename, + aTraceStr.append(OUStringToOString(aFilename, osl_getThreadTextEncoding())); OSL_TRACE("%s", aTraceStr.getStr()); #endif @@ -464,7 +464,7 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes ) { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "InternalLock on %s [ %ld ... %ld ] failed\n", - rtl::OUStringToOString(aFilename, osl_getThreadTextEncoding()).getStr(), nByteOffset, nByteOffset+nBytes ); + OUStringToOString(aFilename, osl_getThreadTextEncoding()).getStr(), nByteOffset, nByteOffset+nBytes ); #endif return sal_False; } @@ -503,15 +503,15 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode ) eStreamMode &= ~STREAM_TRUNC; // don't truncat on reopen aFilename = rFilename; - rtl::OString aLocalFilename(rtl::OUStringToOString(aFilename, osl_getThreadTextEncoding())); + OString aLocalFilename(OUStringToOString(aFilename, osl_getThreadTextEncoding())); #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("SvFileStream::Open(): "); + OStringBuffer aTraceStr("SvFileStream::Open(): "); aTraceStr.append(aLocalFilename); OSL_TRACE( "%s", aTraceStr.getStr() ); #endif - rtl::OUString aFileURL; + OUString aFileURL; osl::DirectoryItem aItem; osl::FileStatus aStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_LinkTargetURL ); @@ -558,9 +558,9 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode ) #if OSL_DEBUG_LEVEL > 0 fprintf( stderr, "Removing link and replacing with file contents (%s) -> (%s).\n", - rtl::OUStringToOString( aStatus.getLinkTargetURL(), + OUStringToOString( aStatus.getLinkTargetURL(), RTL_TEXTENCODING_UTF8).getStr(), - rtl::OUStringToOString( aFileURL, + OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8).getStr() ); #endif } @@ -604,8 +604,8 @@ void SvFileStream::Close() if ( IsOpen() ) { #ifdef DBG_UTIL - rtl::OStringBuffer aTraceStr("SvFileStream::Close(): "); - aTraceStr.append(rtl::OUStringToOString(aFilename, + OStringBuffer aTraceStr("SvFileStream::Close(): "); + aTraceStr.append(OUStringToOString(aFilename, osl_getThreadTextEncoding())); OSL_TRACE("%s", aTraceStr.getStr()); #endif diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 847b7a916eda..13d1ea118782 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -108,7 +108,7 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode ) SetBufferSize( 8192 ); // convert URL to SystemPath, if necessary - ::rtl::OUString aFileName, aNormPath; + OUString aFileName, aNormPath; if ( FileBase::getSystemPathFromFileURL( rFileName, aFileName ) != FileBase::E_None ) aFileName = rFileName; @@ -280,7 +280,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode ) eStreamMode &= ~STREAM_TRUNC; // don't truncate on reopen aFilename = aParsedFilename; - rtl::OString aFileNameA(rtl::OUStringToOString(aFilename, osl_getThreadTextEncoding())); + OString aFileNameA(OUStringToOString(aFilename, osl_getThreadTextEncoding())); SetLastError( ERROR_SUCCESS ); // might be changed by Redirector DWORD nOpenAction; diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx index e77174041ce2..29041ddc0e41 100644 --- a/tools/source/string/strucvt.cxx +++ b/tools/source/string/strucvt.cxx @@ -44,18 +44,18 @@ UniString::UniString( const char* pByteStr, xub_StrLen nLen, eTextEncoding, nCvtFlags ); } -UniString::UniString( const rtl::OUString& rStr ) +UniString::UniString( const OUString& rStr ) : mpData(NULL) { DBG_CTOR( UniString, DbgCheckUniString ); OSL_ENSURE(rStr.pData->length < STRING_MAXLEN, - "Overflowing rtl::OUString -> UniString cut to zero length"); + "Overflowing OUString -> UniString cut to zero length"); if (rStr.pData->length < STRING_MAXLEN) { - mpData = reinterpret_cast< UniStringData * >(const_cast< rtl::OUString & >(rStr).pData); + mpData = reinterpret_cast< UniStringData * >(const_cast< OUString & >(rStr).pData); STRING_ACQUIRE((STRING_TYPE *)mpData); } else @@ -64,18 +64,18 @@ UniString::UniString( const rtl::OUString& rStr ) } } -UniString& UniString::Assign( const rtl::OUString& rStr ) +UniString& UniString::Assign( const OUString& rStr ) { DBG_CHKTHIS( UniString, DbgCheckUniString ); OSL_ENSURE(rStr.pData->length < STRING_MAXLEN, - "Overflowing rtl::OUString -> UniString cut to zero length"); + "Overflowing OUString -> UniString cut to zero length"); if (rStr.pData->length < STRING_MAXLEN) { if( mpData != NULL ) STRING_RELEASE((STRING_TYPE *)mpData); - mpData = reinterpret_cast< UniStringData * >(const_cast< rtl::OUString & >(rStr).pData); + mpData = reinterpret_cast< UniStringData * >(const_cast< OUString & >(rStr).pData); STRING_ACQUIRE((STRING_TYPE *)mpData); } else @@ -93,12 +93,12 @@ UniString& UniString::Assign( const rtl::OUString& rStr ) UniString::UniString( const ResId& rResId ) : mpData(NULL) { - rtl::OUString sStr(rResId.toString()); + OUString sStr(rResId.toString()); DBG_CTOR( UniString, DbgCheckUniString ); OSL_ENSURE(sStr.pData->length < STRING_MAXLEN, - "Overflowing rtl::OUString -> UniString cut to zero length"); + "Overflowing OUString -> UniString cut to zero length"); if (sStr.pData->length < STRING_MAXLEN) { @@ -111,17 +111,17 @@ UniString::UniString( const ResId& rResId ) } } -rtl::OUString ResId::toString() const +OUString ResId::toString() const { SetRT( RSC_STRING ); ResMgr* pResMgr = GetResMgr(); if ( !pResMgr || !pResMgr->GetResource( *this ) ) { - rtl::OUString sRet; + OUString sRet; #if OSL_DEBUG_LEVEL > 0 - sRet = rtl::OUStringBuffer(). + sRet = OUStringBuffer(). append("<resource id "). append(static_cast<sal_Int32>(GetId())). append(" not found>"). @@ -138,7 +138,7 @@ rtl::OUString ResId::toString() const RSHEADER_TYPE * pResHdr = (RSHEADER_TYPE*)pResMgr->GetClass(); sal_Int32 nStringLen = rtl_str_getLength( (char*)(pResHdr+1) ); - rtl::OUString sRet((const char*)(pResHdr+1), nStringLen, RTL_TEXTENCODING_UTF8); + OUString sRet((const char*)(pResHdr+1), nStringLen, RTL_TEXTENCODING_UTF8); sal_uInt32 nSize = sizeof( RSHEADER_TYPE ) + sal::static_int_cast< sal_uInt32 >(nStringLen) + 1; |