diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-14 09:25:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-14 10:19:27 +0200 |
commit | 6af025501db1f25397bdbf1fdd6b71da4debcac4 (patch) | |
tree | 19f627e7ed7da45efa4c5bbf6bad8ed148fd6551 /stoc | |
parent | 8e39ef66928a3e37c618d3a70a631e71266db274 (diff) |
use more OUString::operator== in sfx2..svtools
Change-Id: I859b77319f551eabd19dae54bd69c212221112a8
Reviewed-on: https://gerrit.libreoffice.org/39938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/implementationregistration/implreg.cxx | 8 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 12 | ||||
-rw-r--r-- | stoc/source/security/access_controller.cxx | 2 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 6 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index d6d2dd457b96..4e0e7a5697dd 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -778,7 +778,7 @@ void delete_all_singleton_entries( ::std::list< OUString >::const_iterator const iEnd( impl_names.end() ); for ( ; iPos != iEnd; ++iPos ) { - if (iPos->equals( registered_implname )) + if (*iPos == registered_implname) { registered_implnames[ n ] = p[ nNewLength -1 ]; --nNewLength; @@ -891,7 +891,7 @@ bool is_supported_service( OUString const & service_name, Reference< reflection::XServiceTypeDescription > const & xService_td ) { - if (xService_td->getName().equals( service_name )) + if (xService_td->getName() == service_name) return true; Sequence< Reference< reflection::XServiceTypeDescription > > seq( xService_td->getMandatoryServices() ); @@ -934,7 +934,7 @@ void insert_singletons( try { OUString existing_name( xKey2->getStringValue() ); - if (! existing_name.equals( service_name )) + if ( existing_name != service_name ) { Reference< container::XHierarchicalNameAccess > xTDMgr; OUString the_tdmgr = @@ -1003,7 +1003,7 @@ void insert_singletons( OUString const * pImplnames = implnames.getConstArray(); while (nPos_implnames--) { - if (implname.equals( pImplnames[ nPos_implnames ] )) + if (implname == pImplnames[ nPos_implnames ]) break; } if (nPos_implnames < 0) diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index a4e9efe66e59..0a6105b013cd 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1417,42 +1417,42 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) OUString propName= prop.copy( 0, index); OUString propValue= prop.copy( index + 1); - if( propName.equals( sFtpProxyHost)) + if( propName == sFtpProxyHost) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr); } - else if( propName.equals( sFtpProxyPort)) + else if( propName == sFtpProxyPort) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr); } - else if( propName.equals( sFtpNonProxyHosts)) + else if( propName == sFtpNonProxyHosts) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr); } - else if( propName.equals( sHttpProxyHost)) + else if( propName == sHttpProxyHost) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyHost, jsVal); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr); } - else if( propName.equals( sHttpProxyPort)) + else if( propName == sHttpProxyPort) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyPort, jsVal); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", nullptr); } - else if( propName.equals( sHttpNonProxyHosts)) + else if( propName == sHttpNonProxyHosts) { jstring jsVal= pJNIEnv->NewString( reinterpret_cast<jchar const *>(propValue.getStr()), propValue.getLength()); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", nullptr); diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 998c8b16ed47..65771de2bd99 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -505,7 +505,7 @@ void AccessController::checkAndClearPostPoned() OSL_ASSERT( m_singleUser_init ); for (const auto & p : vec) { - OSL_ASSERT( m_singleUserId.equals( p.first ) ); + OSL_ASSERT( m_singleUserId == p.first ); m_singleUserPermissions.checkPermission( p.second ); } break; diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index e332198d194b..2854cf1319d1 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -228,7 +228,7 @@ bool SocketPermission::implies( Permission const & perm ) const return false; if (! demanded.resolveHost()) return false; - return m_ip.equals( demanded.m_ip ); + return m_ip == demanded.m_ip; } OUString SocketPermission::toString() const @@ -365,7 +365,7 @@ bool FilePermission::implies( Permission const & perm ) const if (m_url.equalsIgnoreAsciiCase( demanded.m_url )) return true; #else - if (m_url.equals( demanded.m_url )) + if (m_url == demanded.m_url ) return true; #endif if (m_url.getLength() > demanded.m_url.getLength()) @@ -438,7 +438,7 @@ bool RuntimePermission::implies( Permission const & perm ) const RuntimePermission const & demanded = static_cast< RuntimePermission const & >( perm ); // check name - return m_name.equals( demanded.m_name ); + return m_name == demanded.m_name; } OUString RuntimePermission::toString() const diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index eb5685a29b76..85bbce7407a8 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -214,7 +214,7 @@ beans::Property PropertySetInfo_Impl::getPropertyByName( OUString const & name ) beans::Property const * p = m_properties.getConstArray(); for ( sal_Int32 nPos = m_properties.getLength(); nPos--; ) { - if (p[ nPos ].Name.equals( name )) + if (p[ nPos ].Name == name) return p[ nPos ]; } throw beans::UnknownPropertyException( @@ -226,7 +226,7 @@ sal_Bool PropertySetInfo_Impl::hasPropertyByName( OUString const & name ) beans::Property const * p = m_properties.getConstArray(); for ( sal_Int32 nPos = m_properties.getLength(); nPos--; ) { - if (p[ nPos ].Name.equals( name )) + if (p[ nPos ].Name == name) return true; } return false; |