summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-08 19:54:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-09 13:01:49 +0100
commitac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch)
treefc5120838a69ced58c3cd2333718ffeb6d4adf67 /chart2/source
parent0c20b68149797c8b0779534a8e0cb9045085d451 (diff)
fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx2
-rw-r--r--chart2/source/model/main/CartesianCoordinateSystem.cxx2
-rw-r--r--chart2/source/model/main/PolarCoordinateSystem.cxx2
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx2
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx2
-rw-r--r--chart2/source/tools/ErrorBar.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx6
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx2
-rw-r--r--chart2/source/tools/Scaling.cxx8
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx2
-rw-r--r--chart2/source/view/axes/DateScaling.cxx4
12 files changed, 18 insertions, 18 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 3b48c7907a4c..8551915d9c88 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -60,7 +60,7 @@ WrappedScaleTextProperty::WrappedScaleTextProperty(const std::shared_ptr<Chart2M
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
+ static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
if( !xInnerPropertySet.is() )
return;
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 91e299d4906d..aea893a66ffa 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -48,7 +48,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const OUStringLiteral lcl_aServiceName
+constexpr OUStringLiteral lcl_aServiceName
= u"com.sun.star.comp.chart.ElementSelectorToolbarController";
}
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index f8cc8f17ad88..c65adee25829 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -31,7 +31,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-const OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
+constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.Cartesian";
}
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 2d2497bc23c9..5c891989e37f 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -31,7 +31,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
+constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_SERVICE_NAME
= u"com.sun.star.chart2.CoordinateSystems.Polar";
}
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index dc44985589cc..6c8826701779 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -42,7 +42,7 @@ using ::chart::impl::CachedDataSequence_Base;
namespace
{
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
enum
{
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 466e26ae88b3..50d72a88207e 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-const OUStringLiteral aSeriesPropName = u"Series";
+constexpr OUStringLiteral aSeriesPropName = u"Series";
} // anonymous namespace
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 6dd803093365..d894b16a3ff4 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star;
namespace
{
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index abc3aea59d8f..f1bf987fa2c6 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -57,12 +57,12 @@ namespace chart
namespace
{
-const OUStringLiteral lcl_aCategoriesRangeName = u"categories";
+constexpr OUStringLiteral lcl_aCategoriesRangeName = u"categories";
const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
-const OUStringLiteral lcl_aCategoriesRoleName = u"categories";
+constexpr OUStringLiteral lcl_aCategoriesRoleName = u"categories";
const char lcl_aLabelRangePrefix[] = "label ";
-const OUStringLiteral lcl_aCompleteRange = u"all";
+constexpr OUStringLiteral lcl_aCompleteRange = u"all";
typedef std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
lcl_tSequenceMap;
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 8e254903929e..b5b928e9e843 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -131,7 +131,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
if( ! xProp.is())
return;
- static const OUStringLiteral aRefSizeName = u"ReferencePageSize";
+ static constexpr OUStringLiteral aRefSizeName = u"ReferencePageSize";
try
{
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index b61886c643e8..e10757928a99 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -27,10 +27,10 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace
{
-const OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
-const OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
-const OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
-const OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
+constexpr OUStringLiteral lcl_aServiceName_Logarithmic = u"com.sun.star.chart2.LogarithmicScaling";
+constexpr OUStringLiteral lcl_aServiceName_Exponential = u"com.sun.star.chart2.ExponentialScaling";
+constexpr OUStringLiteral lcl_aServiceName_Linear = u"com.sun.star.chart2.LinearScaling";
+constexpr OUStringLiteral lcl_aServiceName_Power = u"com.sun.star.chart2.PowerScaling";
}
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index bdffa24a458d..fee4af622126 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -41,7 +41,7 @@ using ::chart::impl::UncachedDataSequence_Base;
namespace
{
-const OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
+constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.UncachedDataSequence";
enum
{
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index b5a690e203aa..a926b5a43c51 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -25,8 +25,8 @@
namespace
{
-const OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
-const OUStringLiteral lcl_aServiceName_InverseDateScaling
+constexpr OUStringLiteral lcl_aServiceName_DateScaling = u"com.sun.star.chart2.DateScaling";
+constexpr OUStringLiteral lcl_aServiceName_InverseDateScaling
= u"com.sun.star.chart2.InverseDateScaling";
const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic