diff options
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 4 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 4 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 25 | ||||
-rw-r--r-- | stoc/source/registry_tdprovider/tdservice.cxx | 3 | ||||
-rw-r--r-- | stoc/source/security/access_controller.cxx | 3 | ||||
-rw-r--r-- | stoc/source/security/file_policy.cxx | 18 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 6 | ||||
-rw-r--r-- | stoc/test/testcorefl.cxx | 6 | ||||
-rw-r--r-- | stoc/test/testloader.cxx | 2 | ||||
-rw-r--r-- | stoc/test/testproxyfac.cxx | 3 | ||||
-rw-r--r-- | stoc/test/testregistry.cxx | 7 |
11 files changed, 31 insertions, 50 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 48fa447bdef7..fe987071202e 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2356,7 +2356,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( } else { - if( !aMethName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("queryInterface")) ) + if( aMethName != "queryInterface" ) { rMethodConcept_i |= MethodConcept::DANGEROUS; continue; @@ -2471,7 +2471,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect( OUString aMethName2 = rxMethod_k->getName(); OUString aStartStr2 = aMethName2.copy( 0, 3 ); // ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!! - if( !( aStartStr2.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) ) + if( aStartStr2 != "set" ) continue; // Ist es denn der gleiche Name? diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index d49a8e7e90ea..337bdb1023c9 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -352,9 +352,7 @@ static void handleInvokExc( uno_Any * pDest, uno_Any * pSource ) OUString const & name = *reinterpret_cast< OUString const * >( &pSource->pType->pTypeName ); - if (name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.reflection.InvocationTargetException") )) + if ( name == "com.sun.star.reflection.InvocationTargetException" ) { // unwrap invocation target exception uno_Any * target_exc = diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index c73d2fae4cd4..a1242463a8b8 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -643,9 +643,7 @@ JavaVirtualMachine::initialize(css::uno::Sequence< css::uno::Any > const & "bad call to initialize")), static_cast< cppu::OWeakObject * >(this)); css::beans::NamedValue val; - if (rArguments.getLength() == 1 && (rArguments[0] >>= val) - && val.Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "UnoVirtualMachine"))) + if (rArguments.getLength() == 1 && (rArguments[0] >>= val) && val.Name == "UnoVirtualMachine" ) { OSL_ENSURE( sizeof (sal_Int64) >= sizeof (jvmaccess::UnoVirtualMachine *), @@ -1136,15 +1134,13 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( setINetSettingsInVM(value != 0); return; } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetHTTPProxyName"))) + else if ( aAccessor == "ooInetHTTPProxyName" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "http.proxyHost")); rEvent.Element >>= aPropertyValue; } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetHTTPProxyPort"))) + else if ( aAccessor == "ooInetHTTPProxyPort" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort")); @@ -1152,15 +1148,13 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetHTTPSProxyName"))) + else if ( aAccessor == "ooInetHTTPSProxyName" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "https.proxyHost")); rEvent.Element >>= aPropertyValue; } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetHTTPSProxyPort"))) + else if ( aAccessor == "ooInetHTTPSProxyPort" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("https.proxyPort")); @@ -1168,15 +1162,13 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetFTPProxyName"))) + else if ( aAccessor == "ooInetFTPProxyName" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ftp.proxyHost")); rEvent.Element >>= aPropertyValue; } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetFTPProxyPort"))) + else if ( aAccessor == "ooInetFTPProxyPort" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ftp.proxyPort")); @@ -1184,8 +1176,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( rEvent.Element >>= n; aPropertyValue = rtl::OUString::valueOf(n); } - else if (aAccessor.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "ooInetNoProxy"))) + else if ( aAccessor == "ooInetNoProxy" ) { aPropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "http.nonProxyHosts")); diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx index ed2a254de75f..5b39d9ffe00a 100644 --- a/stoc/source/registry_tdprovider/tdservice.cxx +++ b/stoc/source/registry_tdprovider/tdservice.cxx @@ -349,8 +349,7 @@ ServiceTypeDescriptionImpl::getConstructors() throw (RuntimeException) { for (sal_uInt16 i = 0; i < ctorCount; ++i) { rtl::OUString name(reader.getMethodName(i)); if (reader.getMethodFlags(i) != RT_MODE_TWOWAY - || (!reader.getMethodReturnTypeName(i).equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("void"))) + || (reader.getMethodReturnTypeName(i) != "void") || (name.isEmpty() && (ctorCount != 1 || reader.getMethodParameterCount(i) != 0 || reader.getMethodExceptionCount(i) != 0))) diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 00dc8edde9af..15e58ab8475f 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -364,8 +364,7 @@ static inline Reference< security::XAccessControlContext > getDynamicRestriction // avoid ref-counting OUString const & typeName = *reinterpret_cast< OUString const * >( &acc.pType->pTypeName ); - if (typeName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.security.XAccessControlContext") )) + if ( typeName == "com.sun.star.security.XAccessControlContext" ) { return Reference< security::XAccessControlContext >( *reinterpret_cast< security::XAccessControlContext ** const >( acc.pData ) ); diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index 1a48ce1d921c..ce4e3ac58e0a 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -467,46 +467,46 @@ void FilePolicy::refresh() OUString token( reader.getToken() ); while (!token.isEmpty()) { - if (!token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_grant))) + if ( token != s_grant ) reader.error( OUSTR("expected >grant< token!") ); OUString userId; token = reader.assureToken(); - if (token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_user))) // next token is user-id + if ( token == s_user ) // next token is user-id { userId = reader.assureQuotedToken(); token = reader.assureToken(); } - if (!token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_openBrace))) + if ( token != s_openBrace ) reader.error( OUSTR("expected opening brace >{<!") ); token = reader.assureToken(); // permissions list - while (!token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_closingBrace))) + while ( token != s_closingBrace ) { - if (!token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_permission))) + if ( token != s_permission ) reader.error( OUSTR("expected >permission< or closing brace >}<!") ); token = reader.assureToken(); // permission type Any perm; - if (token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_filePermission))) // FilePermission + if ( token == s_filePermission ) // FilePermission { OUString url( reader.assureQuotedToken() ); reader.assureToken( ',' ); OUString actions( reader.assureQuotedToken() ); perm <<= io::FilePermission( url, actions ); } - else if (token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_socketPermission))) // SocketPermission + else if ( token == s_socketPermission ) // SocketPermission { OUString host( reader.assureQuotedToken() ); reader.assureToken( ',' ); OUString actions( reader.assureQuotedToken() ); perm <<= connection::SocketPermission( host, actions ); } - else if (token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_runtimePermission))) // RuntimePermission + else if ( token == s_runtimePermission ) // RuntimePermission { OUString name( reader.assureQuotedToken() ); perm <<= security::RuntimePermission( name ); } - else if (token.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_allPermission))) // AllPermission + else if ( token == s_allPermission ) // AllPermission { perm <<= security::AllPermission(); } diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index d98cf3e33150..6f8c0887774f 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -775,14 +775,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina case TypeClass_STRING: { const OUString & aStr = *(const OUString *)rVal.getValue(); - if (aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("0") ) || - aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) )) + if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) )) { sal_Bool bFalse = sal_False; aRet.setValue( &bFalse, getCppuBooleanType() ); } - else if (aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("1") ) || - aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) )) + else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) )) { sal_Bool bTrue = sal_True; aRet.setValue( &bTrue, getCppuBooleanType() ); diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index 505fceb9bd35..416929364989 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -242,10 +242,10 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) xRefl->forName( OUString(RTL_CONSTASCII_USTRINGPARAM("[]ModuleA.StructA")) )->createObject(aAny); - TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("[]ModuleA.StructA")), "test_RegCoreReflection(): error 54"); + TEST_ENSHURE( aAny.getValueTypeName() == "[]ModuleA.StructA", "test_RegCoreReflection(): error 54" ); xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("[][]ModuleA.StructA")))->createObject(aAny); - TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("[][]ModuleA.StructA") ), "test_RegCoreReflection(): error 56"); + TEST_ENSHURE( aAny.getValueTypeName() == "[][]ModuleA.StructA", "test_RegCoreReflection(): error 56" ); // xClass = xRefl->forName(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.XIntroTest") )); @@ -254,7 +254,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) // TEST_ENSHURE(xClass->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")))->getReturnType()->getComponentType()->getName() == OUString(RTL_CONSTASCII_USTRINGPARAM("string")), "test_RegCoreReflection(): error 60"); // xClass->getMethod(OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")))->getReturnType()->createObject(aAny); -// TEST_ENSHURE(aAny.getValueTypeName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("[]string") ), "test_RegCoreReflection(): error 61"); +// TEST_ENSHURE( aAny.getValueTypeName() == "[]string", "test_RegCoreReflection(): error 61" ); TEST_ENSHURE(xRefl->forName(OUString(RTL_CONSTASCII_USTRINGPARAM("[][][]unsigned long")))->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62"); diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx index ba0897d629a9..490ac5b906c8 100644 --- a/stoc/test/testloader.cxx +++ b/stoc/test/testloader.cxx @@ -118,7 +118,7 @@ SAL_IMPLEMENT_MAIN() TEST_ENSHURE( xServInfo.is(), "testloader error4"); - TEST_ENSHURE( xServInfo->getImplementationName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.stoc.DLLComponentLoader") ), "testloader error5"); + TEST_ENSHURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.DLLComponentLoader", "testloader error5"); TEST_ENSHURE( xServInfo->supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")) ), "testloader error6"); TEST_ENSHURE( xServInfo->getSupportedServiceNames().getLength() == 1, "testloader error7"); diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx index 40e8c60d97f4..e92fabecb130 100644 --- a/stoc/test/testproxyfac.cxx +++ b/stoc/test/testproxyfac.cxx @@ -227,8 +227,7 @@ static void test_proxyfac_( } catch (const lang::DisposedException & exc) { - if (! exc.Message.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("my test exception") )) + if ( exc.Message != "my test exception" ) throw; } } diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index 5eddcf6aa7e3..df0cc7dec556 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -206,7 +206,7 @@ void test_SimpleRegistry( TEST_ENSHURE( xServInfo.is(), "test_SimpleRegistry error2"); - TEST_ENSHURE( xServInfo->getImplementationName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.stoc.SimpleRegistry") ), "test_SimpleRegistry error3"); + TEST_ENSHURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.SimpleRegistry", "test_SimpleRegistry error3"); TEST_ENSHURE( xServInfo->supportsService(OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))), "test_SimpleRegistry error4"); TEST_ENSHURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_SimpleRegistry error5"); xServInfo.clear(); @@ -356,10 +356,7 @@ void test_SimpleRegistry( xRootKey = xReg->getRootKey(); xKey = xRootKey->openKey( OUString( RTL_CONSTASCII_USTRINGPARAM("LinkTest") ) ); - TEST_ENSHURE( - xKey.is() && xKey->isValid() && - xKey->getKeyName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("/ThirdKey/FirstSubKey/WithSubSubKey") ), - "test_SimpleRegistry error 1213" ); + TEST_ENSHURE( xKey.is() && xKey->isValid() && xKey->getKeyName() == "/ThirdKey/FirstSubKey/WithSubSubKey", "test_SimpleRegistry error 1213" ); xKey->closeKey(); TEST_ENSHURE( xRootKey->getKeyType( OUString( RTL_CONSTASCII_USTRINGPARAM("LinkTest") ) ) == |