diff options
31 files changed, 179 insertions, 131 deletions
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index aeb054a67a52..c2a87fb72fb3 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -73,7 +73,7 @@ static inline bool __td_equals( SAL_THROW(()) { return ((pTDR1 == pTDR2) || - ((OUString const *)&pTDR1->pTypeName)->equals( *(OUString const *)&pTDR2->pTypeName ) != sal_False); + ((OUString const *)&pTDR1->pTypeName)->equals( *(OUString const *)&pTDR2->pTypeName )); } //-------------------------------------------------------------------------------------------------- static inline type_entry * __getTypeEntries( class_data * cd ) diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index b84c95ae5f2a..927aa4f0c1c4 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -284,7 +284,7 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() if (osl::File::E_None == osl::File::getAbsoluteFileURL( OUString(), dp_misc::expandUnoRcUrl(m_url), sFile)) { - if (sal_True == sFile.match(sExtensionDir, 0)) + if (sFile.match(sExtensionDir, 0)) bSuccess = true; } } diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 5eac7a0ffa87..f38d74592cfb 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -117,7 +117,7 @@ static inline OUString getBaseInstallation() inline bool isObsoleteUpdateInfo(const OUString& rBuildId) { - return sal_True != rBuildId.equals(getBuildId()) && !rBuildId.isEmpty(); + return !rBuildId.equals(getBuildId()) && !rBuildId.isEmpty(); } @@ -1267,7 +1267,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) { osl::ClearableMutexGuard aGuard(m_aMutex); - bool bSuppressBubble = (sal_True == aInfo.BuildId.equals(m_aUpdateInfo.BuildId)); + bool bSuppressBubble = aInfo.BuildId.equals(m_aUpdateInfo.BuildId); m_aUpdateInfo = aInfo; OSL_ASSERT(DISABLED == m_eState || CHECK_SCHEDULED == m_eState); diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index 28972e34aeda..72fb684228e9 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -120,12 +120,12 @@ public: { const com::sun::star::beans::PropertyValue* pValues = t.getConstArray(); OUString sInstance( "Instance" ); - sal_Bool bFound = sal_False; + bool bFound = false; for( sal_Int32 i = 0; ( ! bFound ) && ( i < t.getLength() ); i++ ) { bFound |= ( pValues[i].Name == sInstance ); } - return bFound ? true : false; + return bFound; } }; diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 1586c4e544de..5cb9e3b08aab 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -758,6 +758,31 @@ public: } /** + Inserts the string representation of the <code>bool</code> + argument into this string buffer. + + The second argument is converted to a string as if by the method + <code>OString::boolean</code>, and the characters of that + string are then inserted into this string buffer at the indicated + offset. + <p> + The offset argument must be greater than or equal to + <code>0</code>, and less than or equal to the length of this + string buffer. + + @param offset the offset. + @param b a <code>bool</code>. + @return this string buffer. + + @since LibreOffice 4.3 + */ + OStringBuffer & insert(sal_Int32 offset, bool b) + { + sal_Char sz[RTL_STR_MAX_VALUEOFBOOLEAN]; + return insert( offset, sz, rtl_str_valueOfBoolean( sz, b ) ); + } + + /** Inserts the string representation of the <code>char</code> argument into this string buffer. diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index 04d89cb26c9c..fb7283b3a801 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -430,15 +430,15 @@ public: This function can't be used for language specific comparison. @param str the object to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equals( const OString & str ) const SAL_THROW(()) + bool equals( const OString & str ) const SAL_THROW(()) { if ( pData->length != str.pData->length ) - return sal_False; + return false; if ( pData == str.pData ) - return sal_True; + return true; return rtl_str_reverseCompare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ) == 0; } @@ -455,13 +455,13 @@ public: @param value a character array. @param length the length of the character array. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsL( const sal_Char* value, sal_Int32 length ) const SAL_THROW(()) + bool equalsL( const sal_Char* value, sal_Int32 length ) const SAL_THROW(()) { if ( pData->length != length ) - return sal_False; + return false; return rtl_str_reverseCompare_WithLength( pData->buffer, pData->length, value, length ) == 0; @@ -478,15 +478,15 @@ public: This function can't be used for language specific comparison. @param str the object to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsIgnoreAsciiCase( const OString & str ) const SAL_THROW(()) + bool equalsIgnoreAsciiCase( const OString & str ) const SAL_THROW(()) { if ( pData->length != str.pData->length ) - return sal_False; + return false; if ( pData == str.pData ) - return sal_True; + return true; return rtl_str_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ) == 0; } @@ -509,8 +509,8 @@ public: The template is used only for technical reasons. @param asciiStr the 8-Bit ASCII character string to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ template< typename T > typename internal::CharPtrDetector< T, bool >::Type equalsIgnoreAsciiCase( const T& asciiStr ) const SAL_THROW(()) @@ -556,13 +556,13 @@ public: @param asciiStr the 8-Bit ASCII character string to be compared. @param asciiStrLength the length of the ascii string - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsIgnoreAsciiCaseL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) { if ( pData->length != asciiStrLength ) - return sal_False; + return false; return rtl_str_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr, asciiStrLength ) == 0; @@ -579,11 +579,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater or equal than 0 and less or equal as the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_Bool match( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool match( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) { return rtl_str_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, str.pData->length ) == 0; @@ -651,11 +651,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater or equal than 0 and less or equal as the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_Bool matchIgnoreAsciiCase( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchIgnoreAsciiCase( const OString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) { return rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, @@ -778,17 +778,17 @@ public: && matchL(str, strLength, getLength() - strLength); } - friend sal_Bool operator == ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return rStr1.equals(rStr2); } - friend sal_Bool operator != ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return !(operator == ( rStr1, rStr2 )); } - friend sal_Bool operator < ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator < ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) < 0; } - friend sal_Bool operator > ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator > ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) > 0; } - friend sal_Bool operator <= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator <= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) <= 0; } - friend sal_Bool operator >= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) + friend bool operator >= ( const OString& rStr1, const OString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) >= 0; } template< typename T > @@ -1322,10 +1322,10 @@ public: This function can't be used for language specific conversion. - @return sal_True, if the string is 1 or "True" in any ASCII case. - sal_False in any other case. + @return true, if the string is 1 or "True" in any ASCII case. + false in any other case. */ - sal_Bool toBoolean() const SAL_THROW(()) + bool toBoolean() const SAL_THROW(()) { return rtl_str_toBoolean( pData->buffer ); } diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 6697d9b2f775..a2af555c826c 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -838,6 +838,31 @@ public: } /** + Inserts the string representation of the <code>bool</code> + argument into this string buffer. + + The second argument is converted to a string as if by the method + <code>OUString::boolean</code>, and the characters of that + string are then inserted into this string buffer at the indicated + offset. + <p> + The offset argument must be greater than or equal to + <code>0</code>, and less than or equal to the length of this + string buffer. + + @param offset the offset. + @param b a <code>bool</code>. + @return this string buffer. + + @since LibreOffice 4.3 + */ + OUStringBuffer & insert(sal_Int32 offset, bool b) + { + sal_Unicode sz[RTL_USTR_MAX_VALUEOFBOOLEAN]; + return insert( offset, sz, rtl_ustr_valueOfBoolean( sz, b ) ); + } + + /** Inserts the string representation of the <code>char</code> argument into this string buffer. diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 826727fc3984..f1a5f4aeb296 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -500,15 +500,15 @@ public: This function can't be used for language specific comparison. @param str the object to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equals( const OUString & str ) const SAL_THROW(()) + bool equals( const OUString & str ) const SAL_THROW(()) { if ( pData->length != str.pData->length ) - return sal_False; + return false; if ( pData == str.pData ) - return sal_True; + return true; return rtl_ustr_reverseCompare_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ) == 0; } @@ -524,15 +524,15 @@ public: This function can't be used for language specific comparison. @param str the object to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsIgnoreAsciiCase( const OUString & str ) const SAL_THROW(()) + bool equalsIgnoreAsciiCase( const OUString & str ) const SAL_THROW(()) { if ( pData->length != str.pData->length ) - return sal_False; + return false; if ( pData == str.pData ) - return sal_True; + return true; return rtl_ustr_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, str.pData->buffer, str.pData->length ) == 0; } @@ -569,7 +569,7 @@ public: { assert( strlen( literal ) == internal::ConstCharArrayDetector< T >::size - 1 ); if ( pData->length != internal::ConstCharArrayDetector< T, void >::size - 1 ) - return sal_False; + return false; return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, literal ) == 0; } @@ -585,11 +585,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater than or equal to 0 and less or equal as the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_Bool match( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool match( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) { return rtl_ustr_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, str.pData->length ) == 0; @@ -622,11 +622,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater than or equal to 0 and less than or equal to the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_Bool matchIgnoreAsciiCase( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) + bool matchIgnoreAsciiCase( const OUString & str, sal_Int32 fromIndex = 0 ) const SAL_THROW(()) { return rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, str.pData->buffer, str.pData->length, @@ -734,10 +734,10 @@ public: This function can't be used for language specific comparison. @param asciiStr the 8-Bit ASCII character string to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsAscii( const sal_Char* asciiStr ) const SAL_THROW(()) + bool equalsAscii( const sal_Char* asciiStr ) const SAL_THROW(()) { return rtl_ustr_ascii_compare_WithLength( pData->buffer, pData->length, asciiStr ) == 0; @@ -757,13 +757,13 @@ public: @param asciiStr the 8-Bit ASCII character string to be compared. @param asciiStrLength the length of the ascii string - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsAsciiL( const sal_Char* asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) { if ( pData->length != asciiStrLength ) - return sal_False; + return false; return rtl_ustr_asciil_reverseEquals_WithLength( pData->buffer, asciiStr, asciiStrLength ); @@ -784,10 +784,10 @@ public: This function can't be used for language specific comparison. @param asciiStr the 8-Bit ASCII character string to be compared. - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseAscii( const sal_Char * asciiStr ) const SAL_THROW(()) { return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr ) == 0; } @@ -832,13 +832,13 @@ public: @param asciiStr the 8-Bit ASCII character string to be compared. @param asciiStrLength the length of the ascii string - @return sal_True if the strings are equal; - sal_False, otherwise. + @return true if the strings are equal; + false, otherwise. */ - sal_Bool equalsIgnoreAsciiCaseAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) + bool equalsIgnoreAsciiCaseAsciiL( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const SAL_THROW(()) { if ( pData->length != asciiStrLength ) - return sal_False; + return false; return rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength( pData->buffer, pData->length, asciiStr ) == 0; } @@ -860,11 +860,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater than or equal to 0 and less than or equal to the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_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 SAL_THROW(()) { return rtl_ustr_ascii_shortenedCompare_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, asciiStr, asciiStrLength ) == 0; @@ -898,11 +898,11 @@ public: @param fromIndex the index to start the comparion from. The index must be greater than or equal to 0 and less than or equal to the string length. - @return sal_True if str match with the characters in the string + @return true if str match with the characters in the string at the given position; - sal_False, otherwise. + false, otherwise. */ - sal_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 SAL_THROW(()) { return rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( pData->buffer+fromIndex, pData->length-fromIndex, asciiStr, asciiStrLength ) == 0; @@ -1150,27 +1150,27 @@ public: == 0); } - friend sal_Bool operator == ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return rStr1.equals(rStr2); } - friend sal_Bool operator == ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) + friend bool operator == ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) { return rStr1.compareTo( pStr2 ) == 0; } - friend sal_Bool operator == ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator == ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) { return OUString( pStr1 ).compareTo( rStr2 ) == 0; } - friend sal_Bool operator != ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return !(operator == ( rStr1, rStr2 )); } - friend sal_Bool operator != ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) + friend bool operator != ( const OUString& rStr1, const sal_Unicode * pStr2 ) SAL_THROW(()) { return !(operator == ( rStr1, pStr2 )); } - friend sal_Bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator != ( const sal_Unicode * pStr1, const OUString& rStr2 ) SAL_THROW(()) { return !(operator == ( pStr1, rStr2 )); } - friend sal_Bool operator < ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator < ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) < 0; } - friend sal_Bool operator > ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator > ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) > 0; } - friend sal_Bool operator <= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator <= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) <= 0; } - friend sal_Bool operator >= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) + friend bool operator >= ( const OUString& rStr1, const OUString& rStr2 ) SAL_THROW(()) { return rStr1.compareTo( rStr2 ) >= 0; } /** @@ -1813,10 +1813,10 @@ public: This function can't be used for language specific conversion. - @return sal_True, if the string is 1 or "True" in any ASCII case. - sal_False in any other case. + @return true, if the string is 1 or "True" in any ASCII case. + false in any other case. */ - sal_Bool toBoolean() const SAL_THROW(()) + bool toBoolean() const SAL_THROW(()) { return rtl_ustr_toBoolean( pData->buffer ); } diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 981b8278385f..099ff835dc23 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -240,7 +240,7 @@ javaPluginError jfw_plugin_getAllJavaInfos( { const rtl::Reference<VendorBase>& cur = *i; - if (ouVendor.equals(cur->getVendor()) == sal_False) + if (!ouVendor.equals(cur->getVendor())) continue; if (!ouMinVer.isEmpty()) @@ -364,7 +364,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath( return JFW_PLUGIN_E_NO_JRE; //Check if the detected JRE matches the version requirements - if (ouVendor.equals(aVendorInfo->getVendor()) == sal_False) + if (!ouVendor.equals(aVendorInfo->getVendor())) return JFW_PLUGIN_E_NO_JRE; if (!ouMinVer.isEmpty()) @@ -646,7 +646,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2) // in the class path in order to have applet support. OString sClassPath = arOptions[i].optionString; - if (sClassPath.match(sClassPathProp, 0) == sal_True) + if (sClassPath.match(sClassPathProp, 0)) { char sep[] = {SAL_PATHSEPARATOR, 0}; OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx index 33ff7e35b530..103b3f4610db 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx @@ -59,7 +59,7 @@ struct InfoFindSame bool operator () (const rtl::Reference<VendorBase> & aVendorInfo) { - return aVendorInfo->getHome().equals(sJava) == sal_True ? true : false; + return aVendorInfo->getHome().equals(sJava); } }; @@ -75,7 +75,7 @@ struct SameOrSubDirJREMap return true; OUString sSub; sSub = s2.first + OUString("/"); - if (s1.match(sSub) == sal_True) + if (s1.match(sSub)) return true; return false; } diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 688864e48819..4b2bbefb10d0 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -686,9 +686,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo( OUString sLocation(pInfoA->sLocation); OUString sVersion(pInfoA->sVersion); rtl::ByteSequence sData(pInfoA->arVendorData); - if (sVendor.equals(pInfoB->sVendor) == sal_True - && sLocation.equals(pInfoB->sLocation) == sal_True - && sVersion.equals(pInfoB->sVersion) == sal_True + if (sVendor.equals(pInfoB->sVendor) + && sLocation.equals(pInfoB->sLocation) + && sVersion.equals(pInfoB->sVersion) && pInfoA->nFeatures == pInfoB->nFeatures && pInfoA->nRequirements == pInfoB->nRequirements && sData == pInfoB->arVendorData) @@ -751,7 +751,7 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo) // /java/javaInfo/@vendorUpdate != javaSelection/updated (javavendors.xml) OString sUpdated = jfw::getElementUpdated(); - if (sUpdated.equals(settings.getJavaInfoAttrVendorUpdate()) == sal_False) + if (!sUpdated.equals(settings.getJavaInfoAttrVendorUpdate())) return JFW_E_INVALID_SETTINGS; *ppInfo = aInfo.detach(); } diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 4a093bd441b2..d93075aa6969 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -266,7 +266,7 @@ public: osl_readFile( *pChildOutputRead, pUUID2, 32, &nRead ); printf("read buffer is %s, nRead is %" SAL_PRIdINT64 "\n", pUUID2, nRead ); OUString suUUID2 = OUString::createFromAscii( pUUID2 ); - CPPUNIT_ASSERT_MESSAGE("getGlobalProcessId: got two same ProcessIds.", suUUID2.equalsAsciiL( pUUID1, 32) == sal_False ); + CPPUNIT_ASSERT_MESSAGE("getGlobalProcessId: got two same ProcessIds.", !suUUID2.equalsAsciiL( pUUID1, 32) ); } CPPUNIT_TEST_SUITE(getGlobalProcessId); diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 902cc2a0bc0b..192eeb5ae63b 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -168,7 +168,6 @@ void test::oustring::StringLiterals::checkBuffer() char d[] = "d"; CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUString( d )))); CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUStringBuffer( d )))); - CPPUNIT_ASSERT( !VALID_CONVERSION( buf.insert( 0, d ))); } }} // namespace diff --git a/sal/qa/rtl/uri/rtl_Uri.cxx b/sal/qa/rtl/uri/rtl_Uri.cxx index 49ee686eac64..f91747326746 100644 --- a/sal/qa/rtl/uri/rtl_Uri.cxx +++ b/sal/qa/rtl/uri/rtl_Uri.cxx @@ -103,13 +103,13 @@ namespace Stringtest rtl::OString sStr("h\xE4llo", strlen("h\xE4llo")); rtl::OUString suString = rtl::OStringToOUString(sStr, RTL_TEXTENCODING_ISO_8859_15); - CPPUNIT_ASSERT_MESSAGE("Strings must be equal", suString.equals(suStr_UriDecodeToIuri) == sal_True); + CPPUNIT_ASSERT_MESSAGE("Strings must be equal", suString.equals(suStr_UriDecodeToIuri)); // ustring --> ustring (UTF8) rtl::OUString suStr2 = rtl::Uri::encode(suStr_UriDecodeToIuri, rtl_UriCharClassUnoParamValue, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8); showContent(suStr2); - CPPUNIT_ASSERT_MESSAGE("Strings must be equal", suStr2.equals(suStrUTF8) == sal_True); + CPPUNIT_ASSERT_MESSAGE("Strings must be equal", suStr2.equals(suStrUTF8)); // suStr should be equal to suStr2 } diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index e570895a3fff..46397cbda4c4 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -120,7 +120,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const return pPattern; } -inline int StrCmp( const OUString* pStr1, const OUString* pStr2 ) +inline bool StrCmp( const OUString* pStr1, const OUString* pStr2 ) { return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : false ) : ( pStr2 ? false : true ) ); } diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 5a227c4bf998..2146436e2c15 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -187,7 +187,7 @@ throw ( Exception, RuntimeException ) sal_Int32 indexOfPkgSpec = m_sCtxString.lastIndexOf( pkgSpec ); // if contex string ends with "uno_packages" - if ( indexOfPkgSpec > -1 && ( m_sCtxString.match( pkgSpec, indexOfPkgSpec ) == sal_True ) ) + if ( indexOfPkgSpec > -1 && m_sCtxString.match( pkgSpec, indexOfPkgSpec ) ) { m_bIsPkgMSP = sal_True; } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index ee80d434c3c5..340fa3f7f9c0 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -894,7 +894,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) sal_uInt16 nCurrentLayer = GetLayerTabControl()->GetCurPageId(); const OUString& rName = GetLayerTabControl()->GetPageText(nCurrentLayer); - sal_Bool bDisableIt = !IsLayerModeActive(); + bool bDisableIt = !IsLayerModeActive(); bDisableIt |= (rName == SD_RESSTR(STR_LAYER_LAYOUT)); bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRND)); bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index f031b086c701..fd57c181ef06 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -643,10 +643,10 @@ void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference< switch(rAttrTokenMap.Get(nPrefix,aLocalName)) { case XML_TOK_FONTWEIGHT: - nIsBold = sValue.equals(GetXMLToken(XML_BOLD)); + nIsBold = sal_Int8(sValue.equals(GetXMLToken(XML_BOLD))); break; case XML_TOK_FONTSTYLE: - nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC)); + nIsItalic = sal_Int8(sValue.equals(GetXMLToken(XML_ITALIC))); break; case XML_TOK_FONTSIZE: ::sax::Converter::convertDouble(nFontSize, sValue); diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 72b14b318e59..f2b8e3120152 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -236,7 +236,7 @@ bool SocketPermission::implies( Permission const & perm ) const SAL_THROW(()) return false; if (! demanded.resolveHost()) return false; - return (sal_False != m_ip.equals( demanded.m_ip )); + return m_ip.equals( demanded.m_ip ); } //__________________________________________________________________________________________________ OUString SocketPermission::toString() const SAL_THROW(()) @@ -455,7 +455,7 @@ bool RuntimePermission::implies( Permission const & perm ) const SAL_THROW(()) RuntimePermission const & demanded = static_cast< RuntimePermission const & >( perm ); // check name - return (sal_False != m_name.equals( demanded.m_name )); + return m_name.equals( demanded.m_name ); } //__________________________________________________________________________________________________ OUString RuntimePermission::toString() const SAL_THROW(()) diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 0eb0add9ae54..b96c2d6d5245 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -546,7 +546,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream) } // Einzel-Header - int bOwnPool = sal_True; + bool bOwnPool = true; OUString aExternName; { // Header-Record suchen @@ -730,7 +730,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream) rStream >> pImp->nMajorVer >> pImp->nMinorVer; } sal_uInt32 nAttribSize(0); - int bOwnPool = sal_True; + bool bOwnPool = true; OUString aExternName; if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 ) rStream >> pImp->nLoadingVersion; diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index 757adbb798ca..3740d786ba07 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -128,7 +128,7 @@ struct OUStringLess { bool operator() ( const OUString& r1, const OUString& r2 ) const { - return (r1 < r2) != sal_False; + return r1 < r2; } }; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 6707eb5a35a7..d043f7e7a6ae 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2017,8 +2017,7 @@ bool SwTxtNode::CountWords( SwDocStat& rStat, while ( aScanner.NextWord() ) { - // 1 is len(CH_TXTATR_BREAKWORD) : match returns length of match - if( 1 != aExpandText.match(aBreakWord, aScanner.GetBegin() )) + if( !aExpandText.match(aBreakWord, aScanner.GetBegin() )) { ++nTmpWords; const OUString &rWord = aScanner.GetWord(); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 0f9175fb4f0f..f419d217d974 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1001,7 +1001,7 @@ sal_Int32 SwXCell::getError(void) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; OUString sContent = getString(); - return sContent.equals(SwViewShell::GetShellRes()->aCalc_Error); + return sal_Int32(sContent.equals(SwViewShell::GetShellRes()->aCalc_Error)); } uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno::RuntimeException ) diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index f5cf92841338..d2b0e210888e 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -139,7 +139,7 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SwCharURLPage::SwCharURLPage(Window* pParent, const SfxItemSet& rCoreSet) : SfxTabPage(pParent, "CharURLPage", "modules/swriter/ui/charurlpage.ui", rCoreSet) , pINetItem(0) - , bModified(sal_False) + , bModified(false) { get(m_pURLED, "urled"); @@ -268,14 +268,14 @@ sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet) aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() ); if(m_pVisitedLB->GetSavedValue() != m_pVisitedLB->GetSelectEntryPos()) - bModified = sal_True; + bModified = true; if(m_pNotVisitedLB->GetSavedValue() != m_pNotVisitedLB->GetSelectEntryPos()) - bModified = sal_True; + bModified = true; if(m_pTextED->IsModified()) { - bModified = sal_True; + bModified = true; rSet.Put(SfxStringItem(FN_PARAM_SELECTION, m_pTextED->GetText())); } if(bModified) diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 7adb09ef5e08..958a613f8064 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -269,8 +269,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) bAddSpacingAtPages, bUseOurTabStops, bNoExtLeading, bUseLineSpacing, bAddTableSpacing, bUseObjPos, bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace, - ( sName.equals( DEFAULT_ENTRY ) != sal_False ), - ( sName.equals( USER_ENTRY ) != sal_False ) ); + sName.equals( DEFAULT_ENTRY ), + sName.equals( USER_ENTRY ) ); m_pImpl->m_aList.push_back( aItem ); if ( aItem.m_bIsDefault ) diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx index 4b13eb2b8a3b..c01cc2d16357 100644 --- a/sw/source/ui/inc/chrdlg.hxx +++ b/sw/source/ui/inc/chrdlg.hxx @@ -72,7 +72,7 @@ class SwCharURLPage : public SfxTabPage VclContainer* m_pCharStyleContainer; SvxMacroItem* pINetItem; - sal_Bool bModified; + bool bModified; DECL_LINK(InsertFileHdl, void *); DECL_LINK(EventHdl, void *); diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx index 32987a5b0a4b..ce9566f8c18c 100644 --- a/sw/source/ui/inc/swcont.hxx +++ b/sw/source/ui/inc/swcont.hxx @@ -84,7 +84,7 @@ public: // they're never equal, otherwise they'd fall out of the array return sal_False; } - int operator<(const SwContent& rCont) const + bool operator<(const SwContent& rCont) const { // at first sort by position and then by name return nYPosition != rCont.nYPosition ? diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c76cce8a8650..706b0de750ed 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1233,7 +1233,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) //insert or update the SwAuthorityField... if(pSh) { - sal_Bool bDifferent = sal_False; + bool bDifferent = false; OSL_ENSURE(!m_sFields[AUTH_FIELD_IDENTIFIER].isEmpty() , "No Id is set!"); OSL_ENSURE(!m_sFields[AUTH_FIELD_AUTHORITY_TYPE].isEmpty() , "No authority type is set!"); //check if the entry already exists with different content diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index 78f280ace2e6..34fe2e784a77 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -401,7 +401,7 @@ SvtCompatibilityOptions_Impl::SvtCompatibilityOptions_Impl() lValues[ nPosition++ ] >>= aItem.bExpandWordSpace; m_aOptions.AppendEntry( aItem ); - if ( !bDefaultFound && aItem.sName.equals( COMPATIBILITY_DEFAULT_NAME ) != sal_False ) + if ( !bDefaultFound && aItem.sName.equals( COMPATIBILITY_DEFAULT_NAME ) ) { SvtSysLocale aSysLocale; com::sun::star::lang::Locale aLocale = aSysLocale.GetLanguageTag().getLocale(); @@ -561,7 +561,7 @@ void SvtCompatibilityOptions_Impl::AppendItem( const OUString& _sName, m_aOptions.AppendEntry( aItem ); // default item reset? - if ( _sName.equals( COMPATIBILITY_DEFAULT_NAME ) != sal_False ) + if ( _sName.equals( COMPATIBILITY_DEFAULT_NAME ) ) m_aDefOptions = aItem; SetModified(); diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 8188132bce0c..6305f3314854 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -960,7 +960,7 @@ struct ImpFilterLibCacheEntry PFilterDlgCall mpfnImportDlg; ImpFilterLibCacheEntry( const OUString& rPathname, const OUString& rFiltername ); - int operator==( const OUString& rFiltername ) const { return maFiltername == rFiltername; } + bool operator==( const OUString& rFiltername ) const { return maFiltername == rFiltername; } PFilterCall GetImportFunction(); }; diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 171070d53eab..8cbfeae9a445 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -948,8 +948,8 @@ namespace xmloff { // we have exactly 2 properties where this type class is allowed: OSL_ENSURE( - (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_VALUE)) - || (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_DEFAULT)), + !_rPropValue.Name.equals(PROPERTY_EFFECTIVE_VALUE) + || !_rPropValue.Name.equals(PROPERTY_EFFECTIVE_DEFAULT), "OControlImport::implTranslateValueProperty: invalid property type/name combination!"); // Both properties are allowed to have a double or a string value, |