summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-13 13:13:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-13 16:04:27 +0200
commitb7c260aee331474d993bf96a72bf31f5af350ef3 (patch)
treedd054c07c69e2f711ecea8ebea3e7c78db34917d /chart2/source/model
parent24d15ba86c00178238f3f8ef6c548a0d19338aa4 (diff)
clang-tidy modernize-pass-by-value in chart2
Change-Id: I73ae444487571fb61a02a2c813c060d269d52a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/ChartModel.cxx5
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx5
-rw-r--r--chart2/source/model/main/Diagram.cxx5
-rw-r--r--chart2/source/model/template/ChartTypeManager.cxx5
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx5
5 files changed, 15 insertions, 10 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 712be3fdfa12..ed4830032d17 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -58,6 +58,7 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <sal/log.hxx>
+#include <utility>
#include <tools/diagnose_ex.h>
#include <libxml/xmlwriter.h>
@@ -84,7 +85,7 @@ constexpr OUStringLiteral lcl_aGDIMetaFileMIMETypeHighContrast(
namespace chart
{
-ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
+ChartModel::ChartModel(uno::Reference<uno::XComponentContext > xContext)
: m_aLifeTimeManager( this, this )
, m_bReadOnly( false )
, m_bModified( false )
@@ -93,7 +94,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
, mbTimeBased(false)
, m_aControllers( m_aModelMutex )
, m_nControllerLockCount(0)
- , m_xContext( xContext )
+ , m_xContext(std::move( xContext ))
, m_aVisualAreaSize( ChartModelHelper::getDefaultPageSize() )
, m_xPageBackground( new PageBackground )
, m_xXMLNamespaceMap( new NameContainer() )
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index a88265374c8b..0e0925c89f82 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -56,6 +56,7 @@
#include <ucbhelper/content.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <utility>
#include <vcl/cvtgrf.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -77,8 +78,8 @@ namespace
{
struct lcl_PropNameEquals
{
- explicit lcl_PropNameEquals( const OUString & rStrToCompareWith ) :
- m_aStr( rStrToCompareWith )
+ explicit lcl_PropNameEquals( OUString aStrToCompareWith ) :
+ m_aStr(std::move( aStrToCompareWith ))
{}
bool operator() ( const beans::PropertyValue & rProp )
{
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index b1cfa0786f83..f6d746ff8cbc 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -44,6 +44,7 @@
#include <tools/diagnose_ex.h>
#include <algorithm>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans::PropertyAttribute;
@@ -245,9 +246,9 @@ void lcl_CloneCoordinateSystems(
namespace chart
{
-Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) :
+Diagram::Diagram( uno::Reference< uno::XComponentContext > xContext ) :
::property::OPropertySet( m_aMutex ),
- m_xContext( xContext ),
+ m_xContext(std::move( xContext )),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
// Set camera position to a default position (that should be set hard, so
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index b1abde3522f5..bc6c2fb75ac4 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -39,6 +39,7 @@
#include <iterator>
#include <o3tl/functional.hxx>
#include <map>
+#include <utility>
using namespace ::com::sun::star;
@@ -212,8 +213,8 @@ namespace chart
ChartTypeManager::ChartTypeManager(
uno::Reference<
- uno::XComponentContext > const & xContext ) :
- m_xContext( xContext )
+ uno::XComponentContext > xContext ) :
+ m_xContext(std::move( xContext ))
{}
ChartTypeManager::~ChartTypeManager()
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index bc27bea1e162..42c110b94917 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -42,6 +42,7 @@
#include <algorithm>
#include <cstddef>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
@@ -126,9 +127,9 @@ namespace chart
ChartTypeTemplate::ChartTypeTemplate(
Reference< uno::XComponentContext > const & xContext,
- const OUString & rServiceName ) :
+ OUString aServiceName ) :
m_xContext( xContext ),
- m_aServiceName( rServiceName )
+ m_aServiceName(std::move( aServiceName ))
{
}