diff options
-rw-r--r-- | include/rtl/bootstrap.hxx | 14 | ||||
-rw-r--r-- | include/rtl/byteseq.h | 34 | ||||
-rw-r--r-- | include/rtl/byteseq.hxx | 16 | ||||
-rw-r--r-- | include/rtl/strbuf.hxx | 4 | ||||
-rw-r--r-- | include/rtl/string.hxx | 162 | ||||
-rw-r--r-- | include/rtl/uri.hxx | 12 | ||||
-rw-r--r-- | include/rtl/ustrbuf.hxx | 24 | ||||
-rw-r--r-- | include/rtl/ustring.hxx | 162 | ||||
-rw-r--r-- | sal/cpprt/operators_new_delete.cxx | 15 | ||||
-rw-r--r-- | sal/rtl/bootstrap.cxx | 10 |
10 files changed, 219 insertions, 234 deletions
diff --git a/include/rtl/bootstrap.hxx b/include/rtl/bootstrap.hxx index a5b51ea6bebd..df9233b6000a 100644 --- a/include/rtl/bootstrap.hxx +++ b/include/rtl/bootstrap.hxx @@ -70,8 +70,7 @@ namespace rtl @see rtl_bootstrap_set() */ - static inline void set( ::rtl::OUString const & name, ::rtl::OUString const & value ) - SAL_THROW(()); + static inline void set( ::rtl::OUString const & name, ::rtl::OUString const & value ); /** default ctor. */ @@ -116,21 +115,21 @@ namespace rtl @param macro [inout] The macro to be expanded */ - inline void expandMacrosFrom( ::rtl::OUString & macro ) const SAL_THROW(()) + inline void expandMacrosFrom( ::rtl::OUString & macro ) const { rtl_bootstrap_expandMacros_from_handle( _handle, ¯o.pData ); } /** Expands a macro using default bootstrap variables. @param macro [inout] The macro to be expanded */ - static inline void expandMacros( ::rtl::OUString & macro ) SAL_THROW(()) + static inline void expandMacros( ::rtl::OUString & macro ) { rtl_bootstrap_expandMacros( ¯o.pData ); } /** Provides the bootstrap internal handle. @return bootstrap handle */ - inline rtlBootstrapHandle getHandle() const SAL_THROW(()) + inline rtlBootstrapHandle getHandle() const { return _handle; } /** Escapes special characters ("$" and "\"). @@ -144,8 +143,7 @@ namespace rtl @since UDK 3.2.9 */ - static inline ::rtl::OUString encode( ::rtl::OUString const & value ) - SAL_THROW(()); + static inline ::rtl::OUString encode( ::rtl::OUString const & value ); }; @@ -170,7 +168,6 @@ namespace rtl } inline void Bootstrap::set( ::rtl::OUString const & name, ::rtl::OUString const & value ) - SAL_THROW(()) { rtl_bootstrap_set( name.pData, value.pData ); } @@ -214,7 +211,6 @@ namespace rtl } inline ::rtl::OUString Bootstrap::encode( ::rtl::OUString const & value ) - SAL_THROW(()) { ::rtl::OUString encoded; rtl_bootstrap_encode(value.pData, &encoded.pData); diff --git a/include/rtl/byteseq.h b/include/rtl/byteseq.h index 2cee65928233..1365a91a5e24 100644 --- a/include/rtl/byteseq.h +++ b/include/rtl/byteseq.h @@ -167,29 +167,29 @@ class SAL_WARN_UNUSED ByteSequence public: /// @cond INTERNAL // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new ( size_t nSize ) SAL_THROW(()) + inline static void * SAL_CALL operator new ( size_t nSize ) { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete ( void * pMem ) SAL_THROW(()) + inline static void SAL_CALL operator delete ( void * pMem ) { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new ( size_t, void * pMem ) SAL_THROW(()) + inline static void * SAL_CALL operator new ( size_t, void * pMem ) { return pMem; } - inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW(()) + inline static void SAL_CALL operator delete ( void *, void * ) {} /// @endcond /** Default constructor: Creates an empty sequence. */ - inline ByteSequence() SAL_THROW(()); + inline ByteSequence(); /** Copy constructor: Creates a copy of given sequence. @param rSeq another byte sequence */ - inline ByteSequence( const ByteSequence & rSeq ) SAL_THROW(()); + inline ByteSequence( const ByteSequence & rSeq ); /** Copy constructor Creates a copy from the C-Handle. @param pSequence another byte sequence handle */ - inline ByteSequence( sal_Sequence *pSequence ) SAL_THROW(()); + inline ByteSequence( sal_Sequence *pSequence ); /** Constructor: Creates a copy of given data bytes. @param pElements an array of bytes @@ -217,23 +217,23 @@ public: @param pSequence sequence handle to be taken over @param noacquire dummy parameter forcing explicit BYTESEQ_NOACQUIRE */ - inline ByteSequence( sal_Sequence *pSequence , enum __ByteSequence_NoAcquire noacquire ) SAL_THROW(()); + inline ByteSequence( sal_Sequence *pSequence , enum __ByteSequence_NoAcquire noacquire ); /** Destructor: Releases sequence handle. Last handle will free memory. */ - inline ~ByteSequence() SAL_THROW(()); + inline ~ByteSequence(); /** Assignment operator: Acquires given sequence handle and releases a previously set handle. @param rSeq another byte sequence @return this sequence */ - inline ByteSequence & SAL_CALL operator = ( const ByteSequence & rSeq ) SAL_THROW(()); + inline ByteSequence & SAL_CALL operator = ( const ByteSequence & rSeq ); /** Gets the length of sequence. @return length of sequence */ - inline sal_Int32 SAL_CALL getLength() const SAL_THROW(()) + inline sal_Int32 SAL_CALL getLength() const { return _pSequence->nElements; } /** Gets a pointer to byte array for READING. If the sequence has a length of 0, then the @@ -241,7 +241,7 @@ public: @return pointer to byte array */ - inline const sal_Int8 * SAL_CALL getConstArray() const SAL_THROW(()) + inline const sal_Int8 * SAL_CALL getConstArray() const { return (const sal_Int8 *)_pSequence->elements; } /** Gets a pointer to elements array for READING AND WRITING. In general if the sequence has a handle acquired by other sequences (reference count > 1), then a new sequence is @@ -272,7 +272,7 @@ public: @param nIndex index @return const C++ reference to byte at element of indenx nIndex */ - inline const sal_Int8 & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW(()) + inline const sal_Int8 & SAL_CALL operator [] ( sal_Int32 nIndex ) const { return getConstArray()[ nIndex ]; } /** Equality operator: Compares two sequences. @@ -280,13 +280,13 @@ public: @param rSeq another byte sequence (right side) @return true if both sequences are equal, false otherwise */ - inline bool SAL_CALL operator == ( const ByteSequence & rSeq ) const SAL_THROW(()); + inline bool SAL_CALL operator == ( const ByteSequence & rSeq ) const; /** Unequality operator: Compares two sequences. @param rSeq another byte sequence (right side) @return false if both sequences are equal, true otherwise */ - inline bool SAL_CALL operator != ( const ByteSequence & rSeq ) const SAL_THROW(()); + inline bool SAL_CALL operator != ( const ByteSequence & rSeq ) const; /** Reallocates sequence to new length. If the sequence has a handle acquired by other sequences (reference count > 1), then the remaining elements are copied to a new sequence handle to @@ -300,13 +300,13 @@ public: @return UNacquired handle of the sequence */ - inline sal_Sequence * SAL_CALL getHandle() const SAL_THROW(()) + inline sal_Sequence * SAL_CALL getHandle() const { return _pSequence; } /** Returns the UNnacquired C handle of the sequence (for compatibility reasons) @return UNacquired handle of the sequence */ - inline sal_Sequence * SAL_CALL get() const SAL_THROW(()) + inline sal_Sequence * SAL_CALL get() const { return _pSequence; } }; diff --git a/include/rtl/byteseq.hxx b/include/rtl/byteseq.hxx index 200cff3c95e5..c54aa64018ae 100644 --- a/include/rtl/byteseq.hxx +++ b/include/rtl/byteseq.hxx @@ -29,19 +29,19 @@ namespace rtl { -inline ByteSequence::ByteSequence() SAL_THROW(()) +inline ByteSequence::ByteSequence() : _pSequence( 0 ) { ::rtl_byte_sequence_construct( &_pSequence, 0 ); } -inline ByteSequence::ByteSequence( const ByteSequence & rSeq ) SAL_THROW(()) +inline ByteSequence::ByteSequence( const ByteSequence & rSeq ) : _pSequence( 0 ) { ::rtl_byte_sequence_assign( &_pSequence, rSeq._pSequence ); } -inline ByteSequence::ByteSequence( sal_Sequence *pSequence) SAL_THROW(()) +inline ByteSequence::ByteSequence( sal_Sequence *pSequence) : _pSequence( pSequence ) { ::rtl_byte_sequence_acquire( pSequence ); @@ -63,7 +63,7 @@ inline ByteSequence::ByteSequence( sal_Int32 len, enum __ByteSequence_NoDefault throw ::std::bad_alloc(); } -inline ByteSequence::ByteSequence( sal_Sequence *pSequence, enum __ByteSequence_NoAcquire ) SAL_THROW(()) +inline ByteSequence::ByteSequence( sal_Sequence *pSequence, enum __ByteSequence_NoAcquire ) : _pSequence( pSequence ) { } @@ -76,18 +76,18 @@ inline ByteSequence::ByteSequence( sal_Int32 len ) throw ::std::bad_alloc(); } -inline ByteSequence::~ByteSequence() SAL_THROW(()) +inline ByteSequence::~ByteSequence() { ::rtl_byte_sequence_release( _pSequence ); } -inline ByteSequence & ByteSequence::operator = ( const ByteSequence & rSeq ) SAL_THROW(()) +inline ByteSequence & ByteSequence::operator = ( const ByteSequence & rSeq ) { ::rtl_byte_sequence_assign( &_pSequence, rSeq._pSequence ); return *this; } -inline bool ByteSequence::operator == ( const ByteSequence & rSeq ) const SAL_THROW(()) +inline bool ByteSequence::operator == ( const ByteSequence & rSeq ) const { return ::rtl_byte_sequence_equals( _pSequence, rSeq._pSequence ); } @@ -112,7 +112,7 @@ inline sal_Int8 & ByteSequence::operator [] ( sal_Int32 nIndex ) return getArray()[ nIndex ]; } -inline bool ByteSequence::operator != ( const ByteSequence & rSeq ) const SAL_THROW(()) +inline bool ByteSequence::operator != ( const ByteSequence & rSeq ) const { return (! operator == ( rSeq )); } diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 5cb9e3b08aab..1a2539ffd401 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -289,7 +289,7 @@ public: @since LibreOffice 4.1 */ - bool isEmpty() const SAL_THROW(()) + bool isEmpty() const { return pData->length == 0; } @@ -923,7 +923,7 @@ public: @internal @since LibreOffice 4.1 */ - friend OString operator+( const OStringBuffer& str1, const OStringBuffer& str2 ) SAL_THROW(()) + friend OString operator+( const OStringBuffer& str1, const OStringBuffer& str2 ) { return OString( str1.pData ).concat( str2.pData ); } diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index fb7283b3a801..cd853e8e6d87 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -96,7 +96,7 @@ public: /** New string containing no characters. */ - OString() SAL_THROW(()) + OString() { pData = 0; rtl_string_new( &pData ); @@ -107,7 +107,7 @@ public: @param str a OString. */ - OString( const OString & str ) SAL_THROW(()) + OString( const OString & str ) { pData = str.pData; rtl_string_acquire( pData ); @@ -118,7 +118,7 @@ public: @param str a OString data. */ - OString( rtl_String * str ) SAL_THROW(()) + OString( rtl_String * str ) { pData = str; rtl_string_acquire( pData ); @@ -131,7 +131,7 @@ public: @param str a OString data. */ - inline OString( rtl_String * str, __sal_NoAcquire ) SAL_THROW(()) + inline OString( rtl_String * str, __sal_NoAcquire ) { pData = str; } @@ -141,7 +141,7 @@ public: @param value a character. */ - explicit OString( sal_Char value ) SAL_THROW(()) + explicit OString( sal_Char value ) : pData (0) { rtl_string_newFromStr_WithLength( &pData, &value, 1 ); @@ -156,14 +156,14 @@ public: @param value a NULL-terminated character array. */ template< typename T > - OString( const T& value, typename internal::CharPtrDetector< T, internal::Dummy >::Type = internal::Dummy() ) SAL_THROW(()) + OString( const T& value, typename internal::CharPtrDetector< T, internal::Dummy >::Type = internal::Dummy() ) { pData = 0; rtl_string_newFromStr( &pData, value ); } template< typename T > - OString( T& value, typename internal::NonConstCharArrayDetector< T, internal::Dummy >::Type = internal::Dummy() ) SAL_THROW(()) + OString( T& value, typename internal::NonConstCharArrayDetector< T, internal::Dummy >::Type = internal::Dummy() ) { pData = 0; rtl_string_newFromStr( &pData, value ); @@ -180,7 +180,7 @@ public: @param literal a string literal */ template< typename T > - OString( T& literal, typename internal::ConstCharArrayDetector< T, internal::Dummy >::Type = internal::Dummy() ) SAL_THROW(()) + OString( T& literal, typename internal::ConstCharArrayDetector< T, internal::Dummy >::Type = internal::Dummy() ) { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); pData = 0; @@ -201,7 +201,7 @@ public: The character array length must be greater or equal than this value. */ - OString( const sal_Char * value, sal_Int32 length ) SAL_THROW(()) + OString( const sal_Char * value, sal_Int32 length ) { pData = 0; rtl_string_newFromStr_WithLength( &pData, value, length ); @@ -254,7 +254,7 @@ public: /** Release the string data. */ - ~OString() SAL_THROW(()) + ~OString() { rtl_string_release( pData ); } @@ -264,7 +264,7 @@ public: @param str a OString. */ - OString & operator=( const OString & str ) SAL_THROW(()) + OString & operator=( const OString & str ) { rtl_string_assign( &pData, str.pData ); return *this; @@ -276,7 +276,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, OString& >::Type operator=( T& literal ) SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, OString& >::Type operator=( T& literal ) { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -292,7 +292,7 @@ public: @param str a OString. */ - OString & operator+=( const OString & str ) SAL_THROW(()) + OString & operator+=( const OString & str ) { rtl_string_newConcat( &pData, pData, str.pData ); return *this; @@ -324,7 +324,7 @@ public: @return the length of the sequence of characters represented by this object. */ - sal_Int32 getLength() const SAL_THROW(()) { return pData->length; } + sal_Int32 getLength() const { return pData->length; } /** Checks if a string is empty. @@ -334,7 +334,7 @@ public: @since LibreOffice 3.4 */ - bool isEmpty() const SAL_THROW(()) + bool isEmpty() const { return pData->length == 0; } @@ -350,7 +350,7 @@ public: @return a pointer to a null-terminated byte string representing the characters of this string object. */ - const sal_Char * getStr() const SAL_THROW(()) { return pData->buffer; } + const sal_Char * getStr() const { return pData->buffer; } /** Access to individual characters. @@ -379,7 +379,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 compareTo( const OString & str ) const SAL_THROW(()) + sal_Int32 compareTo( const OString & str ) const { return rtl_str_compare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -398,7 +398,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 compareTo( const OString & rObj, sal_Int32 maxLength ) const SAL_THROW(()) + sal_Int32 compareTo( const OString & rObj, sal_Int32 maxLength ) const { return rtl_str_shortenedCompare_WithLength( pData->buffer, pData->length, rObj.pData->buffer, rObj.pData->length, maxLength ); @@ -416,7 +416,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 reverseCompareTo( const OString & str ) const SAL_THROW(()) + sal_Int32 reverseCompareTo( const OString & str ) const { return rtl_str_reverseCompare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -433,7 +433,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equals( const OString & str ) const SAL_THROW(()) + bool equals( const OString & str ) const { if ( pData->length != str.pData->length ) return false; @@ -458,7 +458,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsL( const sal_Char* value, sal_Int32 length ) const SAL_THROW(()) + bool equalsL( const sal_Char* value, sal_Int32 length ) const { if ( pData->length != length ) return false; @@ -481,7 +481,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsIgnoreAsciiCase( const OString & str ) const SAL_THROW(()) + bool equalsIgnoreAsciiCase( const OString & str ) const { if ( pData->length != str.pData->length ) return false; @@ -513,13 +513,13 @@ public: false, otherwise. */ template< typename T > - typename internal::CharPtrDetector< T, bool >::Type equalsIgnoreAsciiCase( const T& asciiStr ) const SAL_THROW(()) + typename internal::CharPtrDetector< T, bool >::Type equalsIgnoreAsciiCase( const T& asciiStr ) const { return rtl_str_compareIgnoreAsciiCase( pData->buffer, asciiStr ) == 0; } template< typename T > - typename internal::NonConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& asciiStr ) const SAL_THROW(()) + typename internal::NonConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& asciiStr ) const { return rtl_str_compareIgnoreAsciiCase( pData->buffer, asciiStr ) == 0; } @@ -530,7 +530,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& literal ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& literal ) const { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -559,7 +559,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsIgnoreAsciiCaseL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const { if ( pData->length != asciiStrLength ) return false; @@ -583,7 +583,7 @@ public: at the given position; false, otherwise. */ - bool match( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool match( const OString & str, sal_Int32 fromIndex = 0 ) const { return rtl_str_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, str.pData->length ) == 0; @@ -595,7 +595,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, bool >::Type match( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, bool >::Type match( T& literal, sal_Int32 fromIndex = 0 ) const { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -655,7 +655,7 @@ public: at the given position; false, otherwise. */ - bool matchIgnoreAsciiCase( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchIgnoreAsciiCase( const OString & str, sal_Int32 fromIndex = 0 ) const { return rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, @@ -778,39 +778,39 @@ public: && matchL(str, strLength, getLength() - strLength); } - friend bool operator == ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const OString& rStr1, const OString& rStr2 ) { return rStr1.equals(rStr2); } - friend bool operator != ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const OString& rStr1, const OString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend bool operator < ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator < ( const OString& rStr1, const OString& rStr2 ) { return rStr1.compareTo( rStr2 ) < 0; } - friend bool operator > ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator > ( const OString& rStr1, const OString& rStr2 ) { return rStr1.compareTo( rStr2 ) > 0; } - friend bool operator <= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator <= ( const OString& rStr1, const OString& rStr2 ) { return rStr1.compareTo( rStr2 ) <= 0; } - friend bool operator >= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator >= ( const OString& rStr1, const OString& rStr2 ) { return rStr1.compareTo( rStr2 ) >= 0; } template< typename T > - friend typename internal::CharPtrDetector< T, bool >::Type operator==( const OString& rStr1, const T& value ) SAL_THROW(()) + friend typename internal::CharPtrDetector< T, bool >::Type operator==( const OString& rStr1, const T& value ) { return rStr1.compareTo( value ) == 0; } template< typename T > - friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr1, T& value ) SAL_THROW(()) + friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr1, T& value ) { return rStr1.compareTo( value ) == 0; } template< typename T > - friend typename internal::CharPtrDetector< T, bool >::Type operator==( const T& value, const OString& rStr2 ) SAL_THROW(()) + friend typename internal::CharPtrDetector< T, bool >::Type operator==( const T& value, const OString& rStr2 ) { return rStr2.compareTo( value ) == 0; } template< typename T > - friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( T& value, const OString& rStr2 ) SAL_THROW(()) + friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( T& value, const OString& rStr2 ) { return rStr2.compareTo( value ) == 0; } @@ -821,7 +821,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - friend typename internal::ConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr, T& literal ) SAL_THROW(()) + friend typename internal::ConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr, T& literal ) { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -836,7 +836,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - friend typename internal::ConstCharArrayDetector< T, bool >::Type operator==( T& literal, const OString& rStr ) SAL_THROW(()) + friend typename internal::ConstCharArrayDetector< T, bool >::Type operator==( T& literal, const OString& rStr ) { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -846,25 +846,25 @@ public: } template< typename T > - friend typename internal::CharPtrDetector< T, bool >::Type operator!=( const OString& rStr1, const T& value ) SAL_THROW(()) + friend typename internal::CharPtrDetector< T, bool >::Type operator!=( const OString& rStr1, const T& value ) { return !(operator == ( rStr1, value )); } template< typename T > - friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator!=( const OString& rStr1, T& value ) SAL_THROW(()) + friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator!=( const OString& rStr1, T& value ) { return !(operator == ( rStr1, value )); } template< typename T > - friend typename internal::CharPtrDetector< T, bool >::Type operator!=( const T& value, const OString& rStr2 ) SAL_THROW(()) + friend typename internal::CharPtrDetector< T, bool >::Type operator!=( const T& value, const OString& rStr2 ) { return !(operator == ( value, rStr2 )); } template< typename T > - friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator!=( T& value, const OString& rStr2 ) SAL_THROW(()) + friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator!=( T& value, const OString& rStr2 ) { return !(operator == ( value, rStr2 )); } @@ -875,7 +875,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - friend typename internal::ConstCharArrayDetector< T, bool >::Type operator!=( const OString& rStr, T& literal ) SAL_THROW(()) + friend typename internal::ConstCharArrayDetector< T, bool >::Type operator!=( const OString& rStr, T& literal ) { return !( rStr == literal ); } @@ -886,7 +886,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - friend typename internal::ConstCharArrayDetector< T, bool >::Type operator!=( T& literal, const OString& rStr ) SAL_THROW(()) + friend typename internal::ConstCharArrayDetector< T, bool >::Type operator!=( T& literal, const OString& rStr ) { return !( literal == rStr ); } @@ -898,7 +898,7 @@ public: @see rtl::OStringHash for convenient use of boost::unordered_map */ - sal_Int32 hashCode() const SAL_THROW(()) + sal_Int32 hashCode() const { return rtl_str_hashCode_WithLength( pData->buffer, pData->length ); } @@ -916,7 +916,7 @@ public: greater than or equal to fromIndex, or -1 if the character does not occur. */ - sal_Int32 indexOf( sal_Char ch, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( sal_Char ch, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_str_indexOfChar_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, ch ); return (ret < 0 ? ret : ret+fromIndex); @@ -931,7 +931,7 @@ public: character sequence represented by this string, or -1 if the character does not occur. */ - sal_Int32 lastIndexOf( sal_Char ch ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Char ch ) const { return rtl_str_lastIndexOfChar_WithLength( pData->buffer, pData->length, ch ); } @@ -948,7 +948,7 @@ public: is less than fromIndex, or -1 if the character does not occur before that point. */ - sal_Int32 lastIndexOf( sal_Char ch, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Char ch, sal_Int32 fromIndex ) const { return rtl_str_lastIndexOfChar_WithLength( pData->buffer, fromIndex, ch ); } @@ -968,7 +968,7 @@ public: returned. If it does not occur as a substring starting at fromIndex or beyond, -1 is returned. */ - sal_Int32 indexOf( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( const OString & str, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_str_indexOfStr_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length ); @@ -981,7 +981,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const { RTL_STRING_CONST_FUNCTION assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); @@ -1009,7 +1009,7 @@ public: @since LibreOffice 3.6 */ sal_Int32 indexOfL(char const * str, sal_Int32 len, sal_Int32 fromIndex = 0) - const SAL_THROW(()) + const { sal_Int32 n = rtl_str_indexOfStr_WithLength( pData->buffer + fromIndex, pData->length - fromIndex, str, len); @@ -1039,7 +1039,7 @@ public: the last such substring is returned. If it does not occur as a substring, -1 is returned. */ - sal_Int32 lastIndexOf( const OString & str ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OString & str ) const { return rtl_str_lastIndexOfStr_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -1062,7 +1062,7 @@ public: of the first character of the last such substring is returned. Otherwise, -1 is returned. */ - sal_Int32 lastIndexOf( const OString & str, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OString & str, sal_Int32 fromIndex ) const { return rtl_str_lastIndexOfStr_WithLength( pData->buffer, fromIndex, str.pData->buffer, str.pData->length ); @@ -1078,7 +1078,7 @@ public: @param beginIndex the beginning index, inclusive. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT OString copy( sal_Int32 beginIndex ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString copy( sal_Int32 beginIndex ) const { rtl_String *pNew = 0; rtl_string_newFromSubString( &pNew, pData, beginIndex, getLength() - beginIndex ); @@ -1097,7 +1097,7 @@ public: @param count the number of characters. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT OString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString copy( sal_Int32 beginIndex, sal_Int32 count ) const { rtl_String *pNew = 0; rtl_string_newFromSubString( &pNew, pData, beginIndex, count ); @@ -1112,7 +1112,7 @@ public: @return a string that represents the concatenation of this string followed by the string argument. */ - SAL_WARN_UNUSED_RESULT OString concat( const OString & str ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString concat( const OString & str ) const { rtl_String* pNew = 0; rtl_string_newConcat( &pNew, pData, str.pData ); @@ -1120,7 +1120,7 @@ public: } #ifndef RTL_FAST_STRING - friend OString operator+( const OString & str1, const OString & str2 ) SAL_THROW(()) + friend OString operator+( const OString & str1, const OString & str2 ) { return str1.concat( str2 ); } @@ -1139,7 +1139,7 @@ public: @param newStr the new substring. @return the new string. */ - SAL_WARN_UNUSED_RESULT OString replaceAt( sal_Int32 index, sal_Int32 count, const OString& newStr ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString replaceAt( sal_Int32 index, sal_Int32 count, const OString& newStr ) const { rtl_String* pNew = 0; rtl_string_newReplaceStrAt( &pNew, pData, index, count, newStr.pData ); @@ -1159,7 +1159,7 @@ public: @return a string derived from this string by replacing every occurrence of oldChar with newChar. */ - SAL_WARN_UNUSED_RESULT OString replace( sal_Char oldChar, sal_Char newChar ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString replace( sal_Char oldChar, sal_Char newChar ) const { rtl_String* pNew = 0; rtl_string_newReplace( &pNew, pData, oldChar, newChar ); @@ -1226,7 +1226,7 @@ public: @return the string, converted to ASCII lowercase. */ - SAL_WARN_UNUSED_RESULT OString toAsciiLowerCase() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString toAsciiLowerCase() const { rtl_String* pNew = 0; rtl_string_newToAsciiLowerCase( &pNew, pData ); @@ -1243,7 +1243,7 @@ public: @return the string, converted to ASCII uppercase. */ - SAL_WARN_UNUSED_RESULT OString toAsciiUpperCase() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString toAsciiUpperCase() const { rtl_String* pNew = 0; rtl_string_newToAsciiUpperCase( &pNew, pData ); @@ -1261,7 +1261,7 @@ public: @return the string, with white space removed from the front and end. */ - SAL_WARN_UNUSED_RESULT OString trim() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OString trim() const { rtl_String* pNew = 0; rtl_string_newTrim( &pNew, pData ); @@ -1292,7 +1292,7 @@ public: @return the token; if either token or index is negative, an empty token is returned (and index is set to -1) */ - OString getToken( sal_Int32 token, sal_Char cTok, sal_Int32& index ) const SAL_THROW(()) + OString getToken( sal_Int32 token, sal_Char cTok, sal_Int32& index ) const { rtl_String * pNew = 0; index = rtl_string_getToken( &pNew, pData, token, cTok, index ); @@ -1325,7 +1325,7 @@ public: @return true, if the string is 1 or "True" in any ASCII case. false in any other case. */ - bool toBoolean() const SAL_THROW(()) + bool toBoolean() const { return rtl_str_toBoolean( pData->buffer ); } @@ -1336,7 +1336,7 @@ public: @return the first character from this string or 0, if this string is emptry. */ - sal_Char toChar() const SAL_THROW(()) + sal_Char toChar() const { return pData->buffer[0]; } @@ -1351,7 +1351,7 @@ public: 0 if this string represents no number or one of too large magnitude. */ - sal_Int32 toInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_Int32 toInt32( sal_Int16 radix = 10 ) const { return rtl_str_toInt32( pData->buffer, radix ); } @@ -1368,7 +1368,7 @@ public: @since LibreOffice 4.2 */ - sal_uInt32 toUInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_uInt32 toUInt32( sal_Int16 radix = 10 ) const { return rtl_str_toUInt32( pData->buffer, radix ); } @@ -1383,7 +1383,7 @@ public: 0 if this string represents no number or one of too large magnitude. */ - sal_Int64 toInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_Int64 toInt64( sal_Int16 radix = 10 ) const { return rtl_str_toInt64( pData->buffer, radix ); } @@ -1400,7 +1400,7 @@ public: @since LibreOffice 4.1 */ - sal_uInt64 toUInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_uInt64 toUInt64( sal_Int16 radix = 10 ) const { return rtl_str_toUInt64( pData->buffer, radix ); } @@ -1413,7 +1413,7 @@ public: @return the float represented from this string. 0.0 if this string represents no number. */ - float toFloat() const SAL_THROW(()) + float toFloat() const { return rtl_str_toFloat( pData->buffer ); } @@ -1426,7 +1426,7 @@ public: @return the double represented from this string. 0.0 if this string represents no number. */ - double toDouble() const SAL_THROW(()) + double toDouble() const { return rtl_str_toDouble( pData->buffer ); } @@ -1527,7 +1527,7 @@ public: @return a string with the string representation of the argument. @deprecated use boolean() */ - SAL_DEPRECATED("use boolean()") static OString valueOf( sal_Bool b ) SAL_THROW(()) + SAL_DEPRECATED("use boolean()") static OString valueOf( sal_Bool b ) { return boolean(b); } @@ -1543,7 +1543,7 @@ public: @return a string with the string representation of the argument. @since LibreOffice 4.1 */ - static OString boolean( bool b ) SAL_THROW(()) + static OString boolean( bool b ) { sal_Char aBuf[RTL_STR_MAX_VALUEOFBOOLEAN]; rtl_String* pNewData = 0; @@ -1558,7 +1558,7 @@ public: @return a string with the string representation of the argument. @deprecated use operator, function or constructor taking char or sal_Unicode argument */ - SAL_DEPRECATED("convert to OString or use directly") static OString valueOf( sal_Char c ) SAL_THROW(()) + SAL_DEPRECATED("convert to OString or use directly") static OString valueOf( sal_Char c ) { return OString( &c, 1 ); } @@ -1573,7 +1573,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) { return number( i, radix ); } @@ -1588,7 +1588,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OString valueOf( sal_Int64 ll, sal_Int16 radix = 10 ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OString valueOf( sal_Int64 ll, sal_Int16 radix = 10 ) { return number( ll, radix ); } @@ -1602,7 +1602,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OString valueOf( float f ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OString valueOf( float f ) { return number(f); } @@ -1616,7 +1616,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OString valueOf( double d ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OString valueOf( double d ) { return number(d); } diff --git a/include/rtl/uri.hxx b/include/rtl/uri.hxx index 371eafbb37a4..1f52b3ad7248 100644 --- a/include/rtl/uri.hxx +++ b/include/rtl/uri.hxx @@ -39,8 +39,7 @@ public: static inline rtl::OUString encode(rtl::OUString const & rText, sal_Bool const * pCharClass, rtl_UriEncodeMechanism eMechanism, - rtl_TextEncoding eCharset) - SAL_THROW(()); + rtl_TextEncoding eCharset); /** A wrapper around rtl_uriEncode() from <rtl/uri.h> (see there), using a predefined rtl_UriCharClass enumeration member. @@ -48,15 +47,13 @@ public: static inline rtl::OUString encode(rtl::OUString const & rText, rtl_UriCharClass eCharClass, rtl_UriEncodeMechanism eMechanism, - rtl_TextEncoding eCharset) - SAL_THROW(()); + rtl_TextEncoding eCharset); /** A wrapper around rtl_uriDecode() from <rtl/uri.h> (see there). */ static inline rtl::OUString decode(rtl::OUString const & rText, rtl_UriDecodeMechanism eMechanism, - rtl_TextEncoding eCharset) - SAL_THROW(()); + rtl_TextEncoding eCharset); /** A wrapper around rtl_uriConvertRelToAbs() from <rtl/uri.h> (see there). @@ -85,7 +82,6 @@ inline rtl::OUString Uri::encode(rtl::OUString const & rText, sal_Bool const * pCharClass, rtl_UriEncodeMechanism eMechanism, rtl_TextEncoding eCharset) - SAL_THROW(()) { rtl::OUString aResult; rtl_uriEncode(const_cast< rtl::OUString & >(rText).pData, @@ -100,7 +96,6 @@ inline rtl::OUString Uri::encode(rtl::OUString const & rText, rtl_UriCharClass eCharClass, rtl_UriEncodeMechanism eMechanism, rtl_TextEncoding eCharset) - SAL_THROW(()) { rtl::OUString aResult; rtl_uriEncode(const_cast< rtl::OUString & >(rText).pData, @@ -114,7 +109,6 @@ inline rtl::OUString Uri::encode(rtl::OUString const & rText, inline rtl::OUString Uri::decode(rtl::OUString const & rText, rtl_UriDecodeMechanism eMechanism, rtl_TextEncoding eCharset) - SAL_THROW(()) { rtl::OUString aResult; rtl_uriDecode(const_cast< rtl::OUString & >(rText).pData, diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index a2af555c826c..f6b1fe592405 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -257,7 +257,7 @@ public: @since LibreOffice 4.1 */ - bool isEmpty() const SAL_THROW(()) + bool isEmpty() const { return pData->length == 0; } @@ -1117,7 +1117,7 @@ public: greater than or equal to fromIndex, or -1 if the character does not occur. */ - sal_Int32 indexOf( sal_Unicode ch, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( sal_Unicode ch, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_ustr_indexOfChar_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, ch ); return (ret < 0 ? ret : ret+fromIndex); @@ -1134,7 +1134,7 @@ public: character sequence represented by this string, or -1 if the character does not occur. */ - sal_Int32 lastIndexOf( sal_Unicode ch ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Unicode ch ) const { return rtl_ustr_lastIndexOfChar_WithLength( pData->buffer, pData->length, ch ); } @@ -1153,7 +1153,7 @@ public: is less than fromIndex, or -1 if the character does not occur before that point. */ - sal_Int32 lastIndexOf( sal_Unicode ch, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Unicode ch, sal_Int32 fromIndex ) const { return rtl_ustr_lastIndexOfChar_WithLength( pData->buffer, fromIndex, ch ); } @@ -1175,7 +1175,7 @@ public: returned. If it does not occur as a substring starting at fromIndex or beyond, -1 is returned. */ - sal_Int32 indexOf( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( const OUString & str, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_ustr_indexOfStr_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length ); @@ -1189,7 +1189,7 @@ public: @since LibreOffice 4.0 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); sal_Int32 ret = rtl_ustr_indexOfAscii_WithLength( @@ -1215,7 +1215,7 @@ public: the last such substring is returned. If it does not occur as a substring, -1 is returned. */ - sal_Int32 lastIndexOf( const OUString & str ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OUString & str ) const { return rtl_ustr_lastIndexOfStr_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -1240,7 +1240,7 @@ public: of the first character of the last such substring is returned. Otherwise, -1 is returned. */ - sal_Int32 lastIndexOf( const OUString & str, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OUString & str, sal_Int32 fromIndex ) const { return rtl_ustr_lastIndexOfStr_WithLength( pData->buffer, fromIndex, str.pData->buffer, str.pData->length ); @@ -1252,7 +1252,7 @@ public: @since LibreOffice 4.0 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type lastIndexOf( T& literal ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type lastIndexOf( T& literal ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); return rtl_ustr_lastIndexOfAscii_WithLength( @@ -1335,7 +1335,7 @@ public: @return the specified substring. @since LibreOffice 4.1 */ - OUStringBuffer copy( sal_Int32 beginIndex ) const SAL_THROW(()) + OUStringBuffer copy( sal_Int32 beginIndex ) const { assert(beginIndex >= 0 && beginIndex <= getLength()); return copy( beginIndex, getLength() - beginIndex ); @@ -1354,7 +1354,7 @@ public: @return the specified substring. @since LibreOffice 4.1 */ - OUStringBuffer copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(()) + OUStringBuffer copy( sal_Int32 beginIndex, sal_Int32 count ) const { assert(beginIndex >= 0 && beginIndex <= getLength()); assert(count >= 0 && count <= getLength() - beginIndex); @@ -1371,7 +1371,7 @@ public: @internal @since LibreOffice 4.1 */ - friend OUString operator+( const OUStringBuffer& str1, const OUStringBuffer& str2 ) SAL_THROW(()) + friend OUString operator+( const OUStringBuffer& str1, const OUStringBuffer& str2 ) { return OUString( str1.pData ).concat( str2.pData ); } diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 6864e9163313..3f3db53e291c 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -89,7 +89,7 @@ public: /** New string containing no characters. */ - OUString() SAL_THROW(()) + OUString() { pData = 0; rtl_uString_new( &pData ); @@ -100,7 +100,7 @@ public: @param str a OUString. */ - OUString( const OUString & str ) SAL_THROW(()) + OUString( const OUString & str ) { pData = str.pData; rtl_uString_acquire( pData ); @@ -111,7 +111,7 @@ public: @param str a OUString data. */ - OUString( rtl_uString * str ) SAL_THROW(()) + OUString( rtl_uString * str ) { pData = str; rtl_uString_acquire( pData ); @@ -125,7 +125,7 @@ public: @param str OUString data */ - inline OUString( rtl_uString * str, __sal_NoAcquire ) SAL_THROW(()) + inline OUString( rtl_uString * str, __sal_NoAcquire ) { pData = str; } /** @@ -133,7 +133,7 @@ public: @param value a Unicode character. */ - explicit OUString( sal_Unicode value ) SAL_THROW(()) + explicit OUString( sal_Unicode value ) : pData (0) { rtl_uString_newFromStr_WithLength( &pData, &value, 1 ); @@ -144,7 +144,7 @@ public: @param value a NULL-terminated Unicode character array. */ - OUString( const sal_Unicode * value ) SAL_THROW(()) + OUString( const sal_Unicode * value ) { pData = 0; rtl_uString_newFromStr( &pData, value ); @@ -158,7 +158,7 @@ public: The character array length must be greater than or equal to this value. */ - OUString( const sal_Unicode * value, sal_Int32 length ) SAL_THROW(()) + OUString( const sal_Unicode * value, sal_Int32 length ) { pData = 0; rtl_uString_newFromStr_WithLength( &pData, value, length ); @@ -292,7 +292,7 @@ public: /** Release the string data. */ - ~OUString() SAL_THROW(()) + ~OUString() { rtl_uString_release( pData ); } @@ -316,7 +316,7 @@ public: @param str a OUString. */ - OUString & operator=( const OUString & str ) SAL_THROW(()) + OUString & operator=( const OUString & str ) { rtl_uString_assign( &pData, str.pData ); return *this; @@ -350,7 +350,7 @@ public: @param str a OUString. */ - OUString & operator+=( const OUString & str ) SAL_THROW(()) + OUString & operator+=( const OUString & str ) { rtl_uString_newConcat( &pData, pData, str.pData ); return *this; @@ -383,7 +383,7 @@ public: @return the length of the sequence of characters represented by this object. */ - sal_Int32 getLength() const SAL_THROW(()) { return pData->length; } + sal_Int32 getLength() const { return pData->length; } /** Checks if a string is empty. @@ -393,7 +393,7 @@ public: @since LibreOffice 3.4 */ - bool isEmpty() const SAL_THROW(()) + bool isEmpty() const { return pData->length == 0; } @@ -405,7 +405,7 @@ public: @return a pointer to the Unicode characters buffer for this object. */ - const sal_Unicode * getStr() const SAL_THROW(()) { return pData->buffer; } + const sal_Unicode * getStr() const { return pData->buffer; } /** Access to individual characters. @@ -434,7 +434,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 compareTo( const OUString & str ) const SAL_THROW(()) + sal_Int32 compareTo( const OUString & str ) const { return rtl_ustr_compare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -455,7 +455,7 @@ public: @since UDK 3.2.7 */ - sal_Int32 compareTo( const OUString & str, sal_Int32 maxLength ) const SAL_THROW(()) + sal_Int32 compareTo( const OUString & str, sal_Int32 maxLength ) const { return rtl_ustr_shortenedCompare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length, maxLength ); @@ -473,7 +473,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 reverseCompareTo( const OUString & str ) const SAL_THROW(()) + sal_Int32 reverseCompareTo( const OUString & str ) const { return rtl_ustr_reverseCompare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -485,7 +485,7 @@ public: @since LibreOffice 4.1 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type reverseCompareTo( T& literal ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type reverseCompareTo( T& literal ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); return rtl_ustr_asciil_reverseCompare_WithLength( pData->buffer, pData->length, @@ -503,7 +503,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equals( const OUString & str ) const SAL_THROW(()) + bool equals( const OUString & str ) const { if ( pData->length != str.pData->length ) return false; @@ -527,7 +527,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsIgnoreAsciiCase( const OUString & str ) const SAL_THROW(()) + bool equalsIgnoreAsciiCase( const OUString & str ) const { if ( pData->length != str.pData->length ) return false; @@ -552,7 +552,7 @@ public: @since LibreOffice 4.0 */ - sal_Int32 compareToIgnoreAsciiCase( const OUString & str ) const SAL_THROW(()) + sal_Int32 compareToIgnoreAsciiCase( const OUString & str ) const { return rtl_ustr_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -565,7 +565,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& literal ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, bool >::Type equalsIgnoreAsciiCase( T& literal ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); if ( pData->length != internal::ConstCharArrayDetector< T, void >::size - 1 ) @@ -589,7 +589,7 @@ public: at the given position; false, otherwise. */ - bool match( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool match( const OUString & str, sal_Int32 fromIndex = 0 ) const { return rtl_ustr_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, str.pData->length ) == 0; @@ -601,7 +601,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, bool >::Type match( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, bool >::Type match( T& literal, sal_Int32 fromIndex = 0 ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); return rtl_ustr_ascii_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, @@ -626,7 +626,7 @@ public: at the given position; false, otherwise. */ - bool matchIgnoreAsciiCase( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchIgnoreAsciiCase( const OUString & str, sal_Int32 fromIndex = 0 ) const { return rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, @@ -639,7 +639,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, bool >::Type matchIgnoreAsciiCase( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, bool >::Type matchIgnoreAsciiCase( T& literal, sal_Int32 fromIndex = 0 ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); return rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, @@ -662,7 +662,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 compareToAscii( const sal_Char* asciiStr ) const SAL_THROW(()) + sal_Int32 compareToAscii( const sal_Char* asciiStr ) const { return rtl_ustr_ascii_compare_WithLength( pData->buffer, pData->length, asciiStr ); } @@ -691,7 +691,7 @@ public: */ SAL_DEPRECATED( "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)") - sal_Int32 compareToAscii( const sal_Char * asciiStr, sal_Int32 maxLength ) const SAL_THROW(()) + sal_Int32 compareToAscii( const sal_Char * asciiStr, sal_Int32 maxLength ) const { return rtl_ustr_ascii_shortenedCompare_WithLength( pData->buffer, pData->length, asciiStr, maxLength ); @@ -716,7 +716,7 @@ public: < 0 - if this string is less than the string argument > 0 - if this string is greater than the string argument */ - sal_Int32 reverseCompareToAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + sal_Int32 reverseCompareToAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const { return rtl_ustr_asciil_reverseCompare_WithLength( pData->buffer, pData->length, asciiStr, asciiStrLength ); @@ -737,7 +737,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsAscii( const sal_Char* asciiStr ) const SAL_THROW(()) + bool equalsAscii( const sal_Char* asciiStr ) const { return rtl_ustr_ascii_compare_WithLength( pData->buffer, pData->length, asciiStr ) == 0; @@ -760,7 +760,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength ) const { if ( pData->length != asciiStrLength ) return false; @@ -787,7 +787,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const { return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr ) == 0; } @@ -810,7 +810,7 @@ public: @since LibreOffice 3.5 */ - sal_Int32 compareToIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const SAL_THROW(()) + sal_Int32 compareToIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const { return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr ); } @@ -835,7 +835,7 @@ public: @return true if the strings are equal; false, otherwise. */ - bool equalsIgnoreAsciiCaseAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const { if ( pData->length != asciiStrLength ) return false; @@ -864,7 +864,7 @@ public: at the given position; false, otherwise. */ - bool matchAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex = 0 ) const { return rtl_ustr_ascii_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, asciiStr, asciiStrLength ) == 0; @@ -902,7 +902,7 @@ public: at the given position; false, otherwise. */ - bool matchIgnoreAsciiCaseAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchIgnoreAsciiCaseAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex = 0 ) const { return rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, asciiStr, asciiStrLength ) == 0; @@ -1150,27 +1150,27 @@ public: == 0); } - friend bool operator == ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.equals(rStr2); } - friend bool operator == ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) + friend bool operator == ( const OUString& rStr1, const sal_Unicode * pStr2 ) { return rStr1.compareTo( pStr2 ) == 0; } - friend bool operator == ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const sal_Unicode * pStr1, const OUString& rStr2 ) { return OUString( pStr1 ).compareTo( rStr2 ) == 0; } - friend bool operator != ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const OUString& rStr1, const OUString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend bool operator != ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) + friend bool operator != ( const OUString& rStr1, const sal_Unicode * pStr2 ) { return !(operator == ( rStr1, pStr2 )); } - friend bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 ) { return !(operator == ( pStr1, rStr2 )); } - friend bool operator < ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator < ( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.compareTo( rStr2 ) < 0; } - friend bool operator > ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator > ( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.compareTo( rStr2 ) > 0; } - friend bool operator <= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator <= ( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.compareTo( rStr2 ) <= 0; } - friend bool operator >= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator >= ( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.compareTo( rStr2 ) >= 0; } /** @@ -1233,7 +1233,7 @@ public: @see rtl::OUStringHash for convenient use of boost::unordered_map */ - sal_Int32 hashCode() const SAL_THROW(()) + sal_Int32 hashCode() const { return rtl_ustr_hashCode_WithLength( pData->buffer, pData->length ); } @@ -1251,7 +1251,7 @@ public: greater than or equal to fromIndex, or -1 if the character does not occur. */ - sal_Int32 indexOf( sal_Unicode ch, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( sal_Unicode ch, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_ustr_indexOfChar_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, ch ); return (ret < 0 ? ret : ret+fromIndex); @@ -1266,7 +1266,7 @@ public: character sequence represented by this string, or -1 if the character does not occur. */ - sal_Int32 lastIndexOf( sal_Unicode ch ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Unicode ch ) const { return rtl_ustr_lastIndexOfChar_WithLength( pData->buffer, pData->length, ch ); } @@ -1283,7 +1283,7 @@ public: is less than fromIndex, or -1 if the character does not occur before that point. */ - sal_Int32 lastIndexOf( sal_Unicode ch, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( sal_Unicode ch, sal_Int32 fromIndex ) const { return rtl_ustr_lastIndexOfChar_WithLength( pData->buffer, fromIndex, ch ); } @@ -1303,7 +1303,7 @@ public: returned. If it does not occur as a substring starting at fromIndex or beyond, -1 is returned. */ - sal_Int32 indexOf( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + sal_Int32 indexOf( const OUString & str, sal_Int32 fromIndex = 0 ) const { sal_Int32 ret = rtl_ustr_indexOfStr_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length ); @@ -1316,7 +1316,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type indexOf( T& literal, sal_Int32 fromIndex = 0 ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); sal_Int32 ret = rtl_ustr_indexOfAscii_WithLength( @@ -1350,7 +1350,6 @@ public: */ sal_Int32 indexOfAsciiL( char const * str, sal_Int32 len, sal_Int32 fromIndex = 0) const - SAL_THROW(()) { sal_Int32 ret = rtl_ustr_indexOfAscii_WithLength( pData->buffer + fromIndex, pData->length - fromIndex, str, len); @@ -1380,7 +1379,7 @@ public: the last such substring is returned. If it does not occur as a substring, -1 is returned. */ - sal_Int32 lastIndexOf( const OUString & str ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OUString & str ) const { return rtl_ustr_lastIndexOfStr_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ); @@ -1403,7 +1402,7 @@ public: of the first character of the last such substring is returned. Otherwise, -1 is returned. */ - sal_Int32 lastIndexOf( const OUString & str, sal_Int32 fromIndex ) const SAL_THROW(()) + sal_Int32 lastIndexOf( const OUString & str, sal_Int32 fromIndex ) const { return rtl_ustr_lastIndexOfStr_WithLength( pData->buffer, fromIndex, str.pData->buffer, str.pData->length ); @@ -1415,7 +1414,7 @@ public: @since LibreOffice 3.6 */ template< typename T > - typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type lastIndexOf( T& literal ) const SAL_THROW(()) + typename internal::ConstCharArrayDetector< T, sal_Int32 >::Type lastIndexOf( T& literal ) const { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); return rtl_ustr_lastIndexOfAscii_WithLength( @@ -1442,7 +1441,6 @@ public: @since UDK 3.2.7 */ sal_Int32 lastIndexOfAsciiL(char const * str, sal_Int32 len) const - SAL_THROW(()) { return rtl_ustr_lastIndexOfAscii_WithLength( pData->buffer, pData->length, str, len); @@ -1458,7 +1456,7 @@ public: @param beginIndex the beginning index, inclusive. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT OUString copy( sal_Int32 beginIndex ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString copy( sal_Int32 beginIndex ) const { rtl_uString *pNew = 0; rtl_uString_newFromSubString( &pNew, pData, beginIndex, getLength() - beginIndex ); @@ -1477,7 +1475,7 @@ public: @param count the number of characters. @return the specified substring. */ - SAL_WARN_UNUSED_RESULT OUString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString copy( sal_Int32 beginIndex, sal_Int32 count ) const { rtl_uString *pNew = 0; rtl_uString_newFromSubString( &pNew, pData, beginIndex, count ); @@ -1492,7 +1490,7 @@ public: @return a string that represents the concatenation of this string followed by the string argument. */ - SAL_WARN_UNUSED_RESULT OUString concat( const OUString & str ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString concat( const OUString & str ) const { rtl_uString* pNew = 0; rtl_uString_newConcat( &pNew, pData, str.pData ); @@ -1500,7 +1498,7 @@ public: } #ifndef RTL_FAST_STRING - friend OUString operator+( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend OUString operator+( const OUString& rStr1, const OUString& rStr2 ) { return rStr1.concat( rStr2 ); } @@ -1519,7 +1517,7 @@ public: @param newStr the new substring. @return the new string. */ - SAL_WARN_UNUSED_RESULT OUString replaceAt( sal_Int32 index, sal_Int32 count, const OUString& newStr ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString replaceAt( sal_Int32 index, sal_Int32 count, const OUString& newStr ) const { rtl_uString* pNew = 0; rtl_uString_newReplaceStrAt( &pNew, pData, index, count, newStr.pData ); @@ -1539,7 +1537,7 @@ public: @return a string derived from this string by replacing every occurrence of oldChar with newChar. */ - SAL_WARN_UNUSED_RESULT OUString replace( sal_Unicode oldChar, sal_Unicode newChar ) const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString replace( sal_Unicode oldChar, sal_Unicode newChar ) const { rtl_uString* pNew = 0; rtl_uString_newReplace( &pNew, pData, oldChar, newChar ); @@ -1717,7 +1715,7 @@ public: @return the string, converted to ASCII lowercase. */ - SAL_WARN_UNUSED_RESULT OUString toAsciiLowerCase() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString toAsciiLowerCase() const { rtl_uString* pNew = 0; rtl_uString_newToAsciiLowerCase( &pNew, pData ); @@ -1734,7 +1732,7 @@ public: @return the string, converted to ASCII uppercase. */ - SAL_WARN_UNUSED_RESULT OUString toAsciiUpperCase() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString toAsciiUpperCase() const { rtl_uString* pNew = 0; rtl_uString_newToAsciiUpperCase( &pNew, pData ); @@ -1752,7 +1750,7 @@ public: @return the string, with white space removed from the front and end. */ - SAL_WARN_UNUSED_RESULT OUString trim() const SAL_THROW(()) + SAL_WARN_UNUSED_RESULT OUString trim() const { rtl_uString* pNew = 0; rtl_uString_newTrim( &pNew, pData ); @@ -1783,7 +1781,7 @@ public: @return the token; if either token or index is negative, an empty token is returned (and index is set to -1) */ - OUString getToken( sal_Int32 token, sal_Unicode cTok, sal_Int32& index ) const SAL_THROW(()) + OUString getToken( sal_Int32 token, sal_Unicode cTok, sal_Int32& index ) const { rtl_uString * pNew = 0; index = rtl_uString_getToken( &pNew, pData, token, cTok, index ); @@ -1816,7 +1814,7 @@ public: @return true, if the string is 1 or "True" in any ASCII case. false in any other case. */ - bool toBoolean() const SAL_THROW(()) + bool toBoolean() const { return rtl_ustr_toBoolean( pData->buffer ); } @@ -1827,7 +1825,7 @@ public: @return the first character from this string or 0, if this string is emptry. */ - sal_Unicode toChar() const SAL_THROW(()) + sal_Unicode toChar() const { return pData->buffer[0]; } @@ -1842,7 +1840,7 @@ public: 0 if this string represents no number or one of too large magnitude. */ - sal_Int32 toInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_Int32 toInt32( sal_Int16 radix = 10 ) const { return rtl_ustr_toInt32( pData->buffer, radix ); } @@ -1859,7 +1857,7 @@ public: @since LibreOffice 4.2 */ - sal_uInt32 toUInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_uInt32 toUInt32( sal_Int16 radix = 10 ) const { return rtl_ustr_toUInt32( pData->buffer, radix ); } @@ -1874,7 +1872,7 @@ public: 0 if this string represents no number or one of too large magnitude. */ - sal_Int64 toInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_Int64 toInt64( sal_Int16 radix = 10 ) const { return rtl_ustr_toInt64( pData->buffer, radix ); } @@ -1891,7 +1889,7 @@ public: @since LibreOffice 4.1 */ - sal_uInt64 toUInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) + sal_uInt64 toUInt64( sal_Int16 radix = 10 ) const { return rtl_ustr_toUInt64( pData->buffer, radix ); } @@ -1904,7 +1902,7 @@ public: @return the float represented from this string. 0.0 if this string represents no number. */ - float toFloat() const SAL_THROW(()) + float toFloat() const { return rtl_ustr_toFloat( pData->buffer ); } @@ -1917,7 +1915,7 @@ public: @return the double represented from this string. 0.0 if this string represents no number. */ - double toDouble() const SAL_THROW(()) + double toDouble() const { return rtl_ustr_toDouble( pData->buffer ); } @@ -2175,7 +2173,7 @@ public: @return a string with the string representation of the argument. @deprecated use boolean() */ - SAL_DEPRECATED("use boolean()") static OUString valueOf( sal_Bool b ) SAL_THROW(()) + SAL_DEPRECATED("use boolean()") static OUString valueOf( sal_Bool b ) { return boolean(b); } @@ -2191,7 +2189,7 @@ public: @return a string with the string representation of the argument. @since LibreOffice 4.1 */ - static OUString boolean( bool b ) SAL_THROW(()) + static OUString boolean( bool b ) { sal_Unicode aBuf[RTL_USTR_MAX_VALUEOFBOOLEAN]; rtl_uString* pNewData = 0; @@ -2206,7 +2204,7 @@ public: @return a string with the string representation of the argument. @deprecated use operator, function or constructor taking char or sal_Unicode argument */ - SAL_DEPRECATED("convert to OUString or use directly") static OUString valueOf( sal_Unicode c ) SAL_THROW(()) + SAL_DEPRECATED("convert to OUString or use directly") static OUString valueOf( sal_Unicode c ) { return OUString( &c, 1 ); } @@ -2221,7 +2219,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OUString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OUString valueOf( sal_Int32 i, sal_Int16 radix = 10 ) { return number( i, radix ); } @@ -2236,7 +2234,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OUString valueOf( sal_Int64 ll, sal_Int16 radix = 10 ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OUString valueOf( sal_Int64 ll, sal_Int16 radix = 10 ) { return number( ll, radix ); } @@ -2250,7 +2248,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OUString valueOf( float f ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OUString valueOf( float f ) { return number(f); } @@ -2264,7 +2262,7 @@ public: @return a string with the string representation of the argument. @deprecated use number() */ - SAL_DEPRECATED("use number()") static OUString valueOf( double d ) SAL_THROW(()) + SAL_DEPRECATED("use number()") static OUString valueOf( double d ) { return number(d); } @@ -2284,7 +2282,7 @@ public: @param value the 8-Bit ASCII character string @return a string with the string representation of the argument. */ - static OUString createFromAscii( const sal_Char * value ) SAL_THROW(()) + static OUString createFromAscii( const sal_Char * value ) { rtl_uString* pNew = 0; rtl_uString_newFromAscii( &pNew, value ); diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx index 081b95859913..e74cafedffb8 100644 --- a/sal/cpprt/operators_new_delete.cxx +++ b/sal/cpprt/operators_new_delete.cxx @@ -33,11 +33,11 @@ struct AllocatorTraits typedef char const signature_type[8]; const signature_type & m_signature; - explicit AllocatorTraits (signature_type const & s) SAL_THROW(()) + explicit AllocatorTraits (signature_type const & s) : m_signature (s) {} - std::size_t size (std::size_t n) const SAL_THROW(()) + std::size_t size (std::size_t n) const { n = std::max(n, std::size_t(1)); #if OSL_DEBUG_LEVEL > 0 @@ -46,7 +46,7 @@ struct AllocatorTraits return n; } - void* init (void * p) const SAL_THROW(()) + void* init (void * p) const { #if OSL_DEBUG_LEVEL > 0 memcpy (p, m_signature, sizeof(signature_type)); @@ -55,7 +55,7 @@ struct AllocatorTraits return p; } - void* fini (void * p) const SAL_THROW(()) + void* fini (void * p) const { #if OSL_DEBUG_LEVEL > 0 p = static_cast<char*>(p) - sizeof(signature_type); @@ -72,7 +72,7 @@ struct VectorTraits : public AllocatorTraits { static const signature_type g_signature; - VectorTraits() SAL_THROW(()) + VectorTraits() : AllocatorTraits (g_signature) {} }; @@ -81,7 +81,7 @@ struct ScalarTraits : public AllocatorTraits { static const signature_type g_signature; - ScalarTraits() SAL_THROW(()) + ScalarTraits() : AllocatorTraits (g_signature) {} }; @@ -101,7 +101,6 @@ static void default_handler (void) static void* allocate ( std::size_t n, AllocatorTraits const & rTraits) - SAL_THROW((std::bad_alloc)) { n = rTraits.size (n); for (;;) @@ -122,7 +121,6 @@ static void* allocate ( static void* allocate_nothrow ( std::size_t n, AllocatorTraits const & rTraits) - SAL_THROW(()) { try { @@ -135,7 +133,6 @@ static void* allocate_nothrow ( } static void deallocate (void * p, AllocatorTraits const & rTraits) - SAL_THROW(()) { if (p) { diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 86f22c823e8b..c93aa0c5ace9 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -122,10 +122,10 @@ struct rtl_bootstrap_NameValue OUString sName; OUString sValue; - inline rtl_bootstrap_NameValue() SAL_THROW( () ) + inline rtl_bootstrap_NameValue() {} inline rtl_bootstrap_NameValue( - OUString const & name, OUString const & value ) SAL_THROW( () ) + OUString const & name, OUString const & value ) : sName( name ), sValue( value ) {} @@ -316,9 +316,9 @@ struct Bootstrap_Impl explicit Bootstrap_Impl (OUString const & rIniName); ~Bootstrap_Impl(); - static void * operator new (std::size_t n) SAL_THROW(()) + static void * operator new (std::size_t n) { return rtl_allocateMemory (sal_uInt32(n)); } - static void operator delete (void * p , std::size_t) SAL_THROW(()) + static void operator delete (void * p , std::size_t) { rtl_freeMemory (p); } bool getValue( @@ -410,7 +410,7 @@ Bootstrap_Impl::~Bootstrap_Impl() namespace { -Bootstrap_Impl * get_static_bootstrap_handle() SAL_THROW(()) +Bootstrap_Impl * get_static_bootstrap_handle() { osl::MutexGuard guard( osl::Mutex::getGlobalMutex() ); static Bootstrap_Impl * s_handle = 0; |