From 3457da6abe0fd03efd19442e9790fbd1aa04c160 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Aug 2020 10:55:58 +0200 Subject: loplugin:stringstatic also look for local statics Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/controller/dialogs/DialogModel.cxx | 4 ++-- chart2/source/controller/dialogs/tp_DataSource.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chart2/source/controller') diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index b4bdbae6501e..b8485a8b4c5b 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -54,7 +54,7 @@ using ::com::sun::star::uno::Sequence; namespace { -const OUString lcl_aLabelRole( "label" ); +const OUStringLiteral lcl_aLabelRole( "label" ); struct lcl_ChartTypeToSeriesCnt { @@ -70,7 +70,7 @@ OUString lcl_ConvertRole( const OUString & rRoleString ) OUString aResult( rRoleString ); typedef std::map< OUString, OUString > tTranslationMap; - static tTranslationMap aTranslationMap = + static const tTranslationMap aTranslationMap = { { "categories", ::chart::SchResId( STR_DATA_ROLE_CATEGORIES ) }, { "error-bars-x", ::chart::SchResId( STR_DATA_ROLE_X_ERROR ) }, diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index b6ebe98d08d8..4ef2c21483b3 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -46,7 +46,7 @@ using ::com::sun::star::uno::Sequence; namespace { -const OUString lcl_aLabelRole( "label" ); +const OUStringLiteral lcl_aLabelRole( "label" ); void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole, const OUString& rRange) @@ -840,7 +840,7 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) // "$Sheet1.$A$1" aRange = xNewSeq->getSourceRangeRepresentation(); Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( "Role" , uno::Any( lcl_aLabelRole )); + xProp->setPropertyValue( "Role" , uno::Any( OUString(lcl_aLabelRole) )); xLabeledSeq->setLabel( xNewSeq ); } } -- cgit