From 1ef9f3988ee4dcbc77e1fdefa20442e044a67d4d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 30 Jan 2016 19:09:35 +0200 Subject: unnecessary use of OUString constructor Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/controller/dialogs/tp_DataSource.cxx | 11 +++++------ chart2/source/model/template/DataInterpreter.cxx | 2 +- chart2/source/view/charttypes/GL3DBarChart.cxx | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 1039115143e6..65db15671668 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -102,8 +102,7 @@ OUString lcl_GetSelectedRole( const SvTabListBox & rRoleListBox, bool bUITransla OUString aResult; SvTreeListEntry * pEntry = rRoleListBox.FirstSelected(); if( pEntry ) - aResult = OUString( SvTabListBox::GetEntryText( pEntry, - bUITranslated ? 1 : 0 )); + aResult = SvTabListBox::GetEntryText( pEntry, bUITranslated ? 1 : 0 ); return aResult; } @@ -112,7 +111,7 @@ OUString lcl_GetSelectedRolesRange( const SvTabListBox & rRoleListBox ) OUString aResult; SvTreeListEntry * pEntry = rRoleListBox.FirstSelected(); if( pEntry ) - aResult = OUString( SvTabListBox::GetEntryText( pEntry, 2 )); + aResult = SvTabListBox::GetEntryText( pEntry, 2 ); return aResult; } @@ -219,7 +218,7 @@ DataSourceTabPage::DataSourceTabPage( m_pFT_CAPTION->Show(!bHideDescription); - m_aFixedTextRange = OUString( m_pFT_RANGE->GetText() ); + m_aFixedTextRange = m_pFT_RANGE->GetText(); this->SetText( SCH_RESSTR( STR_OBJECT_DATASERIES_PLURAL ) ); // set handlers @@ -425,9 +424,9 @@ void DataSourceTabPage::fillSeriesListBox() const OUString aReplacementStr( "%NUMBER" ); sal_Int32 nIndex = aResString.indexOf( aReplacementStr ); if( nIndex != -1 ) - aLabel = OUString( aResString.replaceAt( + aLabel = aResString.replaceAt( nIndex, aReplacementStr.getLength(), - OUString::number(nUnnamedSeriesIndex))); + OUString::number(nUnnamedSeriesIndex)); } if( aLabel.isEmpty() ) aLabel = ::chart::SchResId( STR_DATA_UNNAMED_SERIES ).toString(); diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 18487e884eb3..25a1c8b40661 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -447,7 +447,7 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource ) aSourceRepr = ""; if( aSequences[k]->getLabel().is()) - aSourceRepr = OUString( aSequences[k]->getLabel()->getSourceRangeRepresentation()); + aSourceRepr = aSequences[k]->getLabel()->getSourceRangeRepresentation(); xProp.set( aSequences[k]->getLabel(), uno::UNO_QUERY ); if( xProp.is() && ( xProp->getPropertyValue( "Role") >>= aId )) diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index ddbe39a3d8f7..748bcc7f548a 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1151,7 +1151,7 @@ void GL3DBarChart::updateRenderFPS() osl_getSystemTime(&maFPSRenderStartTime); } osl_getSystemTime(&maFPSRenderEndTime); - OUString aFPS = OUString("Render FPS: "); + OUString aFPS = "Render FPS: "; addScreenTextShape(aFPS, glm::vec2(-0.77f, 0.99f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.0f)); addScreenTextShape(maFPS, glm::vec2(-0.77f, 0.99f), 0.07f, true, glm::vec4(1.0f, 0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f)); @@ -1199,7 +1199,7 @@ void GL3DBarChart::updateDataUpdateFPS() osl_getSystemTime(&maDataUpdateStartTime); } osl_getSystemTime(&maDataUpdateEndTime); - OUString aDataUpdateFPS = OUString("Data Update Rate: "); + OUString aDataUpdateFPS = "Data Update Rate: "; addScreenTextShape(aDataUpdateFPS, glm::vec2(-0.77, 0.92f), 0.07f, false, glm::vec4(0.0f, 1.0f, 1.0f, 0.0f)); addScreenTextShape(maDataUpdateFPS, glm::vec2(-0.77f, 0.92f), 0.07f, true, glm::vec4(1.0f, 0.0f, 0.0f, 0.0f)); } -- cgit