diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 15:05:52 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 15:07:41 +0200 |
commit | 743f22045c4ec08c46c259fc0ba240194a391457 (patch) | |
tree | faed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /stoc/source | |
parent | 0c6ebe5d225d6a655f078977455cec6d0a3afa6e (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:
find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 8 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 8 | ||||
-rw-r--r-- | stoc/source/security/access_controller.cxx | 10 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 4 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 10 | ||||
-rw-r--r-- | stoc/source/tdmanager/tdmgr.cxx | 30 |
6 files changed, 35 insertions, 35 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 1b57eb7de563..48fa447bdef7 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2365,7 +2365,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else if( rxMethod_i->getDeclaringClass()->equals( mxAggregationClass ) ) { - if( aMethName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setDelegator")) ) + if ( aMethName == "setDelegator" ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; @@ -2398,7 +2398,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // Ist es eine get-Methode? aStartStr = aMethName.copy( 0, 3 ); - if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("get")) ) + if ( aStartStr == "get" ) { // Namen der potentiellen Property aPropName = aMethName.copy( 3 ); @@ -2519,7 +2519,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } // Ist es eine addListener-Methode? - else if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("add")) ) + else if ( aStartStr == "add" ) { OUString aListenerStr( RTL_CONSTASCII_USTRINGPARAM("Listener" ) ); @@ -2608,7 +2608,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( // Ist es eine set-Methode ohne zugehoerige get-Methode? aStartStr = aMethName.copy( 0, 3 ); - if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) + if ( aStartStr == "set" ) { // Namen der potentiellen Property aPropName = aMethName.copy( 3 ); diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 25d0000fea0d..c73d2fae4cd4 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1128,7 +1128,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( rtl::OUString aPropertyName2; rtl::OUString aPropertyValue; bool bSecurityChanged = false; - if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"))) + if ( aAccessor == "ooInetProxyType" ) { // Proxy none, manually sal_Int32 value = 0; @@ -1194,7 +1194,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( rEvent.Element >>= aPropertyValue; aPropertyValue = aPropertyValue.replace(';', '|'); } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NetAccess"))) + else if ( aAccessor == "NetAccess" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "appletviewer.security.mode")); @@ -1219,7 +1219,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( return; bSecurityChanged = true; } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Security"))) + else if ( aAccessor == "Security" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.security.disableSecurity")); @@ -1347,7 +1347,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); rtl::OUString sName( jcharName); jboolean bIsSandbox; - if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.lib.sandbox.SandboxSecurity"))) + if ( sName == "com.sun.star.lib.sandbox.SandboxSecurity" ) bIsSandbox= JNI_TRUE; else bIsSandbox= JNI_FALSE; diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index f2b029bcdaa4..00dc8edde9af 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -485,19 +485,19 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp OUString mode; if (m_xComponentContext->getValueByName( OUSTR("/services/" SERVICE_NAME "/mode") ) >>= mode) { - if (mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("off") )) + if ( mode == "off" ) { m_mode = OFF; } - else if (mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("on") )) + else if ( mode == "on" ) { m_mode = ON; } - else if (mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dynamic-only") )) + else if ( mode == "dynamic-only" ) { m_mode = DYNAMIC_ONLY; } - else if (mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("single-user") )) + else if ( mode == "single-user" ) { m_xComponentContext->getValueByName( OUSTR("/services/" SERVICE_NAME "/single-user-id") ) >>= m_singleUserId; @@ -510,7 +510,7 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp } m_mode = SINGLE_USER; } - else if (mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("single-default-user") )) + else if ( mode == "single-default-user" ) { m_mode = SINGLE_DEFAULT_USER; } diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index d8327344d4ef..236294664b8b 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -336,14 +336,14 @@ FilePermission::FilePermission( { if (! m_allFiles) { - if (m_url.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*") )) + if ( m_url == "*" ) { OUStringBuffer buf( 64 ); buf.append( getWorkingDir() ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("/*") ); m_url = buf.makeStringAndClear(); } - else if (m_url.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("-") )) + else if ( m_url == "-" ) { OUStringBuffer buf( 64 ); buf.append( getWorkingDir() ); diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 1671321cac23..8cc4fbac3d61 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -729,7 +729,7 @@ void SAL_CALL OServiceManagerWrapper::setPropertyValue( throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, RuntimeException) { - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DefaultContext") )) + if ( PropertyName == "DefaultContext" ) { Reference< XComponentContext > xContext; if (aValue >>= xContext) @@ -754,7 +754,7 @@ Any SAL_CALL OServiceManagerWrapper::getPropertyValue( const OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, RuntimeException) { - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DefaultContext") )) + if ( PropertyName == "DefaultContext" ) { MutexGuard aGuard( m_mutex ); if( m_xContext.is() ) @@ -1041,7 +1041,7 @@ void OServiceManager::setPropertyValue( throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { check_undisposed(); - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DefaultContext") )) + if ( PropertyName == "DefaultContext" ) { Reference< XComponentContext > xContext; if (aValue >>= xContext) @@ -1068,7 +1068,7 @@ Any OServiceManager::getPropertyValue(const OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { check_undisposed(); - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DefaultContext") )) + if ( PropertyName == "DefaultContext" ) { MutexGuard aGuard( m_mutex ); if( m_xContext.is() ) @@ -1939,7 +1939,7 @@ Any ORegistryServiceManager::getPropertyValue(const OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { check_undisposed(); - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Registry") )) + if ( PropertyName == "Registry" ) { MutexGuard aGuard( m_mutex ); if( m_xRegistry.is() ) diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index e8a8256395c3..58a1784e5f09 100644 --- a/stoc/source/tdmanager/tdmgr.cxx +++ b/stoc/source/tdmanager/tdmgr.cxx @@ -788,35 +788,35 @@ inline Any ManagerImpl::getSimpleType( const OUString & rName ) { Any aRet; - if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("string") )) + if ( rName == "string" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_STRING, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("long") )) + else if ( rName == "long" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_LONG, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("unsigned long") )) + else if ( rName == "unsigned long" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_UNSIGNED_LONG, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("boolean") )) + else if ( rName == "boolean" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_BOOLEAN, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("char") )) + else if ( rName == "char" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_CHAR, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("byte") )) + else if ( rName == "byte" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_BYTE, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("short") )) + else if ( rName == "short" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_SHORT, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("unsigned short") )) + else if ( rName == "unsigned short" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_UNSIGNED_SHORT, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hyper") )) + else if ( rName == "hyper" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_HYPER, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("unsigned hyper") )) + else if ( rName == "unsigned hyper" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_UNSIGNED_HYPER, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("float") )) + else if ( rName == "float" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_FLOAT, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("double") )) + else if ( rName == "double" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_DOUBLE, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("any") )) + else if ( rName == "any" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_ANY, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("void") )) + else if ( rName == "void" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_VOID, rName ) ); - else if (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("type") )) + else if ( rName == "type" ) aRet <<= Reference< XTypeDescription >( new SimpleTypeDescriptionImpl( TypeClass_TYPE, rName ) ); return aRet; |