diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /cppuhelper/source | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/implbase_ex.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propertysetmixin.cxx | 13 | ||||
-rw-r--r-- | cppuhelper/source/servicefactory.cxx | 6 |
3 files changed, 6 insertions, 15 deletions
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 2e5e9523eb3a..1759c4a72af4 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -72,7 +72,7 @@ static inline void checkInterface( Type const & rType ) //-------------------------------------------------------------------------------------------------- static inline bool isXInterface( rtl_uString * pStr ) SAL_THROW(()) { - return (((OUString const *)&pStr)->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XInterface") ) != sal_False); + return (*((OUString const *)&pStr) == "com.sun.star.uno.XInterface"); } //-------------------------------------------------------------------------------------------------- static inline void * makeInterface( sal_IntPtr nOffset, void * that ) SAL_THROW(()) diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index e4cddeb2add4..85a4d80a1d35 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -219,9 +219,7 @@ void Data::initProperties( // works if the specified exceptions are of the exact type, not // of a supertype: for (sal_Int32 j = 0; j < excs.getLength(); ++j) { - if (excs[j]->getName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.beans.UnknownPropertyException"))) + if ( excs[j]->getName() == "com.sun.star.beans.UnknownPropertyException" ) { getUnknown = true; break; @@ -229,15 +227,10 @@ void Data::initProperties( } excs = attr->getSetExceptions(); for (sal_Int32 j = 0; j < excs.getLength(); ++j) { - if (excs[j]->getName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.beans.UnknownPropertyException"))) + if ( excs[j]->getName() == "com.sun.star.beans.UnknownPropertyException" ) { setUnknown = true; - } else if (excs[j]->getName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.beans." - "PropertyVetoException"))) + } else if ( excs[j]->getName() == "com.sun.star.beans.PropertyVetoException" ) { attrAttribs |= css::beans::PropertyAttribute::CONSTRAINED; diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx index ff4f41769b56..db8835f5c9e9 100644 --- a/cppuhelper/source/servicefactory.cxx +++ b/cppuhelper/source/servicefactory.cxx @@ -256,8 +256,7 @@ static void add_access_control_entries( "single-user-id"); entry.value <<= ac_user; context_values.push_back( entry ); - if (! ac_mode.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("single-user") )) + if ( ac_mode != "single-user" ) { throw SecurityException( OUSTR("set UNO_AC=single-user " @@ -267,8 +266,7 @@ static void add_access_control_entries( } else { - if (! ac_mode.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("single-default-user") )) + if ( ac_mode != "single-default-user" ) { throw SecurityException( OUSTR("set UNO_AC=single-default-user " |