diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 09:53:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-13 11:02:55 +0200 |
commit | 8a75aa52ef572655db261679da431aff84f52348 (patch) | |
tree | c1d6133b1942c756d9160c51c2f95abfbaab5780 /chart2/source/controller | |
parent | 46ba298934d1765365018349f26f8a732cefba63 (diff) |
use more OUString::operator== in a*..chart2
Change-Id: Ifb5608abebffd9687ed55e8c74f9be54a749111d
Reviewed-on: https://gerrit.libreoffice.org/39887
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller')
9 files changed, 25 insertions, 25 deletions
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 0e54a0096a65..ecdffda68ad3 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -178,7 +178,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName xPropSet->setPropertyValue( "Color", rValue ); else if( rPropertyName == "LineTransparence" ) xPropSet->setPropertyValue( "Transparency", rValue ); - else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) ) + else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() ) m_aWrappedLineJointProperty.setPropertyValue( rValue, xPropSet ); else xPropSet->setPropertyValue( rPropertyName, rValue ); @@ -221,7 +221,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty aRet = xPropSet->getPropertyValue( "Color" ); else if( rPropertyName == "LineTransparence" ) aRet = xPropSet->getPropertyValue( "Transparency" ); - else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) ) + else if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() ) aRet = m_aWrappedLineJointProperty.getPropertyValue( xPropSet ); else aRet = xPropSet->getPropertyValue( rPropertyName ); @@ -301,7 +301,7 @@ void SAL_CALL MinMaxLineWrapper::firePropertiesChangeEvent( //XPropertyState beans::PropertyState SAL_CALL MinMaxLineWrapper::getPropertyState( const OUString& rPropertyName ) { - if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) ) + if( rPropertyName == m_aWrappedLineJointProperty.getOuterName() ) return beans::PropertyState_DEFAULT_VALUE; uno::Any aDefault( this->getPropertyDefault( rPropertyName ) ); diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index bedd47a98b2d..4d9c53c9c73f 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -110,7 +110,7 @@ bool lcl_SequenceOfSeriesIsShared( Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW ); Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeq( xSource->getDataSequences()); for( sal_Int32 i=0; i<aLSeq.getLength(); ++i ) - if (aLSeq[i].is() && DataSeriesHelper::getRole(aLSeq[i]).equals(aValuesRole)) + if (aLSeq[i].is() && DataSeriesHelper::getRole(aLSeq[i]) == aValuesRole) { // getValues().is(), because lcl_getRole checked that already bResult = (aValuesRep == aLSeq[i]->getValues()->getSourceRangeRepresentation()); @@ -196,7 +196,7 @@ struct lcl_RolesOfLSeqMatch bool operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq ) { - return DataSeriesHelper::getRole(xLSeq).equals(m_aRole); + return DataSeriesHelper::getRole(xLSeq) == m_aRole; } private: OUString m_aRole; @@ -868,7 +868,7 @@ void DataBrowserModel::updateFromModel() sal_Int32 nSequenceNumberFormatKey = nYAxisNumberFormatKey; OUString aRole = DataSeriesHelper::getRole(aLSeqs[nSeqIdx]); - if( aRole.equals( aRoleForDataLabelNumberFormat ) ) + if( aRole == aRoleForDataLabelNumberFormat ) { nSequenceNumberFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ), xSeries, -1, xDiagram ); diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index a9445be5d90d..ffceca3ccc00 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -220,7 +220,7 @@ struct lcl_RolesWithRangeAppend : public tContainerType::value_type( aRole, xSeq->getSourceRangeRepresentation())); // label - if( aRole.equals( m_aRoleForLabelSeq )) + if( aRole == m_aRoleForLabelSeq ) { Reference< data::XDataSequence > xLabelSeq( xVal->getLabel()); if( xLabelSeq.is()) @@ -317,12 +317,12 @@ Reference< XDataSeries > lcl_CreateNewSeries( for(nI=0; nI<aRoles.getLength(); ++nI) { - if( aRoles[nI].equals( lcl_aLabelRole )) + if( aRoles[nI] == lcl_aLabelRole ) continue; Reference< data::XDataSequence > xSeq( ::chart::DataSourceHelper::createCachedDataSequence() ); lcl_SetSequenceRole( xSeq, aRoles[nI] ); // assert that aRoleOfSeqForSeriesLabel is part of the mandatory roles - if( aRoles[nI].equals( aRoleOfSeqForSeriesLabel )) + if( aRoles[nI] == aRoleOfSeqForSeriesLabel ) { Reference< data::XDataSequence > xLabel( ::chart::DataSourceHelper::createCachedDataSequence( aLabel )); lcl_SetSequenceRole( xLabel, lcl_aLabelRole ); @@ -334,7 +334,7 @@ Reference< XDataSeries > lcl_CreateNewSeries( for(nI=0; nI<aOptRoles.getLength(); ++nI) { - if( aOptRoles[nI].equals( lcl_aLabelRole )) + if( aOptRoles[nI] == lcl_aLabelRole ) continue; Reference< data::XDataSequence > xSeq( ::chart::DataSourceHelper::createCachedDataSequence()); lcl_SetSequenceRole( xSeq, aOptRoles[nI] ); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index deac1fd39d99..b06a5fe3bdea 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -258,7 +258,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls() } // only if range is valid - if( m_aLastValidRangeString.equals(m_pED_Range->GetText())) + if( m_aLastValidRangeString == m_pED_Range->GetText()) { m_rDialogModel.setTemplate( m_xCurrentChartTypeTemplate ); aArguments.realloc( aArguments.getLength() + 1 ); diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 6b516b9ced9e..531afc142b81 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -352,14 +352,14 @@ bool DataPointItemConverter::ApplySpecialItem( if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY); - if( !aOldValue.equals(aNewValue) || + if( aOldValue != aNewValue || DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelSeparator" , uno::Any( aOldValue ) ) ) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "LabelSeparator" , uno::Any( aNewValue ) ); bChanged = true; } } - else if( !aOldValue.equals(aNewValue) ) + else if( aOldValue != aNewValue ) { GetPropertySet()->setPropertyValue( "LabelSeparator" , uno::Any( aNewValue )); bChanged = true; diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index 9beb4eb5f072..afcd6c2a5d97 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -312,14 +312,14 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte if (mbDataSeries) { Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY); - if (!aOldValue.equals(aNewValue) || + if (aOldValue != aNewValue || DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelSeparator", uno::Any(aOldValue))) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, "LabelSeparator", uno::Any(aNewValue)); bChanged = true; } } - else if (!aOldValue.equals(aNewValue)) + else if (aOldValue != aNewValue) { GetPropertySet()->setPropertyValue("LabelSeparator", uno::Any(aNewValue)); bChanged = true; diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index b20645327821..83e0bb7d76a8 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -692,7 +692,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) else { OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) ); - if( aDragMethodServiceName.equals( ObjectIdentifier::getPieSegmentDragMethodServiceName() ) ) + if( aDragMethodServiceName == ObjectIdentifier::getPieSegmentDragMethodServiceName() ) pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel() ); } pDrawViewWrapper->SdrView::BegDragObj(aMPos, nullptr, pHitSelectionHdl, nDrgLog, pDragMethod); @@ -1345,8 +1345,8 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) // pie segment dragging // note: could also be done for data series if( eObjectType == OBJECTTYPE_DATA_POINT && - ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ).equals( - ObjectIdentifier::getPieSegmentDragMethodServiceName())) + ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) == + ObjectIdentifier::getPieSegmentDragMethodServiceName()) { bool bDrag = false; bool bDragInside = false; @@ -1956,7 +1956,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if( m_pDrawViewWrapper->IsTextEdit() ) { - if( aHitObjectCID.equals(m_aSelection.getSelectedCID()) ) + if( aHitObjectCID == m_aSelection.getSelectedCID() ) { pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); return; diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 94d6948ad12d..d77b2d6a2b7c 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -78,7 +78,7 @@ uno::Reference< drawing::XShape > Selection::getSelectedAdditionalShape() bool Selection::setSelection( const OUString& rCID ) { - if ( !rCID.equals( m_aSelectedOID.getObjectCID() ) ) + if ( rCID != m_aSelectedOID.getObjectCID() ) { m_aSelectedOID = ObjectIdentifier( rCID ); return true; @@ -252,7 +252,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* //check whether the diagram was hit but not selected (e.g. because it has no filling): OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ); OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model - bool bBackGroundHit = m_aSelectedOID.getObjectCID().equals( aPageCID ) || m_aSelectedOID.getObjectCID().equals( aWallCID ) || !m_aSelectedOID.isAutoGeneratedObject(); + bool bBackGroundHit = m_aSelectedOID.getObjectCID() == aPageCID || m_aSelectedOID.getObjectCID() == aWallCID || !m_aSelectedOID.isAutoGeneratedObject(); if( bBackGroundHit ) { //todo: if more than one diagram is available in future do check the list of all diagrams here @@ -266,7 +266,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* } } //check whether the legend was hit but not selected (e.g. because it has no filling): - if( bBackGroundHit || m_aSelectedOID.getObjectCID().equals( aDiagramCID ) ) + if( bBackGroundHit || m_aSelectedOID.getObjectCID() == aDiagramCID ) { OUString aLegendCID( ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForLegend(nullptr,nullptr) ) );//@todo read CID from model SdrObject* pLegend = pDrawViewWrapper->getNamedSdrObject( aLegendCID ); @@ -412,7 +412,7 @@ OUString SelectionHelper::getHitObjectCID( //get diagram instead wall or page if hit inside diagram if( !aRet.isEmpty() ) { - if( aRet.equals( aPageCID ) ) + if( aRet == aPageCID ) { OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ); //todo: if more than one diagram is available in future do check the list of all diagrams here @@ -429,7 +429,7 @@ OUString SelectionHelper::getHitObjectCID( { OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() ) );//@todo read CID from model - if( aRet.equals( aWallCID ) ) + if( aRet == aWallCID ) { OUString aDiagramCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, OUString::number( 0 ) ); aRet = aDiagramCID; diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 792e6f627687..ec3fc0a4c583 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -464,7 +464,7 @@ void ShapeController::executeDispatch_RenameObject() if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) ) { pDlg->GetName(aName); - if (pSelectedObj->GetName().equals(aName)) + if (pSelectedObj->GetName() == aName) { pSelectedObj->SetName( aName ); } |