summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 20:38:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 12:18:47 +0200
commitea014c324a9f5fff344c3fccdfcb0e5bcbe75d81 (patch)
tree9652136b3b3bfc58f3515f9e261af6a561170f7c
parentc7f8a54e05dab430cf2f5b3e1fa90e729c7a5601 (diff)
loplugin:moveparam in chart2
Change-Id: I6a47abf80f0f45bbb55bc9e0fe817f3c3650aff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123351 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx2
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx4
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx4
-rw-r--r--chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx2
-rw-r--r--chart2/source/inc/InternalData.hxx8
-rw-r--r--chart2/source/tools/InternalData.cxx16
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx40
-rw-r--r--chart2/source/view/axes/VPolarAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarAxis.hxx2
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx4
-rw-r--r--chart2/source/view/axes/VPolarGrid.hxx2
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx8
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.hxx2
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx4
-rw-r--r--chart2/source/view/charttypes/PieChart.hxx2
-rw-r--r--chart2/source/view/charttypes/Splines.cxx20
-rw-r--r--chart2/source/view/inc/PlotterBase.hxx2
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx4
-rw-r--r--chart2/source/view/main/PlotterBase.cxx4
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx8
-rw-r--r--chart2/source/view/main/VLegend.cxx4
-rw-r--r--chart2/source/view/main/VLegend.hxx2
26 files changed, 79 insertions, 79 deletions
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index 523b798c7893..1ed026597d73 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -80,7 +80,7 @@ public:
*/
void setChartDispatch(
const css::uno::Reference< css::frame::XDispatch >& rChartDispatch,
- const o3tl::sorted_vector< OUString > & rChartCommands );
+ o3tl::sorted_vector< OUString > && rChartCommands );
/** Returns the dispatch that is able to do the command given in rURL, if
implemented here. If the URL is not implemented here, it should be
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index e8551ba211d9..3bd6a5946ddf 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -589,7 +589,7 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
// the dispatch container will return "this" for all commands returned by
// impl_getAvailableCommands(). That means, for those commands dispatch()
// is called here at the ChartController.
- m_aDispatchContainer.setChartDispatch( pDispatch, impl_getAvailableCommands() );
+ m_aDispatchContainer.setChartDispatch( pDispatch, o3tl::sorted_vector(impl_getAvailableCommands()) );
rtl::Reference<DrawCommandDispatch> pDrawDispatch = new DrawCommandDispatch( m_xCC, this );
pDrawDispatch->initialize();
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index dee4c961358e..daea97d4c7bf 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -59,11 +59,11 @@ void CommandDispatchContainer::setModel(
void CommandDispatchContainer::setChartDispatch(
const Reference< frame::XDispatch >& rChartDispatch,
- const o3tl::sorted_vector< OUString > & rChartCommands )
+ o3tl::sorted_vector< OUString > && rChartCommands )
{
OSL_ENSURE(rChartDispatch.is(),"Invalid fall back dispatcher!");
m_xChartDispatcher.set( rChartDispatch );
- m_aChartCommands = rChartCommands;
+ m_aChartCommands = std::move(rChartCommands);
m_aToBeDisposedDispatches.push_back( m_xChartDispatcher );
}
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 0378f7bbda6f..c12ece6699b5 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -283,7 +283,7 @@ ChartAreaPanel::ChartAreaPanel(weld::Widget* pParent,
std::vector<ObjectType> aAcceptedTypes { OBJECTTYPE_PAGE, OBJECTTYPE_DIAGRAM,
OBJECTTYPE_DATA_SERIES, OBJECTTYPE_DATA_POINT,
OBJECTTYPE_TITLE, OBJECTTYPE_LEGEND};
- mxSelectionListener->setAcceptedTypes(aAcceptedTypes);
+ mxSelectionListener->setAcceptedTypes(std::move(aAcceptedTypes));
Initialize();
}
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 1de557ec5aba..f50581a3e04f 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -137,7 +137,7 @@ ChartLinePanel::ChartLinePanel(weld::Widget* pParent,
OBJECTTYPE_DATA_SERIES, OBJECTTYPE_DATA_POINT,
OBJECTTYPE_TITLE, OBJECTTYPE_LEGEND, OBJECTTYPE_DATA_CURVE,
OBJECTTYPE_DATA_AVERAGE_LINE, OBJECTTYPE_AXIS};
- mxSelectionListener->setAcceptedTypes(aAcceptedTypes);
+ mxSelectionListener->setAcceptedTypes(std::move(aAcceptedTypes));
Initialize();
}
diff --git a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
index 0c8018eb09c3..c3757a3b877a 100644
--- a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
+++ b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
@@ -74,9 +74,9 @@ void ChartSidebarSelectionListener::disposing(const css::lang::EventObject& /*rE
mpParent = nullptr;
}
-void ChartSidebarSelectionListener::setAcceptedTypes(const std::vector<ObjectType>& aTypes)
+void ChartSidebarSelectionListener::setAcceptedTypes(std::vector<ObjectType>&& aTypes)
{
- maTypes = aTypes;
+ maTypes = std::move(aTypes);
}
}
diff --git a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx
index 44bae13651e1..e8cea5003fa0 100644
--- a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx
+++ b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx
@@ -40,7 +40,7 @@ public:
virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent) override;
- void setAcceptedTypes(const std::vector<ObjectType>& aTypes);
+ void setAcceptedTypes(std::vector<ObjectType>&& aTypes);
private:
ChartSidebarSelectionListenerParent* mpParent;
diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx
index c7407d17fb11..9d9abeb3a7c0 100644
--- a/chart2/source/inc/InternalData.hxx
+++ b/chart2/source/inc/InternalData.hxx
@@ -42,8 +42,8 @@ public:
void setColumnValues( sal_Int32 nColumnIndex, const std::vector< double > & rNewData );
void setRowValues( sal_Int32 nRowIndex, const std::vector< double > & rNewData );
- void setComplexColumnLabel( sal_Int32 nColumnIndex, const std::vector< css::uno::Any >& rComplexLabel );
- void setComplexRowLabel( sal_Int32 nRowIndex, const std::vector< css::uno::Any >& rComplexLabel );
+ void setComplexColumnLabel( sal_Int32 nColumnIndex, std::vector< css::uno::Any >&& rComplexLabel );
+ void setComplexRowLabel( sal_Int32 nRowIndex, std::vector< css::uno::Any >&& rComplexLabel );
std::vector< css::uno::Any > getComplexColumnLabel( sal_Int32 nColumnIndex ) const;
std::vector< css::uno::Any > getComplexRowLabel( sal_Int32 nRowIndex ) const;
@@ -66,9 +66,9 @@ public:
typedef std::vector< std::vector< css::uno::Any > > tVecVecAny; //inner index is hierarchical level
- void setComplexRowLabels( const tVecVecAny& rNewRowLabels );
+ void setComplexRowLabels( tVecVecAny&& rNewRowLabels );
const tVecVecAny& getComplexRowLabels() const;
- void setComplexColumnLabels( const tVecVecAny& rNewColumnLabels );
+ void setComplexColumnLabels( tVecVecAny&& rNewColumnLabels );
const tVecVecAny& getComplexColumnLabels() const;
void dump() const;
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index 1f5bcddc6c82..b93dbe33ae88 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -194,7 +194,7 @@ void InternalData::setRowValues( sal_Int32 nRowIndex, const vector< double > & r
m_aData[ std::slice( nRowIndex*m_nColumnCount, m_nColumnCount, 1 ) ]= aSlice;
}
-void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, const vector< uno::Any >& rComplexLabel )
+void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, vector< uno::Any >&& rComplexLabel )
{
if( nColumnIndex < 0 )
return;
@@ -203,12 +203,12 @@ void InternalData::setComplexColumnLabel( sal_Int32 nColumnIndex, const vector<
m_aColumnLabels.resize(nColumnIndex+1);
enlargeData( nColumnIndex+1, 0 );
}
- m_aColumnLabels[nColumnIndex]=rComplexLabel;
+ m_aColumnLabels[nColumnIndex] = std::move(rComplexLabel);
dump();
}
-void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, const vector< uno::Any >& rComplexLabel )
+void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, vector< uno::Any >&& rComplexLabel )
{
if( nRowIndex < 0 )
return;
@@ -225,7 +225,7 @@ void InternalData::setComplexRowLabel( sal_Int32 nRowIndex, const vector< uno::A
}
else
{
- m_aRowLabels[nRowIndex] = rComplexLabel;
+ m_aRowLabels[nRowIndex] = std::move(rComplexLabel);
}
}
@@ -468,9 +468,9 @@ void InternalData::deleteRow( sal_Int32 nAtIndex )
dump();
}
-void InternalData::setComplexRowLabels( const tVecVecAny& rNewRowLabels )
+void InternalData::setComplexRowLabels( tVecVecAny&& rNewRowLabels )
{
- m_aRowLabels = rNewRowLabels;
+ m_aRowLabels = std::move(rNewRowLabels);
sal_Int32 nNewRowCount = static_cast< sal_Int32 >( m_aRowLabels.size() );
if( nNewRowCount < m_nRowCount )
m_aRowLabels.resize( m_nRowCount );
@@ -483,9 +483,9 @@ const InternalData::tVecVecAny& InternalData::getComplexRowLabels() const
return m_aRowLabels;
}
-void InternalData::setComplexColumnLabels( const tVecVecAny& rNewColumnLabels )
+void InternalData::setComplexColumnLabels( tVecVecAny&& rNewColumnLabels )
{
- m_aColumnLabels = rNewColumnLabels;
+ m_aColumnLabels = std::move(rNewColumnLabels);
sal_Int32 nNewColumnCount = static_cast< sal_Int32 >( m_aColumnLabels.size() );
if( nNewColumnCount < m_nColumnCount )
m_aColumnLabels.resize( m_nColumnCount );
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index abbcc077e1c0..ccbf8697c638 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -374,9 +374,9 @@ InternalDataProvider::InternalDataProvider(
}
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aNewCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aNewCategories) );
else
- m_aInternalData.setComplexColumnLabels( aNewCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aNewCategories) );
if( bConnectToModel )
DiagramHelper::setCategoriesToDiagram( new LabeledDataSequence(
createDataSequenceByRangeRepresentation( lcl_aCategoriesRangeName )), xDiagram );
@@ -633,7 +633,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, st
}
std::vector<uno::Any> aLabels(1,
bStoreNumeric ? uno::Any(fValue) : uno::Any(aRawElems[i]));
- m_aInternalData.setComplexRowLabel(i, aLabels);
+ m_aInternalData.setComplexRowLabel(i, std::move(aLabels));
}
xSeq.set(new UncachedDataSequence(this, lcl_aCategoriesRangeName));
@@ -647,7 +647,7 @@ InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, st
if (!aRawElems.empty() && nColSize)
{
std::vector<uno::Any> aLabels(1, uno::Any(aRawElems[0]));
- m_aInternalData.setComplexColumnLabel(nColSize-1, aLabels);
+ m_aInternalData.setComplexColumnLabel(nColSize-1, std::move(aLabels));
OUString aRangeRep = lcl_aLabelRangePrefix + OUString::number(nColSize-1);
xSeq.set(new UncachedDataSequence(this, aRangeRep));
@@ -956,17 +956,17 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
{
sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
if( m_bDataInColumns )
- m_aInternalData.setComplexColumnLabel( nIndex, aNewVector );
+ m_aInternalData.setComplexColumnLabel( nIndex, std::move(aNewVector) );
else
- m_aInternalData.setComplexRowLabel( nIndex, aNewVector );
+ m_aInternalData.setComplexRowLabel( nIndex, std::move(aNewVector) );
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabel( nPointIndex, aNewVector );
+ m_aInternalData.setComplexRowLabel( nPointIndex, std::move(aNewVector) );
else
- m_aInternalData.setComplexColumnLabel( nPointIndex, aNewVector );
+ m_aInternalData.setComplexColumnLabel( nPointIndex, std::move(aNewVector) );
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
@@ -983,9 +983,9 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
aComplexCategories.begin(), lcl_setAnyAtLevel(nLevel) );
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aComplexCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
else
- m_aInternalData.setComplexColumnLabels( aComplexCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aComplexCategories) );
}
else if( aRange == lcl_aCategoriesRangeName )
{
@@ -994,9 +994,9 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
transform( aComplexCategories.begin(), aComplexCategories.end(), aNewVector.begin(),
aComplexCategories.begin(), lcl_setAnyAtLevel(0) );
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aComplexCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
else
- m_aInternalData.setComplexColumnLabels( aComplexCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aComplexCategories) );
}
else
{
@@ -1060,9 +1060,9 @@ void SAL_CALL InternalDataProvider::insertComplexCategoryLevel( sal_Int32 nLevel
vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_insertAnyAtLevel(nLevel) );
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aComplexCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
else
- m_aInternalData.setComplexColumnLabels( aComplexCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aComplexCategories) );
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
std::for_each( aRange.first, aRange.second, lcl_setModified());
@@ -1076,9 +1076,9 @@ void SAL_CALL InternalDataProvider::deleteComplexCategoryLevel( sal_Int32 nLevel
vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
std::for_each( aComplexCategories.begin(), aComplexCategories.end(), lcl_removeAnyAtLevel(nLevel) );
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aComplexCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aComplexCategories) );
else
- m_aInternalData.setComplexColumnLabels( aComplexCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aComplexCategories) );
tSequenceMapRange aRange( m_aSequenceMap.equal_range( lcl_aCategoriesRangeName ));
std::for_each( aRange.first, aRange.second, lcl_setModified());
@@ -1402,9 +1402,9 @@ void SAL_CALL InternalDataProvider::setDateCategories( const Sequence< double >&
}
if( m_bDataInColumns )
- m_aInternalData.setComplexRowLabels( aNewCategories );
+ m_aInternalData.setComplexRowLabels( std::move(aNewCategories) );
else
- m_aInternalData.setComplexColumnLabels( aNewCategories );
+ m_aInternalData.setComplexColumnLabels( std::move(aNewCategories) );
}
// ____ XAnyDescriptionAccess ____
@@ -1459,7 +1459,7 @@ void SAL_CALL InternalDataProvider::setRowDescriptions( const Sequence< OUString
vector< vector< uno::Any > > aComplexDescriptions( aRowDescriptions.getLength() );
transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aRowDescriptions.getConstArray(),
aComplexDescriptions.begin(), lcl_setAnyAtLevelFromStringSequence(0) );
- m_aInternalData.setComplexRowLabels( aComplexDescriptions );
+ m_aInternalData.setComplexRowLabels( std::move(aComplexDescriptions) );
}
void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUString >& aColumnDescriptions )
@@ -1467,7 +1467,7 @@ void SAL_CALL InternalDataProvider::setColumnDescriptions( const Sequence< OUStr
vector< vector< uno::Any > > aComplexDescriptions( aColumnDescriptions.getLength() );
transform( aComplexDescriptions.begin(), aComplexDescriptions.end(), aColumnDescriptions.getConstArray(),
aComplexDescriptions.begin(), lcl_setAnyAtLevelFromStringSequence(0) );
- m_aInternalData.setComplexColumnLabels( aComplexDescriptions );
+ m_aInternalData.setComplexColumnLabels( std::move(aComplexDescriptions) );
}
Sequence< OUString > SAL_CALL InternalDataProvider::getRowDescriptions()
diff --git a/chart2/source/view/axes/VPolarAxis.cxx b/chart2/source/view/axes/VPolarAxis.cxx
index a12055aa5017..d9dfe08ec6f5 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -49,9 +49,9 @@ VPolarAxis::~VPolarAxis()
{
}
-void VPolarAxis::setIncrements( const std::vector< ExplicitIncrementData >& rIncrements )
+void VPolarAxis::setIncrements( std::vector< ExplicitIncrementData >&& rIncrements )
{
- m_aIncrements = rIncrements;
+ m_aIncrements = std::move(rIncrements);
}
bool VPolarAxis::isAnythingToDraw()
diff --git a/chart2/source/view/axes/VPolarAxis.hxx b/chart2/source/view/axes/VPolarAxis.hxx
index f169f810d804..42e22ae7dfe9 100644
--- a/chart2/source/view/axes/VPolarAxis.hxx
+++ b/chart2/source/view/axes/VPolarAxis.hxx
@@ -33,7 +33,7 @@ public:
, const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount );
- void setIncrements( const std::vector< ExplicitIncrementData >& rIncrements );
+ void setIncrements( std::vector< ExplicitIncrementData >&& rIncrements );
virtual bool isAnythingToDraw() override;
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 9233fd1d6472..b6a0fef73b8f 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -50,9 +50,9 @@ VPolarGrid::~VPolarGrid()
{
}
-void VPolarGrid::setIncrements( const std::vector< ExplicitIncrementData >& rIncrements )
+void VPolarGrid::setIncrements( std::vector< ExplicitIncrementData >&& rIncrements )
{
- m_aIncrements = rIncrements;
+ m_aIncrements = std::move(rIncrements);
}
void VPolarGrid::getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const
diff --git a/chart2/source/view/axes/VPolarGrid.hxx b/chart2/source/view/axes/VPolarGrid.hxx
index 7b39aeadcad2..304cdfe34b87 100644
--- a/chart2/source/view/axes/VPolarGrid.hxx
+++ b/chart2/source/view/axes/VPolarGrid.hxx
@@ -42,7 +42,7 @@ public:
virtual void createShapes() override;
- void setIncrements( const std::vector< ExplicitIncrementData >& rIncrements );
+ void setIncrements( std::vector< ExplicitIncrementData >&& rIncrements );
static void createLinePointSequence_ForAngleAxis(
css::drawing::PointSequenceSequence& rPoints
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 08f30252fc91..0c3e2aaa4d80 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -71,10 +71,10 @@ void VPolarRadiusAxis::initPlotter( const uno::Reference< drawing::XShapes >& x
m_apAxisWithLabels->initPlotter( xLogicTarget, xFinalTarget, xShapeFactory, rCID );
}
-void VPolarRadiusAxis::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis )
+void VPolarRadiusAxis::setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis )
{
- VPolarAxis::setScales( rScales, bSwapXAndYAxis );
- m_apAxisWithLabels->setScales( rScales, bSwapXAndYAxis );
+ VPolarAxis::setScales( std::vector(rScales), bSwapXAndYAxis );
+ m_apAxisWithLabels->setScales( std::move(rScales), bSwapXAndYAxis );
}
void VPolarRadiusAxis::initAxisLabelProperties( const css::awt::Size& rFontReferenceSize
@@ -154,7 +154,7 @@ void VPolarRadiusAxis::createShapes()
aAxis.setExplicitScaleAndIncrement( m_aScale, m_aIncrement );
aAxis.initPlotter(m_xLogicTarget,m_xFinalTarget,m_xShapeFactory, m_aCID );
aAxis.setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix( m_aMatrixScreenToScene ) );
- aAxis.setScales( m_pPosHelper->getScales(), false );
+ aAxis.setScales( std::vector(m_pPosHelper->getScales()), false );
aAxis.initAxisLabelProperties(m_aAxisLabelProperties.m_aFontReferenceSize,m_aAxisLabelProperties.m_aMaximumSpaceForLabels);
aAxis.createShapes();
}
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.hxx b/chart2/source/view/axes/VPolarRadiusAxis.hxx
index d0f7b5867c47..3d69154cee07 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.hxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.hxx
@@ -43,7 +43,7 @@ public:
virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix ) override;
- virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ) override;
+ virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis ) override;
virtual void setExplicitScaleAndIncrement(
const ExplicitScaleData& rScale
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 37d0426b4734..4c9dc95634bb 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -229,10 +229,10 @@ PieChart::~PieChart()
{
}
-void PieChart::setScales( const std::vector< ExplicitScaleData >& rScales, bool /* bSwapXAndYAxis */ )
+void PieChart::setScales( std::vector< ExplicitScaleData >&& rScales, bool /* bSwapXAndYAxis */ )
{
OSL_ENSURE(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence");
- m_pPosHelper->setScales( rScales, true );
+ m_pPosHelper->setScales( std::move(rScales), true );
}
drawing::Direction3D PieChart::getPreferredDiagramAspectRatio() const
diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx
index d4dd0255af6a..a7bb35827f77 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -44,7 +44,7 @@ public:
virtual void createShapes() override;
virtual void rearrangeLabelToAvoidOverlapIfRequested( const css::awt::Size& rPageSize ) override;
- virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ) override;
+ virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis ) override;
virtual void addSeries( std::unique_ptr<VDataSeries> pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot ) override;
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index 521b559776ee..f431abdf21b7 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -52,7 +52,7 @@ public:
derivation equal to this value at the x-value of the last point
of rSortedPoints
*/
- lcl_SplineCalculation( const tPointVecType & rSortedPoints,
+ lcl_SplineCalculation( tPointVecType && rSortedPoints,
double fY1FirstDerivation,
double fYnFirstDerivation );
@@ -62,7 +62,7 @@ public:
@param rSortedPoints the points for which splines shall be calculated,
they need to be sorted in x values. First and last y value must be equal
*/
- explicit lcl_SplineCalculation( const tPointVecType & rSortedPoints);
+ explicit lcl_SplineCalculation( tPointVecType && rSortedPoints);
/** @descr this function corresponds to the function splint in [1].
@@ -113,10 +113,10 @@ private:
};
lcl_SplineCalculation::lcl_SplineCalculation(
- const tPointVecType & rSortedPoints,
+ tPointVecType && rSortedPoints,
double fY1FirstDerivation,
double fYnFirstDerivation )
- : m_aPoints( rSortedPoints ),
+ : m_aPoints( std::move(rSortedPoints) ),
m_fYp1( fY1FirstDerivation ),
m_fYpN( fYnFirstDerivation ),
m_nKLow( 0 ),
@@ -127,8 +127,8 @@ lcl_SplineCalculation::lcl_SplineCalculation(
}
lcl_SplineCalculation::lcl_SplineCalculation(
- const tPointVecType & rSortedPoints)
- : m_aPoints( rSortedPoints ),
+ tPointVecType && rSortedPoints)
+ : m_aPoints( std::move(rSortedPoints) ),
m_fYp1( 0.0 ), /*dummy*/
m_fYpN( 0.0 ), /*dummy*/
m_nKLow( 0 ),
@@ -593,16 +593,16 @@ void SplineCalculater::CalculateCubicSplines(
pOldZ[ 0 ] == pOldZ[nMaxIndexPoints] &&
nMaxIndexPoints >=2 )
{ // periodic spline
- aSplineX.reset(new lcl_SplineCalculation( aInputX));
- aSplineY.reset(new lcl_SplineCalculation( aInputY));
+ aSplineX.reset(new lcl_SplineCalculation( std::move(aInputX)));
+ aSplineY.reset(new lcl_SplineCalculation( std::move(aInputY)));
// aSplineZ = new lcl_SplineCalculation( aInputZ) ;
}
else // generate the kind "natural spline"
{
double fXDerivation = std::numeric_limits<double>::infinity();
double fYDerivation = std::numeric_limits<double>::infinity();
- aSplineX.reset(new lcl_SplineCalculation( aInputX, fXDerivation, fXDerivation ));
- aSplineY.reset(new lcl_SplineCalculation( aInputY, fYDerivation, fYDerivation ));
+ aSplineX.reset(new lcl_SplineCalculation( std::move(aInputX), fXDerivation, fXDerivation ));
+ aSplineY.reset(new lcl_SplineCalculation( std::move(aInputY), fYDerivation, fYDerivation ));
}
// fill result polygon with calculated values
diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx
index e14413652f04..187f755f5318 100644
--- a/chart2/source/view/inc/PlotterBase.hxx
+++ b/chart2/source/view/inc/PlotterBase.hxx
@@ -53,7 +53,7 @@ public:
, const OUString& rCID
);
- virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
+ virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis );
virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix );
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index d687cb902453..30f1bc9a75c2 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -54,7 +54,7 @@ public:
virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix);
- virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis );
+ virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis );
const std::vector< ExplicitScaleData >& getScales() const { return m_aScales;}
//better performance for big data
@@ -149,7 +149,7 @@ public:
virtual std::unique_ptr<PlottingPositionHelper> clone() const override;
virtual void setTransformationSceneToScreen( const css::drawing::HomogenMatrix& rMatrix) override;
- virtual void setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis ) override;
+ virtual void setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis ) override;
const ::basegfx::B3DHomMatrix& getUnitCartesianToScene() const { return m_aUnitCartesianToScene;}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 6c150f3e0abf..72a58f80cc97 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2218,14 +2218,14 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
, awt::Rectangle & rRemainingSpace
, const awt::Size & rPageSize
, ChartModel& rModel
- , const std::vector< LegendEntryProvider* >& rLegendEntryProviderList
+ , std::vector< LegendEntryProvider* >&& rLegendEntryProviderList
, sal_Int16 nDefaultWritingMode )
{
if (!VLegend::isVisible(xLegend))
return false;
awt::Size rDefaultLegendSize;
- VLegend aVLegend( xLegend, xContext, rLegendEntryProviderList,
+ VLegend aVLegend( xLegend, xContext, std::move(rLegendEntryProviderList),
xPageShapes, xShapeFactory, rModel);
aVLegend.setDefaultWritingMode( nDefaultWritingMode );
aVLegend.createShapes( awt::Size( rRemainingSpace.Width, rRemainingSpace.Height ),
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index b3311b023cbf..7cf5515fd6bf 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -52,13 +52,13 @@ PlotterBase::~PlotterBase()
{
}
-void PlotterBase::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis )
+void PlotterBase::setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis )
{
if (!m_pPosHelper)
return;
OSL_PRECOND(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence");
- m_pPosHelper->setScales( rScales, bSwapXAndYAxis );
+ m_pPosHelper->setScales( std::move(rScales), bSwapXAndYAxis );
}
void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix)
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index ae499fa82fb9..300ecaddb68b 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -93,9 +93,9 @@ void PlottingPositionHelper::setTransformationSceneToScreen( const drawing::Homo
m_xTransformationLogicToScene = nullptr;
}
-void PlottingPositionHelper::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis )
+void PlottingPositionHelper::setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis )
{
- m_aScales = rScales;
+ m_aScales = std::move(rScales);
m_bSwapXAndY = bSwapXAndYAxis;
m_xTransformationLogicToScene = nullptr;
}
@@ -340,9 +340,9 @@ void PolarPlottingPositionHelper::setTransformationSceneToScreen( const drawing:
PlottingPositionHelper::setTransformationSceneToScreen( rMatrix);
m_aUnitCartesianToScene =impl_calculateMatrixUnitCartesianToScene( m_aMatrixScreenToScene );
}
-void PolarPlottingPositionHelper::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis )
+void PolarPlottingPositionHelper::setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis )
{
- PlottingPositionHelper::setScales( rScales, bSwapXAndYAxis );
+ PlottingPositionHelper::setScales( std::move(rScales), bSwapXAndYAxis );
m_aUnitCartesianToScene =impl_calculateMatrixUnitCartesianToScene( m_aMatrixScreenToScene );
}
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 1cc1303241a0..1f2ef6625c99 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -878,7 +878,7 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
VLegend::VLegend(
const Reference< XLegend > & xLegend,
const Reference< uno::XComponentContext > & xContext,
- const std::vector< LegendEntryProvider* >& rLegendEntryProviderList,
+ std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
const Reference< drawing::XShapes >& xTargetPage,
const Reference< lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel )
@@ -887,7 +887,7 @@ VLegend::VLegend(
, m_xLegend(xLegend)
, mrModel(rModel)
, m_xContext(xContext)
- , m_aLegendEntryProviderList(rLegendEntryProviderList)
+ , m_aLegendEntryProviderList(std::move(rLegendEntryProviderList))
, m_nDefaultWritingMode(text::WritingMode2::LR_TB)
{
}
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index ff13d83305fa..c037b38cdefc 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -41,7 +41,7 @@ class VLegend
public:
VLegend( const css::uno::Reference< css::chart2::XLegend > & xLegend,
const css::uno::Reference< css::uno::XComponentContext > & xContext,
- const std::vector< LegendEntryProvider* >& rLegendEntryProviderList,
+ std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
const css::uno::Reference< css::drawing::XShapes >& xTargetPage,
const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel );