diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:21:05 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:23 +0100 |
commit | acb7ca428382b8db42d7afcd79d72682aae0df8d (patch) | |
tree | 1a9c188c5bc6bc8043ccbb80ec906f6e3631add7 | |
parent | 39ddeb53c04f7a8410a5146e2ce7b4acf204ad2b (diff) |
chart2: Use appropriate OUString functions on string constants
Change-Id: Ifc28920e69db410b00312e634caba33b0e286b7f
32 files changed, 104 insertions, 104 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 358ad17f07da..45fe8659a4c1 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -527,7 +527,7 @@ void Chart2ImportTest::testBnc864396() uno::Sequence< OUString > aRowLabels = xChartDataArray->getRowDescriptions(); for(sal_Int32 i = 0; i < aRowLabels.getLength(); ++i) { - OUString aExpected = OUString("cat") + OUString::number(i+1); + OUString aExpected = "cat" + OUString::number(i+1); CPPUNIT_ASSERT_EQUAL(aExpected, aRowLabels[i]); } } diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index e1a2299fddfb..2915cd3fbed5 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -1350,7 +1350,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( xResult.set( xDataSeries ); bServiceFound = true; } - else if( aServiceSpecifier.equals( CHART_VIEW_SERVICE_NAME ) ) + else if( aServiceSpecifier == CHART_VIEW_SERVICE_NAME ) { if( !m_xChartView.is() ) { diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 541ed9f375b6..92c67a194078 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -180,7 +180,7 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ ) { Reference< chart2::XChartType > xType( aTypes[nN] ); - if( xType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) + if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY); if( xSeriesContainer.is() ) @@ -219,7 +219,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ ) { Reference< chart2::XChartType > xType( aTypes[nN] ); - if( xType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) + if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY); if( xSeriesContainer.is() ) diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index a5801ceb539b..3d622d36f43f 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -181,7 +181,7 @@ void SAL_CALL UpDownBarWrapper::setPropertyValue( const OUString& rPropertyName, for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ ) { Reference< chart2::XChartType > xType( aTypes[nN] ); - if( xType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) + if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { Reference< beans::XPropertySet > xTypeProps( aTypes[nN], uno::UNO_QUERY ); if(xTypeProps.is()) @@ -205,7 +205,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const OUString& rPropertyN for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ ) { Reference< chart2::XChartType > xType( aTypes[nN] ); - if( xType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) + if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { Reference< beans::XPropertySet > xTypeProps( aTypes[nN], uno::UNO_QUERY ); if(xTypeProps.is()) diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index c62285b4fb04..5276546afff1 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -362,40 +362,40 @@ Image SeriesHeader::GetChartTypeImage( return aResult; OUString aChartTypeName( xChartType->getChartType()); - if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_AREA )) + if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_AREA ) { aResult = Image( SchResId( IMG_TYPE_AREA ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ) { if( bSwapXAndYAxis ) aResult = Image( SchResId( IMG_TYPE_BAR ) ); else aResult = Image( SchResId( IMG_TYPE_COLUMN ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_LINE )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_LINE ) { aResult = Image( SchResId( IMG_TYPE_LINE ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_SCATTER )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ) { aResult = Image( SchResId( IMG_TYPE_XY ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_PIE )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) { aResult = Image( SchResId( IMG_TYPE_PIE ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_NET ) - || aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ) ) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_NET + || aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET ) { aResult = Image( SchResId( IMG_TYPE_NET ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { // @todo: correct image for candle-stick type aResult = Image( SchResId( IMG_TYPE_STOCK ) ); } - else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE )) + else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE ) { aResult = Image( SchResId( IMG_TYPE_BUBBLE ) ); } diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index c642ee1fa948..3c9da085399b 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -891,7 +891,7 @@ void DataBrowserModel::updateFromModel() nSequenceNumberFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ), xSeries, -1, xDiagram ); } - else if( aRole.equals( "values-x" ) ) + else if( aRole == "values-x" ) nSequenceNumberFormatKey = nXAxisNumberFormat; if( ::std::find_if( aSharedSequences.begin(), aSharedSequences.end(), diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index df2b8d29718f..629f55440790 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -153,7 +153,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_FAIL( OUStringToOString(OUString( "Property Exception caught. Message: " ) + + OSL_FAIL( OUStringToOString("Property Exception caught. Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } } @@ -184,7 +184,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_FAIL( OUStringToOString(OUString("Property Exception caught. Message: " ) + + OSL_FAIL( OUStringToOString("Property Exception caught. Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } } @@ -201,7 +201,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_FAIL( OUStringToOString(OUString("Property Exception caught. Message: " ) + + OSL_FAIL( OUStringToOString("Property Exception caught. Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } return Color( nResult ); @@ -219,7 +219,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_FAIL( OUStringToOString(OUString( "Property Exception caught. Message: " ) + + OSL_FAIL( OUStringToOString( "Property Exception caught. Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } } diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 451945e89ab9..00f16fd7d7ac 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -147,7 +147,7 @@ void RangeChooserTabPage::initControlsFromModel() if( bIsValid ) m_rDialogModel.detectArguments(m_aLastValidRangeString, bUseColumns, bFirstCellAsLabel, bHasCategories ); else - m_aLastValidRangeString = ""; + m_aLastValidRangeString.clear(); m_pED_Range->SetText( m_aLastValidRangeString ); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index fb1132ce2620..a8de0328fe0a 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1078,7 +1078,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) } Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) ); - if( xChartType->getChartType().equals(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) + if( xChartType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) { try { diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index fc574a241e5b..aad49b6caa2c 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -180,7 +180,7 @@ uno::Sequence< OUString > ChartFrameLoader::getSupportedServiceNames_Static() xLoadable->load( aCompleteMediaDescriptor ); //resize standalone files to get correct size: - if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName.equals( "StarChart 5.0") ) + if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName == "StarChart 5.0" ) { awt::Rectangle aRect( xComponentWindow->getPosSize() ); sal_Int16 nFlags=0; diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx index 4578011329fb..d47f4611f9a5 100644 --- a/chart2/source/inc/servicenames.hxx +++ b/chart2/source/inc/servicenames.hxx @@ -23,32 +23,32 @@ namespace chart { #define CHART_MODEL_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartModel" ) -#define CHART_MODEL_SERVICE_NAME OUString( "com.sun.star.chart2.ChartDocument" ) +#define CHART_MODEL_SERVICE_NAME "com.sun.star.chart2.ChartDocument" //@todo create your own service containing the service com.sun.star.document.OfficeDocument #define CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartController" ) -#define CHART_CONTROLLER_SERVICE_NAME OUString( "com.sun.star.chart2.ChartController" ) +#define CHART_CONTROLLER_SERVICE_NAME "com.sun.star.chart2.ChartController" //@todo create your own service containing the service com.sun.star.frame.Controller #define CHART_VIEW_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartView" ) -#define CHART_VIEW_SERVICE_NAME OUString( "com.sun.star.chart2.ChartView" ) +#define CHART_VIEW_SERVICE_NAME "com.sun.star.chart2.ChartView" #define CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartFrameLoader" ) -#define CHART_FRAMELOADER_SERVICE_NAME OUString( "com.sun.star.frame.SynchronousFrameLoader" ) +#define CHART_FRAMELOADER_SERVICE_NAME "com.sun.star.frame.SynchronousFrameLoader" #define CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.WizardDialog" ) -#define CHART_WIZARD_DIALOG_SERVICE_NAME OUString( "com.sun.star.chart2.WizardDialog" ) +#define CHART_WIZARD_DIALOG_SERVICE_NAME "com.sun.star.chart2.WizardDialog" #define CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartTypeDialog" ) -#define CHART_TYPE_DIALOG_SERVICE_NAME OUString( "com.sun.star.chart2.ChartTypeDialog" ) +#define CHART_TYPE_DIALOG_SERVICE_NAME "com.sun.star.chart2.ChartTypeDialog" // wrapper for old UNO API (com.sun.star.chart) #define CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.ChartDocumentWrapper" ) -#define CHART_CHARTAPIWRAPPER_SERVICE_NAME OUString( "com.sun.star.chart2.ChartDocumentWrapper" ) +#define CHART_CHARTAPIWRAPPER_SERVICE_NAME "com.sun.star.chart2.ChartDocumentWrapper" // accessibility #define CHART_ACCESSIBLE_TEXT_IMPLEMENTATION_NAME OUString( "com.sun.star.comp.chart2.AccessibleTextComponent" ) -#define CHART_ACCESSIBLE_TEXT_SERVICE_NAME OUString( "com.sun.star.accessibility.AccessibleTextComponent" ) +#define CHART_ACCESSIBLE_TEXT_SERVICE_NAME "com.sun.star.accessibility.AccessibleTextComponent" } //namespace chart diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx index 20f078cde57a..6fc24d10b789 100644 --- a/chart2/source/inc/servicenames_charttypes.hxx +++ b/chart2/source/inc/servicenames_charttypes.hxx @@ -21,17 +21,17 @@ namespace chart { -#define CHART2_SERVICE_NAME_CHARTTYPE_AREA OUString( "com.sun.star.chart2.AreaChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_BAR OUString( "com.sun.star.chart2.BarChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_COLUMN OUString( "com.sun.star.chart2.ColumnChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_LINE OUString( "com.sun.star.chart2.LineChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_SCATTER OUString( "com.sun.star.chart2.ScatterChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_PIE OUString( "com.sun.star.chart2.PieChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_NET OUString( "com.sun.star.chart2.NetChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET OUString( "com.sun.star.chart2.FilledNetChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK OUString( "com.sun.star.chart2.CandleStickChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE OUString( "com.sun.star.chart2.BubbleChartType" ) -#define CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR OUString( "com.sun.star.chart2.GL3DBarChartType" ) +#define CHART2_SERVICE_NAME_CHARTTYPE_AREA "com.sun.star.chart2.AreaChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_BAR "com.sun.star.chart2.BarChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_COLUMN "com.sun.star.chart2.ColumnChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_LINE "com.sun.star.chart2.LineChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_SCATTER "com.sun.star.chart2.ScatterChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_PIE "com.sun.star.chart2.PieChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_NET "com.sun.star.chart2.NetChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET "com.sun.star.chart2.FilledNetChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK "com.sun.star.chart2.CandleStickChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE "com.sun.star.chart2.BubbleChartType" +#define CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR "com.sun.star.chart2.GL3DBarChartType" } //namespace chart diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index 480954eaf498..cd5dac49a494 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -369,12 +369,12 @@ sal_Int32 XMLFilter::impl_Import( uno::Sequence< beans::PropertyValue > aModProps = xModel->getArgs(); for( sal_Int32 nInd = 0; nInd < aModProps.getLength(); nInd++ ) { - if( aModProps[nInd].Name.equals( "HierarchicalDocumentName" ) ) + if( aModProps[nInd].Name == "HierarchicalDocumentName" ) { // Actually this argument only has meaning for embedded documents aModProps[nInd].Value >>= aHierarchName; } - else if( aModProps[nInd].Name.equals( "DocumentBaseURL" ) ) + else if( aModProps[nInd].Name == "DocumentBaseURL" ) { aModProps[nInd].Value >>= aBaseUri; } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 0d2ac75e5363..23a3c290af07 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -509,9 +509,9 @@ void SAL_CALL ChartModel::load( aMDHelper.ISSET_InputStream ) { if( aMDHelper.ISSET_FilterName && - (aMDHelper.FilterName.equals( "StarChart 5.0") || - aMDHelper.FilterName.equals( "StarChart 4.0") || - aMDHelper.FilterName.equals( "StarChart 3.0") )) + (aMDHelper.FilterName == "StarChart 5.0" || + aMDHelper.FilterName == "StarChart 4.0" || + aMDHelper.FilterName == "StarChart 3.0" )) { attachResource( aMDHelper.URL, rMediaDescriptor ); impl_load( rMediaDescriptor, 0 ); // cannot create a storage from binary streams, but I do not need the storage here anyhow diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index e82cf5a55a2c..64375568c233 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -308,12 +308,12 @@ sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate( if( nNumberOfChartTypes > 2 ) break; OUString aCTService = aChartTypeSeq[j]->getChartType(); - if( aCTService.equals( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )) + if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ) { xColumnChartType.set( aChartTypeSeq[j] ); xColumnChartCooSys.set( aCooSysSeq[i] ); } - else if( aCTService.equals( CHART2_SERVICE_NAME_CHARTTYPE_LINE )) + else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE ) xLineChartType.set( aChartTypeSeq[j] ); } } diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index 8f9fae68db66..dca4cbb99c6a 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -442,11 +442,11 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate( if( nNumberOfChartTypes > 3 ) break; OUString aCTService = aChartTypeSeq[j]->getChartType(); - if( aCTService.equals( CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )) + if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ) xVolumeChartType.set( aChartTypeSeq[j] ); - else if( aCTService.equals( CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )) + else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) xCandleStickChartType.set( aChartTypeSeq[j] ); - else if( aCTService.equals( CHART2_SERVICE_NAME_CHARTTYPE_LINE )) + else if( aCTService == CHART2_SERVICE_NAME_CHARTTYPE_LINE ) xLineChartType.set( aChartTypeSeq[j] ); } } diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index 5da75f39f45a..fc475d6b67a5 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -90,8 +90,8 @@ void AxisHelper::removeExplicitScaling( ScaleData& rScaleData ) bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling ) { Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); - return xServiceName.is() && (xServiceName->getServiceName()).equals( - "com.sun.star.chart2.LogarithmicScaling"); + return xServiceName.is() + && xServiceName->getServiceName() == "com.sun.star.chart2.LogarithmicScaling"; } chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, ChartModel& rModel ) @@ -1085,7 +1085,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys { if( xCooSys.is() ) { - bool bCartesian = xCooSys->getViewServiceName().equals( CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME ); + bool bCartesian = xCooSys->getViewServiceName() == CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME; if( bCartesian ) { bool bVertical = false; diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx index 816a476aa4e2..f008eeefce55 100644 --- a/chart2/source/tools/ChartTypeHelper.cxx +++ b/chart2/source/tools/ChartTypeHelper.cxx @@ -66,9 +66,9 @@ bool ChartTypeHelper::isSupportingGeometryProperties( const uno::Reference< XCha if(nDimensionCount==3) { OUString aChartTypeName = xChartType->getChartType(); - if( aChartTypeName.equals(CHART2_SERVICE_NAME_CHARTTYPE_BAR) ) + if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_BAR ) return true; - if( aChartTypeName.equals(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN) ) + if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN ) return true; } } @@ -452,15 +452,15 @@ sal_Int32 ChartTypeHelper::getDefaultDirectLightColor( bool bSimple, const uno:: if( xChartType .is() ) { OUString aChartType = xChartType->getChartType(); - if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) { if( bSimple ) nRet = static_cast< sal_Int32 >( 0x333333 ); // grey80 else nRet = static_cast< sal_Int32 >( 0xb3b3b3 ); // grey30 } - else if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_LINE) - || aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER) ) + else if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_LINE + || aChartType == CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ) nRet = static_cast< sal_Int32 >( 0x666666 ); // grey60 } return nRet; @@ -472,7 +472,7 @@ sal_Int32 ChartTypeHelper::getDefaultAmbientLightColor( bool bSimple, const uno: if( xChartType .is() ) { OUString aChartType = xChartType->getChartType(); - if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) { if( bSimple ) nRet = static_cast< sal_Int32 >( 0xcccccc ); // grey20 @@ -489,10 +489,10 @@ drawing::Direction3D ChartTypeHelper::getDefaultSimpleLightDirection( const uno: if( xChartType .is() ) { OUString aChartType = xChartType->getChartType(); - if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) aRet = drawing::Direction3D(0.0, 0.8, 0.5); - else if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_LINE) - || aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER) ) + else if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_LINE + || aChartType == CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ) aRet = drawing::Direction3D(0.9, 0.5, 0.05); } return aRet; @@ -504,10 +504,10 @@ drawing::Direction3D ChartTypeHelper::getDefaultRealisticLightDirection( const u if( xChartType .is() ) { OUString aChartType = xChartType->getChartType(); - if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) aRet = drawing::Direction3D(0.6, 0.6, 0.6); - else if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_LINE) - || aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER) ) + else if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_LINE + || aChartType == CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ) aRet = drawing::Direction3D(0.9, 0.5, 0.05); } return aRet; @@ -546,7 +546,7 @@ sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries( try { OUString aChartTypeName = xChartType->getChartType(); - if( aChartTypeName.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE)) + if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) { uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY_THROW ); bool bDonut = false; diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index 8bb1880c0165..9d8e1a4151ac 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -166,7 +166,7 @@ void ConfigColorScheme::retrieveConfigColors() void ConfigColorScheme::notify( const OUString & rPropertyName ) { - if( rPropertyName.equals( aSeriesPropName )) + if( rPropertyName == aSeriesPropName ) m_bNeedsUpdate = true; } diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index bb30a2683aa7..a6f37f00497f 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -256,7 +256,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR for( sal_Int32 nN=0; nN<aDataSeqences.getLength(); nN++ ) { OUString aRole = DataSeriesHelper::getRole(aDataSeqences[nN]); - if( !aRole.equals("values-x") ) + if( aRole != "values-x" ) aResultVector.push_back( aDataSeqences[nN] ); } diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 765937b80a72..77058510ca34 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -1488,7 +1488,7 @@ bool DiagramHelper::isPieOrDonutChart( const ::com::sun::star::uno::Reference< if( xChartType .is() ) { OUString aChartType = xChartType->getChartType(); - if( aChartType.equals(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) + if( aChartType == CHART2_SERVICE_NAME_CHARTTYPE_PIE ) return true; } return false; diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 75e114cd5b42..46c391835cdf 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -696,7 +696,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData uno::Sequence< sal_Int32 > aSequenceMapping; DataSourceHelper::readArguments( aArguments, aRangeRepresentation, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories ); - if( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) ) + if( aRangeRepresentation == lcl_aCategoriesRangeName ) { //return split complex categories if we have any: ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aComplexCategories; @@ -723,7 +723,7 @@ Reference< chart2::data::XDataSource > SAL_CALL InternalDataProvider::createData return new DataSource( ContainerHelper::ContainerToSequence(aComplexCategories) ); } - OSL_ASSERT( aRangeRepresentation.equals( lcl_aCompleteRange )); + OSL_ASSERT( aRangeRepresentation == lcl_aCompleteRange ); ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultLSeqVec; @@ -814,7 +814,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa { if( aRangeRepresentation.match( lcl_aCategoriesRangeName )) { - OSL_ASSERT( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested + OSL_ASSERT( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implmented that only parts of the categories are really requested // categories return createDataSequenceAndAddToMap( lcl_aCategoriesRangeName, lcl_aCategoriesRoleName ); @@ -864,7 +864,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt if( aRange.match( lcl_aCategoriesRangeName )) { - OSL_ASSERT( aRange.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested + OSL_ASSERT( aRange == lcl_aCategoriesRangeName );//it is not expected nor implmented that only parts of the categories are really requested bResult = true; } else if( aRange.match( lcl_aLabelRangePrefix )) @@ -915,7 +915,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation aResult.getArray(), lcl_copyFromLevel(nLevel) ); } } - else if( aRange.equals( lcl_aCategoriesRangeName ) ) + else if( aRange == lcl_aCategoriesRangeName ) { vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels()); sal_Int32 nLevelCount = lcl_getInnerLevelCount( aCategories ); @@ -994,7 +994,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( else m_aInternalData.setComplexColumnLabels( aComplexCategories ); } - else if( aRange.equals( lcl_aCategoriesRangeName ) ) + else if( aRange == lcl_aCategoriesRangeName ) { vector< vector< uno::Any > > aComplexCategories; aComplexCategories.resize( aNewVector.size() ); @@ -1186,7 +1186,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang // @todo: add this information in the range representation strings if( aRangeRepresentation.match( lcl_aCategoriesRangeName )) { - OSL_ASSERT( aRangeRepresentation.equals( lcl_aCategoriesRangeName ) );//it is not expected nor implmented that only parts of the categories are really requested + OSL_ASSERT( aRangeRepresentation == lcl_aCategoriesRangeName );//it is not expected nor implmented that only parts of the categories are really requested aRange.aUpperLeft.bIsEmpty = false; if( m_bDataInColumns ) { @@ -1219,7 +1219,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang aRange.aUpperLeft.nRow = nIndex + 1; } } - else if( aRangeRepresentation.equals( lcl_aCompleteRange )) + else if( aRangeRepresentation == lcl_aCompleteRange ) { aRange.aUpperLeft.bIsEmpty = false; aRange.aLowerRight.bIsEmpty = false; diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx index 4ecf9bb83588..062c5f466164 100644 --- a/chart2/source/tools/MediaDescriptorHelper.cxx +++ b/chart2/source/tools/MediaDescriptorHelper.cxx @@ -28,7 +28,7 @@ const short FLAG_DEPRECATED =1; const short FLAG_MODEL =2; #define WRITE_PROPERTY( MediaName, nFlags ) \ -if(rProp.Name.equals(#MediaName)) \ +if(rProp.Name == #MediaName) \ { \ if( rProp.Value >>= MediaName ) \ ISSET_##MediaName = true; \ diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx index d7be7b6136ca..59dc730ae9ec 100644 --- a/chart2/source/tools/RegressionCurveCalculator.cxx +++ b/chart2/source/tools/RegressionCurveCalculator.cxx @@ -56,14 +56,14 @@ bool RegressionCurveCalculator::isLinearScaling( if( !xScaling.is()) return true; uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); - return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LinearScaling" )); + return xServiceName.is() && xServiceName->getServiceName() == "com.sun.star.chart2.LinearScaling"; } bool RegressionCurveCalculator::isLogarithmicScaling( const Reference< chart2::XScaling > & xScaling ) { uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); - return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LogarithmicScaling" )); + return xServiceName.is() && xServiceName->getServiceName() == "com.sun.star.chart2.LogarithmicScaling"; } void RegressionCurveCalculator::setRegressionProperties( diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index fd3ac69c9799..124d0989b762 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -266,8 +266,8 @@ bool RegressionCurveHelper::isMeanValueLine( { uno::Reference< XServiceName > xServName( xRegCurve, uno::UNO_QUERY ); if( xServName.is() && - xServName->getServiceName().equals( - "com.sun.star.chart2.MeanValueRegressionCurve")) + xServName->getServiceName() == + "com.sun.star.chart2.MeanValueRegressionCurve" ) return true; return false; } diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index 3e8dd8b34d97..d2adf5417410 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -58,9 +58,9 @@ VCoordinateSystem* VCoordinateSystem::createCoordinateSystem( //@todo: in future the coordinatesystems should be instantiated via service factory VCoordinateSystem* pRet=NULL; - if( aViewServiceName.equals( CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME ) ) + if( aViewServiceName == CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME ) pRet = new VCartesianCoordinateSystem(xCooSysModel); - else if( aViewServiceName.equals( CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME ) ) + else if( aViewServiceName == CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME ) pRet = new VPolarCoordinateSystem(xCooSysModel); if(!pRet) pRet = new VCoordinateSystem(xCooSysModel); diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 8236706db511..407c34fac6b8 100755 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -969,7 +969,7 @@ void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons) rBarInfo.maPos.y + BAR_SIZE_Y / 2.0f, rBarInfo.maPos.z); maShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, - OUString("Value: ") + OUString::number(rBarInfo.mnVal), glm::vec4(0.0f, 0.0f, 1.0f, 1.0f), CALC_POS_EVENT_ID)); + "Value: " + OUString::number(rBarInfo.mnVal), glm::vec4(0.0f, 0.0f, 1.0f, 1.0f), CALC_POS_EVENT_ID)); opengl3D::ScreenText* pScreenText = static_cast<opengl3D::ScreenText*>(&maShapes.back()); pScreenText->setPosition(glm::vec2(-0.9f, 0.9f), glm::vec2(-0.6f, 0.8f), aTextPos); pScreenText->render(); @@ -1238,7 +1238,7 @@ void GL3DBarChart::addMovementScreenText(sal_uInt32 nBarId) glm::vec3 aTextPos = glm::vec3(rBarInfo.maPos.x + BAR_SIZE_X / 2.0f, rBarInfo.maPos.y + BAR_SIZE_Y / 2.0f, rBarInfo.maPos.z); - OUString aBarValue = OUString("Value: ") + OUString::number(rBarInfo.mnVal); + OUString aBarValue = "Value: " + OUString::number(rBarInfo.mnVal); maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID, true)); const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue); float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.024; @@ -1259,19 +1259,19 @@ void GL3DBarChart::updateClickEvent() //write title if (aList.size() > 1) { - aTitle = OUString("Time "); + aTitle = "Time "; nTextWidth = addScreenTextShape(aTitle, glm::vec2(0.875, 0.99f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.5f)); nMinXCoord = std::min(nMinXCoord, 0.875f - nTextWidth); - aTitle = OUString(" Value"); + aTitle = " Value"; nTextWidth = addScreenTextShape(aTitle, glm::vec2(0.875f, 0.99f), 0.07f, true, glm::vec4(0.0f, 1.0f, 1.0f, 0.5f)); nMaxXCoord = std::max(nMaxXCoord, 0.875f + nTextWidth); } if (aList.size() > COLUMNSIZE) { - aTitle = OUString("Time "); + aTitle = "Time "; nTextWidth = addScreenTextShape(aTitle, glm::vec2(0.55f, 0.99f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.5f)); nMinXCoord = std::min(nMinXCoord, 0.55f - nTextWidth); - aTitle = OUString(" Value"); + aTitle = " Value"; nTextWidth = addScreenTextShape(aTitle, glm::vec2(0.55f, 0.99f), 0.07f, true, glm::vec4(0.0f, 1.0f, 1.0f, 0.5f)); nMaxXCoord = std::max(nMaxXCoord, 0.55f + nTextWidth); } @@ -1280,10 +1280,10 @@ void GL3DBarChart::updateClickEvent() { if (nIdex + 1 < aList.size()) { - aTitle = OUString("[Time:") + OUString::number((mnHistoryCounter - aList.size() + nIdex)) + "]: "; + aTitle = "[Time:" + OUString::number((mnHistoryCounter - aList.size() + nIdex)) + "]: "; if (nIdex == 0) { - aTitle = OUString("Most Recent") + aTitle; + aTitle = "Most Recent" + aTitle; } if (aList.size() <= COLUMNSIZE) { @@ -1309,7 +1309,7 @@ void GL3DBarChart::updateClickEvent() addMovementScreenText(nBarIdArray[i]); } //add translucent back ground - aTitle = OUString(" "); + aTitle = " "; maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aTitle, glm::vec4(0.0f, 0.0f, 0.0f, 0.5f), 0)); opengl3D::ScreenText* pScreenText = static_cast<opengl3D::ScreenText*>(&maScreenTextShapes.back()); pScreenText->setPosition(glm::vec2(nMinXCoord, 0.99f), glm::vec2(nMaxXCoord, 0.99f - nMaxHight)); @@ -1435,7 +1435,7 @@ void GL3DBarChart::updateScroll() //update scroll value for(size_t i = 0; i < aBarInfoList.size(); i++) { - OUString aBarValue = OUString("Value: ") + OUString::number(aBarInfoList[i].mnVal); + OUString aBarValue = "Value: " + OUString::number(aBarInfoList[i].mnVal); maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID, true)); const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue); float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.024; diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 1d83148831c1..3716797c4d82 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -491,7 +491,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re { ASSERT_EXCEPTION( e ); } - bool bMultiLineLabel = aSeparator.equals("\n");; + bool bMultiLineLabel = aSeparator == "\n"; sal_Int32 nLineCountForSymbolsize = 0; { if(pLabel->ShowCategoryName) diff --git a/chart2/source/view/main/AbstractShapeFactory.cxx b/chart2/source/view/main/AbstractShapeFactory.cxx index 58a0f5c5b324..45314c0af298 100644 --- a/chart2/source/view/main/AbstractShapeFactory.cxx +++ b/chart2/source/view/main/AbstractShapeFactory.cxx @@ -133,7 +133,7 @@ uno::Reference< drawing::XShapes > AbstractShapeFactory::getChartRootShape( { if( xShapes->getByIndex( nN ) >>= xShape ) { - if( AbstractShapeFactory::getShapeName( xShape ).equals("com.sun.star.chart2.shapes") ) + if( AbstractShapeFactory::getShapeName( xShape ) == "com.sun.star.chart2.shapes" ) { xRet = uno::Reference< drawing::XShapes >( xShape, uno::UNO_QUERY ); break; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 258686d179cf..ce183f972154 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2877,7 +2877,7 @@ void SAL_CALL ChartView::setPropertyValue( const OUString& rPropertyName throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException , lang::WrappedTargetException, uno::RuntimeException, std::exception) { - if( rPropertyName.equals("Resolution") ) + if( rPropertyName == "Resolution" ) { awt::Size aNewResolution; if( ! (rValue >>= aNewResolution) ) @@ -2894,7 +2894,7 @@ void SAL_CALL ChartView::setPropertyValue( const OUString& rPropertyName this->modified( lang::EventObject( static_cast< uno::XWeak* >( this ) ) ); } } - else if( rPropertyName.equals("ZoomFactors") ) + else if( rPropertyName == "ZoomFactors" ) { //#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100% uno::Sequence< beans::PropertyValue > aZoomFactors; @@ -2917,7 +2917,7 @@ void SAL_CALL ChartView::setPropertyValue( const OUString& rPropertyName pDataValues++; } } - else if( rPropertyName.equals("SdrViewIsInEditMode") ) + else if( rPropertyName == "SdrViewIsInEditMode" ) { //#i77362 change notification for changes on additional shapes are missing if( ! (rValue >>= m_bSdrViewIsInEditMode) ) @@ -2931,7 +2931,7 @@ Any SAL_CALL ChartView::getPropertyValue( const OUString& rPropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { Any aRet; - if( rPropertyName.equals("Resolution") ) + if( rPropertyName == "Resolution" ) { aRet = uno::makeAny( m_aPageResolution ); } diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 7d06d0d0f5e7..58d967cf0dc2 100755 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -2254,7 +2254,7 @@ void OpenGL3DRenderer::SetPickingMode(bool bPickingMode) sal_uInt32 OpenGL3DRenderer::GetPixelColorFromPoint(long nX, long nY) { static sal_uInt32 nId = 0; - OUString aFileName = OUString("/home/moggi/work/picking_") + OUString::number(nId++) + ".png"; + OUString aFileName = "/home/moggi/work/picking_" + OUString::number(nId++) + ".png"; OpenGLHelper::renderToFile(m_iWidth, m_iHeight, aFileName); boost::scoped_array<sal_uInt8> buf(new sal_uInt8[4]); glReadPixels(nX, m_iHeight-nY, 1, 1, GL_BGRA, GL_UNSIGNED_BYTE, buf.get()); diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 0f2dfe2b9930..55774a97738f 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -94,7 +94,7 @@ uno::Reference< drawing::XShapes > getChartShape( uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet; - if( aRet.equals("com.sun.star.chart2.shapes") ) + if( aRet == "com.sun.star.chart2.shapes" ) { xRet = dynamic_cast<SvxDummyShapeContainer&>(*xShape.get()).getWrappedShape(); break; |