summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 10:55:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-13 08:16:03 +0200
commit3457da6abe0fd03efd19442e9790fbd1aa04c160 (patch)
treea7a2d5b51839b200e7cda79af863dce7a04d3a10 /chart2
parent47196637a41ddfc9a8707771b1b9f482fd72c3b6 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--chart2/source/model/main/ChartModel.cxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx4
4 files changed, 8 insertions, 8 deletions
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 );
}
}
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 4f1d055f6a13..520115092833 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -69,9 +69,9 @@ using namespace ::chart::CloneHelper;
namespace
{
-const OUString lcl_aGDIMetaFileMIMEType(
+const OUStringLiteral lcl_aGDIMetaFileMIMEType(
"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"");
-const OUString lcl_aGDIMetaFileMIMETypeHighContrast(
+const OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"");
} // anonymous namespace
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index a70738adb906..a66bd266634b 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1108,9 +1108,9 @@ void ChartView::impl_deleteCoordinateSystems()
// datatransfer::XTransferable
namespace
{
-const OUString lcl_aGDIMetaFileMIMEType(
+const OUStringLiteral lcl_aGDIMetaFileMIMEType(
"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
-const OUString lcl_aGDIMetaFileMIMETypeHighContrast(
+const OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
} // anonymous namespace