summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-05 08:34:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-05 09:22:51 +0200
commit17a2c9e8e2361de27013a25e51f3a3ca729f1b31 (patch)
tree1c89bc104e5630fb71ff0a5b12c464ca2aceebc3 /chart2
parent8fa4b0429b514c0d696ebfc2e47418292d7ec367 (diff)
clang-tidy performance-unnecessary-value-param
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx25
-rw-r--r--chart2/source/controller/inc/uiobject.hxx4
-rw-r--r--chart2/source/controller/uitest/uiobject.cxx4
-rw-r--r--chart2/source/view/inc/3DChartObjects.hxx2
-rw-r--r--chart2/source/view/main/3DChartObjects.cxx2
5 files changed, 19 insertions, 18 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 0f151a44a615..0f8bd60b38f6 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/chart/ChartRegressionCurveType.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
+#include <utility>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
@@ -216,7 +217,7 @@ WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ConstantErrorLow"
- , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -266,7 +267,7 @@ WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ConstantErrorHigh"
- , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -312,7 +313,7 @@ public:
WrappedMeanValueProperty::WrappedMeanValueProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
- : WrappedStatisticProperty< bool >( "MeanValue", uno::Any( false ), spChart2ModelContact, ePropertyType )
+ : WrappedStatisticProperty< bool >( "MeanValue", uno::Any( false ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -353,7 +354,7 @@ WrappedErrorCategoryProperty::WrappedErrorCategoryProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< css::chart::ChartErrorCategory >( "ErrorCategory"
- , uno::Any( css::chart::ChartErrorCategory_NONE ), spChart2ModelContact, ePropertyType )
+ , uno::Any( css::chart::ChartErrorCategory_NONE ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -450,7 +451,7 @@ WrappedPercentageErrorProperty::WrappedPercentageErrorProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "PercentageError"
- , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -500,7 +501,7 @@ WrappedErrorMarginProperty::WrappedErrorMarginProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ErrorMargin"
- , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -547,7 +548,7 @@ WrappedErrorIndicatorProperty::WrappedErrorIndicatorProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< css::chart::ChartErrorIndicatorType >( "ErrorIndicator"
- , uno::Any( css::chart::ChartErrorIndicatorType_NONE ), spChart2ModelContact, ePropertyType )
+ , uno::Any( css::chart::ChartErrorIndicatorType_NONE ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -616,7 +617,7 @@ WrappedErrorBarStyleProperty::WrappedErrorBarStyleProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< sal_Int32 >( "ErrorBarStyle"
- , uno::Any( css::chart::ErrorBarStyle::NONE ), spChart2ModelContact, ePropertyType )
+ , uno::Any( css::chart::ErrorBarStyle::NONE ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -661,7 +662,7 @@ WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< OUString >( "ErrorBarRangePositive"
- , uno::Any( OUString() ), spChart2ModelContact, ePropertyType )
+ , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -724,7 +725,7 @@ WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< OUString >( "ErrorBarRangeNegative"
- , uno::Any( OUString() ), spChart2ModelContact, ePropertyType )
+ , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -784,7 +785,7 @@ WrappedRegressionCurvesProperty::WrappedRegressionCurvesProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< css::chart::ChartRegressionCurveType >( "RegressionCurves"
- , lcl_getRegressionDefault(), spChart2ModelContact, ePropertyType )
+ , lcl_getRegressionDefault(), std::move(spChart2ModelContact), ePropertyType )
{
}
@@ -852,7 +853,7 @@ WrappedStatisticPropertySetProperty::WrappedStatisticPropertySetProperty(
: (ePropertySetType == PROPERTY_SET_TYPE_ERROR_BAR)
? OUString("DataErrorProperties")
: OUString("DataMeanValueProperties")
- , uno::Any(), spChart2ModelContact, ePropertyType )
+ , uno::Any(), std::move(spChart2ModelContact), ePropertyType )
, m_eType( ePropertySetType )
{
}
diff --git a/chart2/source/controller/inc/uiobject.hxx b/chart2/source/controller/inc/uiobject.hxx
index 580db5ea71ba..31d1561b08f3 100644
--- a/chart2/source/controller/inc/uiobject.hxx
+++ b/chart2/source/controller/inc/uiobject.hxx
@@ -19,7 +19,7 @@ class ChartUIObject : public UIObject
{
public:
- ChartUIObject(VclPtr<chart::ChartWindow> xChartWindow,
+ ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
const OUString& rCID);
StringMap get_state() override;
@@ -48,7 +48,7 @@ class ChartWindowUIObject : public WindowUIObject
public:
- ChartWindowUIObject(VclPtr<chart::ChartWindow> xChartWindow);
+ ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow);
virtual StringMap get_state() override;
diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx
index 9bc0f05d7ce2..fa04a13d747f 100644
--- a/chart2/source/controller/uitest/uiobject.cxx
+++ b/chart2/source/controller/uitest/uiobject.cxx
@@ -20,7 +20,7 @@
#include <algorithm>
#include <iterator>
-ChartUIObject::ChartUIObject(VclPtr<chart::ChartWindow> xChartWindow,
+ChartUIObject::ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow,
const OUString& rCID):
maCID(rCID),
mxChartWindow(xChartWindow)
@@ -92,7 +92,7 @@ OUString ChartUIObject::get_type() const
return OUString("ChartUIObject for type: ");
}
-ChartWindowUIObject::ChartWindowUIObject(VclPtr<chart::ChartWindow> xChartWindow):
+ChartWindowUIObject::ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow):
WindowUIObject(xChartWindow),
mxChartWindow(xChartWindow)
{
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
index a8e30d1c1b1c..052fd1dd2783 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -105,7 +105,7 @@ class ScreenText : public Renderable3DObject
{
public:
ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache,
- const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText = false);
+ const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId, bool bIs3dText = false);
virtual void render() override;
void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight,
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index ebedc36800dd..37f327bb9b9b 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -127,7 +127,7 @@ void Text::setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, co
}
ScreenText::ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache,
- const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText):
+ const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId, bool bIs3dText):
Renderable3DObject(pRenderer, nId),
maText(rTextCache.getText(rStr,bIs3dText)),
maColor(rColor)