From a394d67f374e1b253f288a58113a3cfc8d301743 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 13 Jul 2017 09:55:21 +0200 Subject: use more OUString::operator== comphelper..cui Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: https://gerrit.libreoffice.org/39888 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/container/embeddedobjectcontainer.cxx | 2 +- comphelper/source/misc/sequence.cxx | 4 ++-- comphelper/source/property/property.cxx | 2 +- comphelper/source/property/propertycontainerhelper.cxx | 2 +- comphelper/source/property/propertystatecontainer.cxx | 2 +- comphelper/source/property/propstate.cxx | 2 +- comphelper/source/xml/ofopxmlhelper.cxx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 4fbb49c4a65c..530872c1a714 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -669,7 +669,7 @@ bool EmbeddedObjectContainer::TryToCopyGraphReplacement( EmbeddedObjectContainer { bool bResult = false; - if ( ( &rSrc != this || !aOrigName.equals( aTargetName ) ) && !aOrigName.isEmpty() && !aTargetName.isEmpty() ) + if ( ( &rSrc != this || aOrigName != aTargetName ) && !aOrigName.isEmpty() && !aTargetName.isEmpty() ) { OUString aMediaType; uno::Reference < io::XInputStream > xGrStream = rSrc.GetGraphicStream( aOrigName, &aMediaType ); diff --git a/comphelper/source/misc/sequence.cxx b/comphelper/source/misc/sequence.cxx index 43e7c89a85b5..b0b48d275380 100644 --- a/comphelper/source/misc/sequence.cxx +++ b/comphelper/source/misc/sequence.cxx @@ -32,7 +32,7 @@ css::uno::Sequence findValue(const css::uno::Sequence< OUString >& _r const OUString* pTArray = _rList.getConstArray(); for (sal_Int32 i = 0; i < nLength; ++i, ++pTArray) { - if( pTArray->equals(_rValue) ) + if( *pTArray == _rValue ) { nPos = i; break; @@ -60,7 +60,7 @@ css::uno::Sequence findValue(const css::uno::Sequence< OUString >& _r const OUString* pTArray = _rList.getConstArray(); for (sal_Int32 i = 0; i < nLength; ++i, ++pTArray) { - if( pTArray->equals(_rValue) ) + if( *pTArray == _rValue ) { *pReturn = (sal_Int16)i; ++pReturn; diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index a0083908246f..5e3fd29dc01b 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -151,7 +151,7 @@ void RemoveProperty(Sequence& _rProps, const OUString& _rPropName) if ( pResult != _rProps.end() && pResult->Name == _rPropName ) { - OSL_ENSURE(pResult->Name.equals(_rPropName), "::RemoveProperty Properties not sorted"); + OSL_ENSURE(pResult->Name == _rPropName, "::RemoveProperty Properties not sorted"); removeElementAt(_rProps, pResult - pProperties); } } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index c1729c5576b9..44a1c058d05c 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -56,7 +56,7 @@ namespace bool operator() (const PropertyDescription& x ) const { - return x.aProperty.Name.equals(m_rCompare); + return x.aProperty.Name == m_rCompare; } }; } diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 063cc79e35b4..d06c3f190443 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -119,7 +119,7 @@ namespace comphelper OSL_ENSURE( pAllProperties->Name.compareTo( (pAllProperties + 1)->Name ) < 0, "OPropertyStateContainer::getPropertyStates: all-properties not sorted!" ); #endif - if ( pAllProperties->Name.equals( *pLookup ) ) + if ( pAllProperties->Name == *pLookup ) { *pStates++ = getPropertyState( *pLookup ); ++pLookup; diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index 366b881cf1c6..b391b4af3f74 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -129,7 +129,7 @@ namespace comphelper for (sal_Int32 i=0, j=0; iName.equals(*pNames)) + if (pProps->Name == *pNames) { *pValues = getPropertyState(*pNames); ++pValues; diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx index cc8067dc9901..58e4a0fbc7a2 100644 --- a/comphelper/source/xml/ofopxmlhelper.cxx +++ b/comphelper/source/xml/ofopxmlhelper.cxx @@ -441,7 +441,7 @@ void SAL_CALL OFOPXMLHelper_Impl::endElement( const OUString& aName ) if ( nLength <= 0 ) throw css::xml::sax::SAXException(); // TODO: no other end elements expected! - if ( !m_aElementsSeq[nLength-1].equals( aName ) ) + if ( m_aElementsSeq[nLength-1] != aName ) throw css::xml::sax::SAXException(); // TODO: unexpected element ended m_aElementsSeq.resize( nLength - 1 ); -- cgit