diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 12:44:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-14 09:10:59 +0200 |
commit | d8e5a0db64fa022b54bddc42b1b1db0c1ddfe2d1 (patch) | |
tree | a35f8e42f3caa97132e2dc38042c393ef8fb59f4 /sc/source/ui/vba | |
parent | 3f893fe88fa60faeb0335f1708f4f2d4b8838191 (diff) |
use more OUString::operator== in sc
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db
Reviewed-on: https://gerrit.libreoffice.org/39900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r-- | sc/source/ui/vba/vbachartobject.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaformatconditions.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaoleobjects.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbawindow.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworksheet.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworksheets.cxx | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 0cf8f2dd7f7c..617e61128e8f 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -62,7 +62,7 @@ ScVbaChartObject::setShape() uno::Reference< beans::XPropertySet > xShapePropertySet(xShape, uno::UNO_QUERY_THROW ); OUString sName; xShapePropertySet->getPropertyValue(PERSIST_NAME ) >>=sName; - if ( sName.equals(sPersistName)) + if ( sName == sPersistName ) { xNamedShape.set( xShape, uno::UNO_QUERY_THROW ); return xShape; diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 3e326f087c1c..566ebbe68c8a 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -190,7 +190,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons for (sal_Int32 i = mxSheetConditionalEntries->getCount()-1; i >= 0; i--) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW ); - if (xSheetConditionalEntry->getStyleName().equals(sStyleName)) + if (xSheetConditionalEntry->getStyleName() == sStyleName) { xFormatCondition = new ScVbaFormatCondition(uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, xSheetConditionalEntry, xStyle, this, mxParentRangePropertySet); notifyRange(); @@ -253,7 +253,7 @@ ScVbaFormatConditions::removeFormatCondition( const OUString& _sStyleName, bool for (sal_Int32 i = 0; i < nElems; i++) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW ); - if (_sStyleName.equals(xSheetConditionalEntry->getStyleName())) + if (_sStyleName == xSheetConditionalEntry->getStyleName()) { mxSheetConditionalEntries->removeByIndex(i); if (_bRemoveStyle) diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 6b700cc33f6f..c6cce4902c1d 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -147,7 +147,7 @@ ScVbaOLEObjects::getItemByStringIndex( const OUString& sIndex ) uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY_THROW ); uno::Reference< awt::XControlModel > xControlModel( xControlShape->getControl() ); uno::Reference< container::XNamed > xNamed( xControlModel, uno::UNO_QUERY_THROW ); - if( sIndex.equals( xNamed->getName() )) + if( sIndex == xNamed->getName() ) { return createCollectionObject( aUnoObj ); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index b4896e3f9802..5aae79fd6889 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3314,7 +3314,7 @@ const OUString& sPropName ) sal_Int32 count=0; for ( ; count < nItems; ++count, ++pProp ) - if ( pProp->Name.equals( sPropName ) ) + if ( pProp->Name == sPropName ) return count; if ( count == nItems ) throw uno::RuntimeException("Range::Sort unknown sort property" ); diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 5586c9347daa..5f6629597606 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -319,7 +319,7 @@ ScVbaWindow::getCaption() // name == title + extension ( .csv, ,odt, .xls ) // etc. then also use the name - if ( !sTitle.equals( sName ) ) + if ( sTitle != sName ) { // starts with title if ( sName.startsWith( sTitle ) ) diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 05098b3ffcfd..7ffddf9a4f99 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -996,14 +996,14 @@ ScVbaWorksheet::getControlShape( const OUString& sName ) uno::Any aUnoObj = xIndexAccess->getByIndex( index ); // It seems there are some drawing objects that can not query into Control shapes? uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY ); - if( xControlShape.is() ) - { - uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW ); - if( sName.equals( xNamed->getName() )) + if( xControlShape.is() ) { - return aUnoObj; + uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW ); + if( sName == xNamed->getName() ) + { + return aUnoObj; + } } - } } return uno::Any(); } diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index ac4ec9424269..e6b356639144 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -118,7 +118,7 @@ public: for ( ; cachePos != it_end; ++cachePos ) { uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW ); - if ( aName.equals( xName->getName() ) ) + if ( aName == xName->getName() ) break; } return ( cachePos != it_end ); |