summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 14:20:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 16:05:49 +0200
commitf477b54e01766fabc0179beec9aa3dc31b5824e2 (patch)
tree99efa8fffed5c397b3dc7974153bb3ffa49c872d
parent071c117ba551e579962ff5b70f79cb7934d96c77 (diff)
loplugin:moveparam in sc
Change-Id: I4b9d45a6b0231841a5fe00d0193a8530b9e05559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/inc/PivotTableDataSequence.hxx2
-rw-r--r--sc/inc/PivotTableDataSource.hxx2
-rw-r--r--sc/inc/addincol.hxx2
-rw-r--r--sc/inc/cellsuno.hxx2
-rw-r--r--sc/inc/chgtrack.hxx2
-rw-r--r--sc/inc/dapiuno.hxx2
-rw-r--r--sc/inc/dbdata.hxx2
-rw-r--r--sc/inc/dpgroup.hxx6
-rw-r--r--sc/inc/dpsave.hxx2
-rw-r--r--sc/inc/dpsdbtab.hxx6
-rw-r--r--sc/inc/dpshttab.hxx6
-rw-r--r--sc/inc/dptabdat.hxx6
-rw-r--r--sc/inc/markarr.hxx2
-rw-r--r--sc/inc/prnsave.hxx2
-rw-r--r--sc/inc/table.hxx4
-rw-r--r--sc/inc/tabprotection.hxx2
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/dpgroup.cxx32
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpsave.cxx4
-rw-r--r--sc/source/core/data/dpsdbtab.cxx8
-rw-r--r--sc/source/core/data/dpshttab.cxx4
-rw-r--r--sc/source/core/data/dptabsrc.cxx4
-rw-r--r--sc/source/core/data/markarr.cxx4
-rw-r--r--sc/source/core/data/markmulti.cxx5
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/data/table2.cxx8
-rw-r--r--sc/source/core/data/table3.cxx6
-rw-r--r--sc/source/core/data/table5.cxx8
-rw-r--r--sc/source/core/data/tabprotection.cxx10
-rw-r--r--sc/source/core/tool/addincol.cxx6
-rw-r--r--sc/source/core/tool/chgtrack.cxx4
-rw-r--r--sc/source/core/tool/dbdata.cxx4
-rw-r--r--sc/source/core/tool/prnsave.cxx4
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx6
-rw-r--r--sc/source/filter/excel/xichart.cxx6
-rw-r--r--sc/source/filter/excel/xicontent.cxx4
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xistream.cxx12
-rw-r--r--sc/source/filter/excel/xistyle.cxx4
-rw-r--r--sc/source/filter/inc/xepivotxml.hxx2
-rw-r--r--sc/source/filter/inc/xichart.hxx2
-rw-r--r--sc/source/filter/inc/xistream.hxx22
-rw-r--r--sc/source/filter/inc/xistring.hxx2
-rw-r--r--sc/source/filter/oox/tablecolumnsbuffer.cxx2
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/pivotsource.cxx8
-rw-r--r--sc/source/filter/xml/pivotsource.hxx4
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx12
-rw-r--r--sc/source/filter/xml/xmldpimp.hxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/filter/xml/xmltransformationi.cxx14
-rw-r--r--sc/source/ui/dataprovider/csvdataprovider.cxx6
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx32
-rw-r--r--sc/source/ui/dataprovider/htmldataprovider.cxx8
-rw-r--r--sc/source/ui/dataprovider/sqldataprovider.cxx8
-rw-r--r--sc/source/ui/dataprovider/xmldataprovider.cxx13
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx8
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx8
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/inc/csvgrid.hxx4
-rw-r--r--sc/source/ui/inc/dataprovider.hxx2
-rw-r--r--sc/source/ui/inc/datatransformation.hxx16
-rw-r--r--sc/source/ui/inc/namedefdlg.hxx2
-rw-r--r--sc/source/ui/inc/optsolver.hxx2
-rw-r--r--sc/source/ui/inc/undoblk.hxx4
-rw-r--r--sc/source/ui/inc/undotab.hxx6
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx84
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx8
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx4
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undoblk2.cxx4
-rw-r--r--sc/source/ui/undo/undotab.cxx12
-rw-r--r--sc/source/ui/unoobj/PivotTableDataProvider.cxx12
-rw-r--r--sc/source/ui/unoobj/PivotTableDataSequence.cxx6
-rw-r--r--sc/source/ui/unoobj/PivotTableDataSource.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx12
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx2
-rw-r--r--sc/source/ui/vba/vbafiledialogitems.cxx8
-rw-r--r--sc/source/ui/vba/vbafiledialogitems.hxx4
-rw-r--r--sc/source/ui/vba/vbawindow.cxx5
-rw-r--r--sc/source/ui/vba/vbawindows.cxx5
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx8
-rw-r--r--sc/source/ui/view/tabview3.cxx4
-rw-r--r--sc/source/ui/view/tabvwshc.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx10
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx8
91 files changed, 314 insertions, 314 deletions
diff --git a/sc/inc/PivotTableDataSequence.hxx b/sc/inc/PivotTableDataSequence.hxx
index 43128b689b3c..a5723725297e 100644
--- a/sc/inc/PivotTableDataSequence.hxx
+++ b/sc/inc/PivotTableDataSequence.hxx
@@ -81,7 +81,7 @@ class PivotTableDataSequence final : public PivotTableDataSequence_Base, public
{
public:
explicit PivotTableDataSequence(ScDocument* pDocument,
- OUString const & sID, std::vector<ValueAndFormat> const & rData);
+ OUString const & sID, std::vector<ValueAndFormat>&& rData);
virtual ~PivotTableDataSequence() override;
PivotTableDataSequence(const PivotTableDataSequence&) = delete;
diff --git a/sc/inc/PivotTableDataSource.hxx b/sc/inc/PivotTableDataSource.hxx
index b322779573e2..636746b79cc0 100644
--- a/sc/inc/PivotTableDataSource.hxx
+++ b/sc/inc/PivotTableDataSource.hxx
@@ -28,7 +28,7 @@ typedef cppu::WeakImplHelper<css::chart2::data::XDataSource,
class PivotTableDataSource final : public PivotTableDataSource_Base, public SfxListener
{
public:
- explicit PivotTableDataSource(const std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence);
+ explicit PivotTableDataSource(std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>&& xLabeledSequence);
virtual ~PivotTableDataSource() override;
virtual void Notify(SfxBroadcaster& rBroadcaster, const SfxHint& rHint) override;
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index 98001ba46ef5..b2797fd9c01d 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -129,7 +129,7 @@ public:
const css::uno::Any& rNewObj );
void SetArguments( tools::Long nNewCount, const ScAddInArgDesc* pNewDescs );
void SetCallerPos( tools::Long nNewPos );
- void SetCompNames( const ::std::vector< LocalizedName >& rNew );
+ void SetCompNames( ::std::vector< LocalizedName >&& rNew );
};
class SC_DLLPUBLIC ScUnoAddInCollection
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 3d2080a29224..1d104fa27ed8 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -1205,7 +1205,7 @@ private:
sal_Int32 nCurrentPosition;
public:
- ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, const std::vector<ScRangeList>& rRangeLists);
+ ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, std::vector<ScRangeList>&& rRangeLists);
virtual ~ScUniqueCellFormatsEnumeration() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 93df1ccdd4a7..2806d75096fb 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -950,7 +950,7 @@ public:
SCSIZE ComputeContentSlot( sal_Int32 nRow ) const;
SC_DLLPUBLIC ScChangeTrack( ScDocument& );
- ScChangeTrack(ScDocument& rDocP, const std::set<OUString>& aTempUserCollection); // only to use in the XML import
+ ScChangeTrack(ScDocument& rDocP, std::set<OUString>&& aTempUserCollection); // only to use in the XML import
SC_DLLPUBLIC virtual ~ScChangeTrack() override;
void Clear();
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index ac68a31e88f0..86d2d56893b5 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -500,7 +500,7 @@ ScDataPilotFieldGroupsObjImpl;
class ScDataPilotFieldGroupsObj final : public ScDataPilotFieldGroupsObjImpl
{
public:
- explicit ScDataPilotFieldGroupsObj( const ScFieldGroups& rGroups );
+ explicit ScDataPilotFieldGroupsObj( ScFieldGroups&& rGroups );
virtual ~ScDataPilotFieldGroupsObj() override;
// XNameAccess
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 4f328ce88a6a..3a0b0b2a8bb0 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -145,7 +145,7 @@ public:
ScRange GetHeaderArea() const;
void StartTableColumnNamesListener();
void EndTableColumnNamesListener();
- SC_DLLPUBLIC void SetTableColumnNames( const ::std::vector< OUString >& rNames );
+ SC_DLLPUBLIC void SetTableColumnNames( ::std::vector< OUString >&& rNames );
SC_DLLPUBLIC const ::std::vector< OUString >& GetTableColumnNames() const { return maTableColumnNames; }
bool AreTableColumnNamesDirty() const { return mbTableColumnNamesDirty; }
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index a76d97ec7726..f7dd09b0de2f 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -156,9 +156,9 @@ public:
virtual bool IsRepeatIfEmpty() override;
virtual void CreateCacheTable() override;
- virtual void FilterCacheTable(const std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rDataDims) override;
- virtual void GetDrillDownData(const std::vector<ScDPFilteredCache::Criterion>& rCriteria,
- const std::unordered_set<sal_Int32>& rCatDims,
+ virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rDataDims) override;
+ virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
+ std::unordered_set<sal_Int32>&& rCatDims,
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
virtual const ScDPFilteredCache& GetCacheTable() const override;
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 14f7a322ef88..bdf5434b5287 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -145,7 +145,7 @@ public:
void SetName( const OUString& rNew ); // used if the source dim was renamed (groups)
void SetOrientation(css::sheet::DataPilotFieldOrientation nNew);
- void SetSubTotals(std::vector<ScGeneralFunction> const & rFuncs);
+ void SetSubTotals(std::vector<ScGeneralFunction> && rFuncs);
tools::Long GetSubTotalsCount() const
{ return maSubTotalFuncs.size(); }
diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx
index 611f31f25fbe..599e832e1bae 100644
--- a/sc/inc/dpsdbtab.hxx
+++ b/sc/inc/dpsdbtab.hxx
@@ -70,9 +70,9 @@ public:
virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
virtual void CreateCacheTable() override;
- virtual void FilterCacheTable(const ::std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rDataDims) override;
- virtual void GetDrillDownData(const ::std::vector<ScDPFilteredCache::Criterion>& rCriteria,
- const std::unordered_set<sal_Int32>& rCatDims,
+ virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rDataDims) override;
+ virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
+ std::unordered_set<sal_Int32>&& rCatDims,
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
virtual const ScDPFilteredCache& GetCacheTable() const override;
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index c34482bc2105..3299771b4214 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -107,9 +107,9 @@ public:
virtual bool IsRepeatIfEmpty() override;
virtual void CreateCacheTable() override;
- virtual void FilterCacheTable(const std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims) override;
- virtual void GetDrillDownData(const std::vector<ScDPFilteredCache::Criterion>& rCriteria,
- const std::unordered_set<sal_Int32>& rCatDims,
+ virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims) override;
+ virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
+ std::unordered_set<sal_Int32>&& rCatDims,
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
virtual const ScDPFilteredCache& GetCacheTable() const override;
diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx
index 15c5b87f481b..4f1a46379584 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -109,9 +109,9 @@ public:
virtual bool IsRepeatIfEmpty();
virtual void CreateCacheTable() = 0;
- virtual void FilterCacheTable(const std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rDataDims) = 0;
- virtual void GetDrillDownData(const std::vector<ScDPFilteredCache::Criterion>& rCriteria,
- const std::unordered_set<sal_Int32>& rCatDims,
+ virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rDataDims) = 0;
+ virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
+ std::unordered_set<sal_Int32>&& rCatDims,
css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) = 0;
virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) = 0;
virtual const ScDPFilteredCache& GetCacheTable() const = 0;
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index 601d1b4750bc..de0b3361cfab 100644
--- a/sc/inc/markarr.hxx
+++ b/sc/inc/markarr.hxx
@@ -56,7 +56,7 @@ public:
void Reset( bool bMarked = false, SCSIZE nNeeded = 1 );
bool GetMark( SCROW nRow ) const;
void SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked );
- void Set( std::vector<ScMarkEntry> const & );
+ void Set( std::vector<ScMarkEntry> && );
bool IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const;
bool HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const;
diff --git a/sc/inc/prnsave.hxx b/sc/inc/prnsave.hxx
index c1aaf755fb1b..ef6f50d587dc 100644
--- a/sc/inc/prnsave.hxx
+++ b/sc/inc/prnsave.hxx
@@ -36,7 +36,7 @@ public:
ScPrintSaverTab();
~ScPrintSaverTab();
- void SetAreas( const ScRangeVec& rRanges, bool bEntireSheet );
+ void SetAreas( ScRangeVec&& rRanges, bool bEntireSheet );
void SetRepeat( const ScRange* pCol, const ScRange* pRow );
const ScRangeVec& GetPrintRanges() const { return maPrintRanges; }
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index c31fd065cc43..cfe47f5f73e1 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -881,8 +881,8 @@ public:
void UpdatePageBreaks( const ScRange* pUserArea );
void RemoveManualBreaks();
bool HasManualBreaks() const;
- void SetRowManualBreaks( const ::std::set<SCROW>& rBreaks );
- void SetColManualBreaks( const ::std::set<SCCOL>& rBreaks );
+ void SetRowManualBreaks( ::std::set<SCROW>&& rBreaks );
+ void SetColManualBreaks( ::std::set<SCCOL>&& rBreaks );
void GetAllRowBreaks(::std::set<SCROW>& rBreaks, bool bPage, bool bManual) const;
void GetAllColBreaks(::std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const;
diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx
index 58e92c7a6478..2ff6188154d5 100644
--- a/sc/inc/tabprotection.hxx
+++ b/sc/inc/tabprotection.hxx
@@ -210,7 +210,7 @@ public:
bool isOptionEnabled(Option eOption) const;
void setOption(Option eOption, bool bEnabled);
- void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt );
+ void setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt );
const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const;
bool updateReference( UpdateRefMode, const ScDocument&, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz );
bool isBlockEditable( const ScRange& rRange ) const;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 10bf90b7d275..15c65896ec90 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -133,12 +133,12 @@ std::pair<SCTAB,SCTAB> getMarkedTableRange(const std::vector<ScTableUniquePtr>&
return std::pair<SCTAB,SCTAB>(nTabStart,nTabEnd);
}
-void collectUIInformation(const std::map<OUString, OUString>& aParameters, const OUString& rAction)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUString& rAction)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = rAction;
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index a379011e62fe..52bc6476f01a 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -49,7 +49,7 @@ namespace {
class ScDPGroupNumFilter : public ScDPFilteredCache::FilterBase
{
public:
- ScDPGroupNumFilter(const std::vector<ScDPItemData>& rValues, const ScDPNumGroupInfo& rInfo);
+ ScDPGroupNumFilter(std::vector<ScDPItemData>&& rValues, const ScDPNumGroupInfo& rInfo);
virtual bool match(const ScDPItemData &rCellData) const override;
virtual std::vector<ScDPItemData> getMatchValues() const override;
@@ -60,8 +60,8 @@ private:
}
-ScDPGroupNumFilter::ScDPGroupNumFilter(const std::vector<ScDPItemData>& rValues, const ScDPNumGroupInfo& rInfo) :
- maValues(rValues), maNumInfo(rInfo) {}
+ScDPGroupNumFilter::ScDPGroupNumFilter( std::vector<ScDPItemData>&& rValues, const ScDPNumGroupInfo& rInfo) :
+ maValues(std::move(rValues)), maNumInfo(rInfo) {}
bool ScDPGroupNumFilter::match(const ScDPItemData& rCellData) const
{
@@ -110,7 +110,7 @@ class ScDPGroupDateFilter : public ScDPFilteredCache::FilterBase
{
public:
ScDPGroupDateFilter(
- const std::vector<ScDPItemData>& rValues, const Date& rNullDate, const ScDPNumGroupInfo& rNumInfo);
+ std::vector<ScDPItemData>&& rValues, const Date& rNullDate, const ScDPNumGroupInfo& rNumInfo);
virtual bool match(const ScDPItemData & rCellData) const override;
virtual std::vector<ScDPItemData> getMatchValues() const override;
@@ -124,8 +124,8 @@ private:
}
ScDPGroupDateFilter::ScDPGroupDateFilter(
- const std::vector<ScDPItemData>& rValues, const Date& rNullDate, const ScDPNumGroupInfo& rNumInfo) :
- maValues(rValues),
+ std::vector<ScDPItemData>&& rValues, const Date& rNullDate, const ScDPNumGroupInfo& rNumInfo) :
+ maValues(std::move(rValues)),
maNullDate(rNullDate),
maNumInfo(rNumInfo)
{
@@ -679,13 +679,13 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
// grouped by dates.
aCri.mpFilter =
std::make_shared<ScDPGroupDateFilter>(
- aMatchValues, pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
+ std::move(aMatchValues), pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
}
else
{
// This dimension is grouped by numeric ranges.
aCri.mpFilter =
- std::make_shared<ScDPGroupNumFilter>(aMatchValues, *pNumInfo);
+ std::make_shared<ScDPGroupNumFilter>(std::move(aMatchValues), *pNumInfo);
}
aNewCriteria.push_back(aCri);
@@ -712,7 +712,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
aCri.mnFieldIndex = nSrcDim; // use the source dimension, not the group dimension.
aCri.mpFilter =
std::make_shared<ScDPGroupDateFilter>(
- aMatchValues, pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
+ std::move(aMatchValues), pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
aNewCriteria.push_back(aCri);
}
@@ -747,18 +747,16 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
rCriteria.swap(aNewCriteria);
}
-void ScDPGroupTableData::FilterCacheTable(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims)
+void ScDPGroupTableData::FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims)
{
- vector<ScDPFilteredCache::Criterion> aNewCriteria(rCriteria);
- ModifyFilterCriteria(aNewCriteria);
- pSourceData->FilterCacheTable(aNewCriteria, rCatDims);
+ ModifyFilterCriteria(rCriteria);
+ pSourceData->FilterCacheTable(std::move(rCriteria), std::move(rCatDims));
}
-void ScDPGroupTableData::GetDrillDownData(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
+void ScDPGroupTableData::GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&&rCatDims, Sequence< Sequence<Any> >& rData)
{
- vector<ScDPFilteredCache::Criterion> aNewCriteria(rCriteria);
- ModifyFilterCriteria(aNewCriteria);
- pSourceData->GetDrillDownData(aNewCriteria, rCatDims, rData);
+ ModifyFilterCriteria(rCriteria);
+ pSourceData->GetDrillDownData(std::move(rCriteria), std::move(rCatDims), rData);
}
void ScDPGroupTableData::CalcResults(CalcInfo& rInfo, bool bAutoShow)
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 0e4d583b9391..f46bf21d5694 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2678,7 +2678,7 @@ void ScDPObject::ConvertOrientation(
nSubTotalFuncs.push_back( ScDataPilotConversion::FirstFunc( static_cast<PivotFunc>(nMask) ) );
nMask *= 2;
}
- pDim->SetSubTotals( nSubTotalFuncs );
+ pDim->SetSubTotals( std::move(nSubTotalFuncs) );
// ShowEmpty was implicit in old tables,
// must be set for data layout dimension (not accessible in dialog)
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index cb8e56e6d6fa..d9bc8d722a8b 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -319,9 +319,9 @@ void ScDPSaveDimension::SetOrientation(css::sheet::DataPilotFieldOrientation nNe
nOrientation = nNew;
}
-void ScDPSaveDimension::SetSubTotals(std::vector<ScGeneralFunction> const & rFuncs)
+void ScDPSaveDimension::SetSubTotals(std::vector<ScGeneralFunction> && rFuncs)
{
- maSubTotalFuncs = rFuncs;
+ maSubTotalFuncs = std::move(rFuncs);
bSubTotalDefault = false;
}
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 0eaa46dc6422..b56217c27f43 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -122,14 +122,14 @@ void ScDatabaseDPData::CreateCacheTable()
aCacheTable.fillTable();
}
-void ScDatabaseDPData::FilterCacheTable(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims)
+void ScDatabaseDPData::FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims)
{
CreateCacheTable();
aCacheTable.filterByPageDimension(
- rCriteria, (IsRepeatIfEmpty() ? rCatDims : std::unordered_set<sal_Int32>()));
+ rCriteria, (IsRepeatIfEmpty() ? std::move(rCatDims) : std::unordered_set<sal_Int32>()));
}
-void ScDatabaseDPData::GetDrillDownData(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
+void ScDatabaseDPData::GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims, Sequence< Sequence<Any> >& rData)
{
CreateCacheTable();
sal_Int32 nRowSize = aCacheTable.getRowSize();
@@ -137,7 +137,7 @@ void ScDatabaseDPData::GetDrillDownData(const vector<ScDPFilteredCache::Criterio
return;
aCacheTable.filterTable(
- rCriteria, rData, IsRepeatIfEmpty() ? rCatDims : std::unordered_set<sal_Int32>());
+ rCriteria, rData, IsRepeatIfEmpty() ? std::move(rCatDims) : std::unordered_set<sal_Int32>());
}
void ScDatabaseDPData::CalcResults(CalcInfo& rInfo, bool bAutoShow)
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index dba57fde08da..a5fd1bd01d5b 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -174,14 +174,14 @@ void ScSheetDPData::CreateCacheTable()
aCacheTable.fillTable(aQuery, bIgnoreEmptyRows, bRepeatIfEmpty);
}
-void ScSheetDPData::FilterCacheTable(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims)
+void ScSheetDPData::FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims)
{
CreateCacheTable();
aCacheTable.filterByPageDimension(
rCriteria, (IsRepeatIfEmpty() ? rCatDims : std::unordered_set<sal_Int32>()));
}
-void ScSheetDPData::GetDrillDownData(const vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims, Sequence< Sequence<Any> >& rData)
+void ScSheetDPData::GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims, Sequence< Sequence<Any> >& rData)
{
CreateCacheTable();
sal_Int32 nRowSize = aCacheTable.getRowSize();
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 24ef497b3424..0b7410dd4d52 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -469,7 +469,7 @@ Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<s
Sequence< Sequence<Any> > aTabData;
std::unordered_set<sal_Int32> aCatDims;
GetCategoryDimensionIndices(aCatDims);
- pData->GetDrillDownData(aFilterCriteria, aCatDims, aTabData);
+ pData->GetDrillDownData(std::move(aFilterCriteria), std::move(aCatDims), aTabData);
return aTabData;
}
@@ -729,7 +729,7 @@ void ScDPSource::FilterCacheByPageDimensions()
{
std::unordered_set<sal_Int32> aCatDims;
GetCategoryDimensionIndices(aCatDims);
- pData->FilterCacheTable(aCriteria, aCatDims);
+ pData->FilterCacheTable(std::move(aCriteria), std::move(aCatDims));
bPageFiltered = true;
}
}
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index 9b1d3d834659..69379edbc742 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -213,9 +213,9 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked )
optimised init-from-range-list. Specifically this is optimised for cases
where we have very large data columns with lots and lots of ranges.
*/
-void ScMarkArray::Set( const std::vector<ScMarkEntry> & rMarkEntries )
+void ScMarkArray::Set( std::vector<ScMarkEntry> && rMarkEntries )
{
- mvData = rMarkEntries;
+ mvData = std::move(rMarkEntries);
}
bool ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
diff --git a/sc/source/core/data/markmulti.cxx b/sc/source/core/data/markmulti.cxx
index 3a41f8c51b17..c2396821a597 100644
--- a/sc/source/core/data/markmulti.cxx
+++ b/sc/source/core/data/markmulti.cxx
@@ -300,10 +300,7 @@ void ScMultiSel::Set( ScRangeList const & rList )
aMultiSelContainer.resize(nMaxCol+1, ScMarkArray(mrSheetLimits));
for (SCCOL nCol = 0; nCol<=nMaxCol; ++nCol)
if (!aMarkEntriesPerCol[nCol].empty())
- {
- aMultiSelContainer[nCol].Set( aMarkEntriesPerCol[nCol] );
- aMarkEntriesPerCol[nCol].clear(); // reduce peak memory usage
- }
+ aMultiSelContainer[nCol].Set( std::move(aMarkEntriesPerCol[nCol]) );
}
bool ScMultiSel::IsRowMarked( SCROW nRow ) const
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 3974ad7f5a9e..d613ec905575 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2262,7 +2262,7 @@ const ScRange* ScTable::GetPrintRange(sal_uInt16 nPos) const
void ScTable::FillPrintSaver( ScPrintSaverTab& rSaveTab ) const
{
- rSaveTab.SetAreas( aPrintRanges, bPrintEntireSheet );
+ rSaveTab.SetAreas( std::vector(aPrintRanges), bPrintEntireSheet );
rSaveTab.SetRepeat( pRepeatColRange.get(), pRepeatRowRange.get() );
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index be9f92a3239d..869ebb1fdb24 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1380,7 +1380,7 @@ void ScTable::CopyToTable(
++destTabColWidthIt;
++thisTabColWidthIt;
}
- pDestTab->SetColManualBreaks( maColManualBreaks);
+ pDestTab->SetColManualBreaks( std::set(maColManualBreaks) );
}
if (bHeight)
@@ -1425,7 +1425,7 @@ void ScTable::CopyToTable(
pDestTab->SetRowFiltered(i, nLastRow, bFiltered);
i = nLastRow;
}
- pDestTab->SetRowManualBreaks( maRowManualBreaks);
+ pDestTab->SetRowManualBreaks( std::set(maRowManualBreaks) );
}
}
@@ -1505,12 +1505,12 @@ void ScTable::UndoToTable(
if (bWidth)
{
pDestTab->mpColWidth->CopyFrom(*mpColWidth, nCol1, nCol2);
- pDestTab->SetColManualBreaks( maColManualBreaks);
+ pDestTab->SetColManualBreaks( std::set(maColManualBreaks) );
}
if (bHeight)
{
pDestTab->CopyRowHeight(*this, nRow1, nRow2, 0);
- pDestTab->SetRowManualBreaks( maRowManualBreaks);
+ pDestTab->SetRowManualBreaks( std::set(maRowManualBreaks) );
}
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a68145207588..8e576edb6da1 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -346,9 +346,9 @@ public:
}
}
- void SetOrderIndices( const std::vector<SCCOLROW>& rIndices )
+ void SetOrderIndices( std::vector<SCCOLROW>&& rIndices )
{
- maOrderIndices = rIndices;
+ maOrderIndices = std::move(rIndices);
}
/**
@@ -1894,7 +1894,7 @@ void ScTable::Reorder( const sc::ReorderParam& rParam )
else
{
// Ordering by column is much simpler. Just set the order indices and we are done.
- pArray->SetOrderIndices(rParam.maOrderIndices);
+ pArray->SetOrderIndices(std::vector(rParam.maOrderIndices));
SortReorderByColumn(
pArray.get(), rParam.maSortRange.aStart.Row(), rParam.maSortRange.aEnd.Row(),
rParam.maDataAreaExtras.mbCellFormats, nullptr);
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 6c04781df60a..646984b7c699 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -319,16 +319,16 @@ bool ScTable::HasManualBreaks() const
return !maRowManualBreaks.empty() || !maColManualBreaks.empty();
}
-void ScTable::SetRowManualBreaks(const ::std::set<SCROW>& rBreaks)
+void ScTable::SetRowManualBreaks(::std::set<SCROW>&& rBreaks)
{
- maRowManualBreaks = rBreaks;
+ maRowManualBreaks = std::move(rBreaks);
InvalidatePageBreaks();
SetStreamValid(false);
}
-void ScTable::SetColManualBreaks(const ::std::set<SCCOL>& rBreaks)
+void ScTable::SetColManualBreaks(::std::set<SCCOL>&& rBreaks)
{
- maColManualBreaks = rBreaks;
+ maColManualBreaks = std::move(rBreaks);
InvalidatePageBreaks();
SetStreamValid(false);
}
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 4abfeb432902..0e3c151634e5 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -137,7 +137,7 @@ public:
bool isOptionEnabled(SCSIZE nOptId) const;
void setOption(SCSIZE nOptId, bool bEnabled);
- void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt );
+ void setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt );
const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const { return maEnhancedProtection;}
bool updateReference( UpdateRefMode, const ScDocument&, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz );
bool isBlockEditable( const ScRange& rRange ) const;
@@ -423,9 +423,9 @@ void ScTableProtectionImpl::setOption(SCSIZE nOptId, bool bEnabled)
maOptions[nOptId] = bEnabled;
}
-void ScTableProtectionImpl::setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt )
+void ScTableProtectionImpl::setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt )
{
- maEnhancedProtection = rProt;
+ maEnhancedProtection = std::move(rProt);
}
bool ScTableProtectionImpl::updateReference( UpdateRefMode eMode, const ScDocument& rDoc,
@@ -695,9 +695,9 @@ void ScTableProtection::setOption(Option eOption, bool bEnabled)
mpImpl->setOption(eOption, bEnabled);
}
-void ScTableProtection::setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt )
+void ScTableProtection::setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt )
{
- mpImpl->setEnhancedProtection(rProt);
+ mpImpl->setEnhancedProtection(std::move(rProt));
}
const ::std::vector< ScEnhancedProtection > & ScTableProtection::getEnhancedProtection() const
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 3774d8d06790..0545622cd43e 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -128,11 +128,11 @@ const ::std::vector<ScUnoAddInFuncData::LocalizedName>& ScUnoAddInFuncData::GetC
return maCompNames;
}
-void ScUnoAddInFuncData::SetCompNames( const ::std::vector< ScUnoAddInFuncData::LocalizedName >& rNew )
+void ScUnoAddInFuncData::SetCompNames( ::std::vector< ScUnoAddInFuncData::LocalizedName >&& rNew )
{
OSL_ENSURE( !bCompInitialized, "SetCompNames after initializing" );
- maCompNames = rNew;
+ maCompNames = std::move(rNew);
bCompInitialized = true;
}
@@ -513,7 +513,7 @@ void ScUnoAddInCollection::ReadConfiguration()
xFunc, aObject,
nVisibleCount, pVisibleArgs.get(), SC_CALLERPOS_NONE );
- pData->SetCompNames( aCompNames );
+ pData->SetCompNames( std::move(aCompNames) );
ppFuncData[nFuncPos+nOld].reset(pData);
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 3583fb28f549..09cbc94de990 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2033,8 +2033,8 @@ ScChangeTrack::ScChangeTrack( ScDocument& rDocP ) :
memset( ppContentSlots.get(), 0, mnContentSlots * sizeof( ScChangeActionContent* ) );
}
-ScChangeTrack::ScChangeTrack( ScDocument& rDocP, const std::set<OUString>& aTempUserCollection) :
- maUserCollection(aTempUserCollection),
+ScChangeTrack::ScChangeTrack( ScDocument& rDocP, std::set<OUString>&& aTempUserCollection) :
+ maUserCollection(std::move(aTempUserCollection)),
aFixDateTime( DateTime::SYSTEM ),
rDoc( rDocP )
{
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 285654ef25c7..e47a97c084e0 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -681,9 +681,9 @@ void ScDBData::EndTableColumnNamesListener()
EndListeningAll();
}
-void ScDBData::SetTableColumnNames( const ::std::vector< OUString >& rNames )
+void ScDBData::SetTableColumnNames( ::std::vector< OUString >&& rNames )
{
- maTableColumnNames = rNames;
+ maTableColumnNames = std::move(rNames);
mbTableColumnNamesDirty = false;
}
diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index d6df22d5ce6a..e5a2e92f1a44 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -35,9 +35,9 @@ ScPrintSaverTab::~ScPrintSaverTab()
mpRepeatRow.reset();
}
-void ScPrintSaverTab::SetAreas( const ScRangeVec& rRanges, bool bEntireSheet )
+void ScPrintSaverTab::SetAreas( ScRangeVec&& rRanges, bool bEntireSheet )
{
- maPrintRanges = rRanges;
+ maPrintRanges = std::move(rRanges);
mbEntireSheet = bEntireSheet;
}
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 9eff53bc43ed..5fe7bd257e31 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -160,9 +160,9 @@ void XclExpXmlPivotCaches::SaveXml( XclExpXmlStream& rStrm )
pWorkbookStrm->endElement(XML_pivotCaches);
}
-void XclExpXmlPivotCaches::SetCaches( const std::vector<Entry>& rCaches )
+void XclExpXmlPivotCaches::SetCaches( std::vector<Entry>&& rCaches )
{
- maCaches = rCaches;
+ maCaches = std::move(rCaches);
}
bool XclExpXmlPivotCaches::HasCaches() const
@@ -614,7 +614,7 @@ void XclExpXmlPivotTableManager::Initialize()
p->AppendTable(&rDPObj, nCacheId, i+1);
}
- maCaches.SetCaches(aCaches);
+ maCaches.SetCaches(std::move(aCaches));
}
XclExpXmlPivotCaches& XclExpXmlPivotTableManager::GetCaches()
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index befd63b3414c..718d34559068 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -776,10 +776,10 @@ void XclImpChSourceLink::SetString( const OUString& rString )
mxString->SetText( rString );
}
-void XclImpChSourceLink::SetTextFormats( const XclFormatRunVec& rFormats )
+void XclImpChSourceLink::SetTextFormats( XclFormatRunVec&& rFormats )
{
if( mxString )
- mxString->SetFormats( rFormats );
+ mxString->SetFormats( std::move(rFormats) );
}
sal_uInt16 XclImpChSourceLink::GetCellCount() const
@@ -1003,7 +1003,7 @@ void XclImpChText::ReadSubRecord( XclImpStream& rStrm )
break;
case EXC_ID_CHEND:
if( mxSrcLink && !maFormats.empty() )
- mxSrcLink->SetTextFormats( maFormats );
+ mxSrcLink->SetTextFormats( std::vector(maFormats) );
break;
}
}
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 52123b499935..6a6484fde17f 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1115,7 +1115,7 @@ XclImpDecrypterRef lclReadFilepass8_Standard( XclImpStream& rStrm )
rStrm.Read(aSalt.data(), 16);
rStrm.Read(aVerifier.data(), 16);
rStrm.Read(aVerifierHash.data(), 16);
- xDecr = std::make_shared<XclImpBiff8StdDecrypter>(aSalt, aVerifier, aVerifierHash);
+ xDecr = std::make_shared<XclImpBiff8StdDecrypter>(std::move(aSalt), std::move(aVerifier), std::move(aVerifierHash));
}
return xDecr;
}
@@ -1406,7 +1406,7 @@ void XclImpSheetProtectBuffer::Apply() const
pProtect->setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, (nOptions & 0x4000) );
// Enhanced protection containing editable ranges and permissions.
- pProtect->setEnhancedProtection( rSheet.maEnhancedProtections);
+ pProtect->setEnhancedProtection( std::vector(rSheet.maEnhancedProtections) );
// all done. now commit.
GetDoc().SetTabProtection(rTab, pProtect.get());
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index d2e40e83ebe0..d8d4eaa631c4 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1137,7 +1137,7 @@ void XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) const
XclPTSubtotalVec aSubtotalVec;
maFieldInfo.GetSubtotals( aSubtotalVec );
if( !aSubtotalVec.empty() )
- rSaveDim.SetSubTotals( aSubtotalVec );
+ rSaveDim.SetSubTotals( std::move(aSubtotalVec) );
// sorting
DataPilotFieldSortInfo aSortInfo;
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index e4891ff90a1e..0a6c24aca6b2 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -199,12 +199,12 @@ sal_uInt16 XclImpBiff5Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal
return nRet;
}
-XclImpBiff8Decrypter::XclImpBiff8Decrypter(const std::vector<sal_uInt8>& rSalt,
- const std::vector<sal_uInt8>& rVerifier,
- const std::vector<sal_uInt8>& rVerifierHash)
- : maSalt(rSalt)
- , maVerifier(rVerifier)
- , maVerifierHash(rVerifierHash)
+XclImpBiff8Decrypter::XclImpBiff8Decrypter( std::vector<sal_uInt8>&& rSalt,
+ std::vector<sal_uInt8>&& rVerifier,
+ std::vector<sal_uInt8>&& rVerifierHash)
+ : maSalt(std::move(rSalt))
+ , maVerifier(std::move(rVerifier))
+ , maVerifierHash(std::move(rVerifierHash))
, mpCodec(nullptr)
{
}
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index ed9fd066d723..078429ed440e 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -89,7 +89,7 @@ namespace {
class PaletteIndex : public XIndexAccess_BASE
{
public:
- explicit PaletteIndex( const ColorVec& rColorTable ) : maColor( rColorTable ) {}
+ explicit PaletteIndex( ColorVec&& rColorTable ) : maColor( std::move(rColorTable) ) {}
// Methods XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() override
@@ -136,7 +136,7 @@ XclImpPalette::ExportPalette()
uno::Reference< beans::XPropertySet > xProps( pDocShell->GetModel(), uno::UNO_QUERY );
if ( xProps.is() )
{
- uno::Reference< container::XIndexAccess > xIndex( new PaletteIndex( aColors ) );
+ uno::Reference< container::XIndexAccess > xIndex( new PaletteIndex( std::move(aColors) ) );
xProps->setPropertyValue( "ColorPalette", uno::makeAny( xIndex ) );
}
diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx
index ef1cc2d4f841..30fb25a30f48 100644
--- a/sc/source/filter/inc/xepivotxml.hxx
+++ b/sc/source/filter/inc/xepivotxml.hxx
@@ -31,7 +31,7 @@ public:
XclExpXmlPivotCaches(const XclExpRoot& rRoot);
virtual void SaveXml(XclExpXmlStream& rStrm) override;
- void SetCaches(const std::vector<Entry>& rCaches);
+ void SetCaches(std::vector<Entry>&& rCaches);
bool HasCaches() const;
const Entry* GetCache(sal_Int32 nCacheId) const;
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index ee50c4dd3229..e26ed4a0cfae 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -401,7 +401,7 @@ public:
/** Sets explicit string data for this text object. */
void SetString( const OUString& rString );
/** Sets formatting runs read from a CHFORMATRUNS record. */
- void SetTextFormats( const XclFormatRunVec& rFormats );
+ void SetTextFormats( XclFormatRunVec&& rFormats );
/** Returns the destination object (title, values, category, ...). */
sal_uInt8 GetDestType() const { return maData.mnDestType; }
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index 53ac4f916d22..df440f3b9b33 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -136,9 +136,9 @@ private:
static sal_uInt16 GetOffset( std::size_t nStrmPos );
protected:
- explicit XclImpBiff8Decrypter(const std::vector<sal_uInt8>& rSalt,
- const std::vector<sal_uInt8>& rVerifier,
- const std::vector<sal_uInt8>& rVerifierHash);
+ explicit XclImpBiff8Decrypter( std::vector<sal_uInt8>&& rSalt,
+ std::vector<sal_uInt8>&& rVerifier,
+ std::vector<sal_uInt8>&& rVerifierHash);
explicit XclImpBiff8Decrypter(const XclImpBiff8Decrypter& rSrc);
@@ -152,10 +152,10 @@ protected:
class XclImpBiff8StdDecrypter : public XclImpBiff8Decrypter
{
public:
- explicit XclImpBiff8StdDecrypter(const std::vector<sal_uInt8>& rSalt,
- const std::vector<sal_uInt8>& rVerifier,
- const std::vector<sal_uInt8>& rVerifierHash)
- : XclImpBiff8Decrypter(rSalt, rVerifier, rVerifierHash)
+ explicit XclImpBiff8StdDecrypter( std::vector<sal_uInt8>&& rSalt,
+ std::vector<sal_uInt8>&& rVerifier,
+ std::vector<sal_uInt8>&& rVerifierHash)
+ : XclImpBiff8Decrypter(std::move(rSalt), std::move(rVerifier), std::move(rVerifierHash))
{
mpCodec = &maCodec;
}
@@ -174,10 +174,10 @@ private:
class XclImpBiff8CryptoAPIDecrypter : public XclImpBiff8Decrypter
{
public:
- explicit XclImpBiff8CryptoAPIDecrypter(const std::vector<sal_uInt8>& rSalt,
- const std::vector<sal_uInt8>& rVerifier,
- const std::vector<sal_uInt8>& rVerifierHash)
- : XclImpBiff8Decrypter(rSalt, rVerifier, rVerifierHash)
+ explicit XclImpBiff8CryptoAPIDecrypter( std::vector<sal_uInt8>&& rSalt,
+ std::vector<sal_uInt8>&& rVerifier,
+ std::vector<sal_uInt8>&& rVerifierHash)
+ : XclImpBiff8Decrypter(std::move(rSalt), std::move(rVerifier), std::move(rVerifierHash))
{
mpCodec = &maCodec;
}
diff --git a/sc/source/filter/inc/xistring.hxx b/sc/source/filter/inc/xistring.hxx
index c46fca475729..cf534da3fd11 100644
--- a/sc/source/filter/inc/xistring.hxx
+++ b/sc/source/filter/inc/xistring.hxx
@@ -41,7 +41,7 @@ public:
/** Sets the passed string data. */
void SetText( const OUString& rText ) { maString = rText; }
/** Sets the passed formatting buffer. */
- void SetFormats( const XclFormatRunVec& rFormats ) { maFormats = rFormats; }
+ void SetFormats( XclFormatRunVec&& rFormats ) { maFormats = std::move(rFormats); }
/** Reads and appends the formatting information (run count and runs) from stream. */
void ReadFormats( XclImpStream& rStrm ) { ReadFormats( rStrm, maFormats ); }
/** Reads and appends formatting runs from an OBJ or TXO record. */
diff --git a/sc/source/filter/oox/tablecolumnsbuffer.cxx b/sc/source/filter/oox/tablecolumnsbuffer.cxx
index 57552204c62b..4a4f2997c550 100644
--- a/sc/source/filter/oox/tablecolumnsbuffer.cxx
+++ b/sc/source/filter/oox/tablecolumnsbuffer.cxx
@@ -89,7 +89,7 @@ bool TableColumns::finalizeImport( ScDBData* pDBData )
aNames[i] = rxTableColumn->getName();
++i;
}
- pDBData->SetTableColumnNames( aNames);
+ pDBData->SetTableColumnNames( std::move(aNames) );
return true;
}
return false;
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 284e0139ceae..988207aa9067 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -272,7 +272,7 @@ void WorksheetSettings::finalizeImport()
aProtect.setOption( ScTableProtection::PIVOT_TABLES, !maSheetProt.mbPivotTables );
aProtect.setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, !maSheetProt.mbSelectUnlocked );
- aProtect.setEnhancedProtection( maSheetProt.maEnhancedProtections);
+ aProtect.setEnhancedProtection( std::vector(maSheetProt.maEnhancedProtections) );
getScDocument().SetTabProtection( getSheetIndex(), &aProtect );
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 90941e66a0f5..5fd1857243aa 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -719,7 +719,7 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pDoc)
if (!pDoc)
return;
- pTrack = new ScChangeTrack(*pDoc, aUsers);
+ pTrack = new ScChangeTrack(*pDoc, std::set(aUsers));
// old files didn't store nanoseconds, disable until encountered
pTrack->SetTimeNanoSeconds( false );
diff --git a/sc/source/filter/xml/pivotsource.cxx b/sc/source/filter/xml/pivotsource.cxx
index ff856fc5e3a6..0f7b07f5d0b9 100644
--- a/sc/source/filter/xml/pivotsource.cxx
+++ b/sc/source/filter/xml/pivotsource.cxx
@@ -15,8 +15,8 @@
namespace sc {
-PivotTableSources::SelectedPages::SelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected ) :
- mpDP(pObj), maSelectedPages(rSelected) {}
+PivotTableSources::SelectedPages::SelectedPages( ScDPObject* pObj, SelectedPagesType&& rSelected ) :
+ mpDP(pObj), maSelectedPages(std::move(rSelected)) {}
PivotTableSources::SheetSource::SheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc ) :
mpDP(pObj), maDesc(rDesc) {}
@@ -44,12 +44,12 @@ void PivotTableSources::appendServiceSource( ScDPObject* pObj, const ScDPService
maServiceSources.emplace_back(pObj, rDesc);
}
-void PivotTableSources::appendSelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected )
+void PivotTableSources::appendSelectedPages( ScDPObject* pObj, SelectedPagesType&& rSelected )
{
if (rSelected.empty())
return;
- maSelectedPagesList.emplace_back(pObj, rSelected);
+ maSelectedPagesList.emplace_back(pObj, std::move(rSelected));
}
namespace {
diff --git a/sc/source/filter/xml/pivotsource.hxx b/sc/source/filter/xml/pivotsource.hxx
index 0a2d76ba47e2..bfffa7e1c4d4 100644
--- a/sc/source/filter/xml/pivotsource.hxx
+++ b/sc/source/filter/xml/pivotsource.hxx
@@ -31,7 +31,7 @@ struct PivotTableSources
ScDPObject* mpDP;
SelectedPagesType maSelectedPages;
- SelectedPages(ScDPObject* pObj, const SelectedPagesType& rSelected);
+ SelectedPages(ScDPObject* pObj, SelectedPagesType&& rSelected);
};
struct SheetSource
@@ -69,7 +69,7 @@ struct PivotTableSources
void appendDBSource(ScDPObject* pObj, const ScImportSourceDesc& rDesc);
void appendServiceSource(ScDPObject* pObj, const ScDPServiceDesc& rDesc);
- void appendSelectedPages(ScDPObject* pObj, const SelectedPagesType& rSelected);
+ void appendSelectedPages(ScDPObject* pObj, SelectedPagesType&& rSelected);
void process();
};
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 3d84477b208c..99cbc69167b8 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -498,7 +498,7 @@ void SAL_CALL ScXMLDataPilotTableContext::endFastElement( sal_Int32 /*nElement*/
break;
}
- rPivotSources.appendSelectedPages(pDPObject.get(), maSelectedPages);
+ rPivotSources.appendSelectedPages(pDPObject.get(), std::unordered_map(maSelectedPages));
pDPSave->SetRowGrand(maRowGrandTotal.mbVisible);
pDPSave->SetColumnGrand(maColGrandTotal.mbVisible);
@@ -896,12 +896,12 @@ void ScXMLDataPilotFieldContext::SetSubTotalName(const OUString& rName)
xDim->SetSubtotalName(rName);
}
-void ScXMLDataPilotFieldContext::AddGroup(const ::std::vector<OUString>& rMembers, const OUString& rName)
+void ScXMLDataPilotFieldContext::AddGroup(::std::vector<OUString>&& rMembers, const OUString& rName)
{
ScXMLDataPilotGroup aGroup;
- aGroup.aMembers = rMembers;
+ aGroup.aMembers = std::move(rMembers);
aGroup.aName = rName;
- aGroups.push_back(aGroup);
+ aGroups.push_back(std::move(aGroup));
}
void SAL_CALL ScXMLDataPilotFieldContext::endFastElement( sal_Int32 /*nElement*/ )
@@ -1228,7 +1228,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotSubTotals
void SAL_CALL ScXMLDataPilotSubTotalsContext::endFastElement( sal_Int32 /*nElement*/ )
{
- pDataPilotField->SetSubTotals(maFunctions);
+ pDataPilotField->SetSubTotals(std::vector(maFunctions));
if (!maDisplayName.isEmpty())
pDataPilotField->SetSubTotalName(maDisplayName);
}
@@ -1506,7 +1506,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDataPilotGroupCont
void SAL_CALL ScXMLDataPilotGroupContext::endFastElement( sal_Int32 /*nElement*/ )
{
- pDataPilotField->AddGroup(aMembers, sName);
+ pDataPilotField->AddGroup(std::vector(aMembers), sName);
}
ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport,
diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx
index 65b7ca0997e5..a7d5f607f420 100644
--- a/sc/source/filter/xml/xmldpimp.hxx
+++ b/sc/source/filter/xml/xmldpimp.hxx
@@ -261,7 +261,7 @@ public:
void SetShowEmpty(const bool bValue) { if (xDim) xDim->SetShowEmpty(bValue); }
void SetRepeatItemLabels(const bool bSet) { if (xDim) xDim->SetRepeatItemLabels(bSet); }
- void SetSubTotals(std::vector<ScGeneralFunction> const & rFunctions) { if (xDim) xDim->SetSubTotals(rFunctions); }
+ void SetSubTotals(std::vector<ScGeneralFunction> && rFunctions) { if (xDim) xDim->SetSubTotals(std::move(rFunctions)); }
void AddMember(std::unique_ptr<ScDPSaveMember> pMember);
void SetSubTotalName(const OUString& rName);
void SetFieldReference(const css::sheet::DataPilotFieldReference& aRef) { if (xDim) xDim->SetReferenceValue(&aRef); }
@@ -281,7 +281,7 @@ public:
bAutoStart = bAutoSt;
bAutoEnd = bAutoE;
}
- void AddGroup(const ::std::vector<OUString>& rMembers, const OUString& rName);
+ void AddGroup(::std::vector<OUString>&& rMembers, const OUString& rName);
};
class ScXMLDataPilotFieldReferenceContext : public ScXMLImportContext
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index f4cafc7cf264..1658d4781a25 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -766,7 +766,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
else
{
std::set<OUString> aUsers;
- std::unique_ptr<ScChangeTrack> pTrack( new ScChangeTrack(*pDoc, aUsers) );
+ std::unique_ptr<ScChangeTrack> pTrack( new ScChangeTrack(*pDoc, std::move(aUsers)) );
pTrack->SetProtection(aPass);
pDoc->SetChangeTrack(std::move(pTrack));
}
diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx
index 523af570d601..4c53f30f8e9f 100644
--- a/sc/source/filter/xml/xmltransformationi.cxx
+++ b/sc/source/filter/xml/xmltransformationi.cxx
@@ -94,7 +94,7 @@ ScXMLColumnRemoveContext::~ScXMLColumnRemoveContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::ColumnRemoveTransformation>(maColumns));
+ std::make_shared<sc::ColumnRemoveTransformation>(std::set(maColumns)));
}
}
@@ -200,7 +200,7 @@ ScXMLColumnMergeContext::~ScXMLColumnMergeContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::MergeColumnTransformation>(maColumns, maMergeString));
+ std::make_shared<sc::MergeColumnTransformation>(std::set(maColumns), maMergeString));
}
}
@@ -288,7 +288,7 @@ ScXMLColumnTextContext::~ScXMLColumnTextContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::TextTransformation>(maColumns, maType));
+ std::make_shared<sc::TextTransformation>(std::set(maColumns), maType));
}
}
@@ -359,7 +359,7 @@ ScXMLColumnAggregateContext::~ScXMLColumnAggregateContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::AggregateFunction>(maColumns, maType));
+ std::make_shared<sc::AggregateFunction>(std::set(maColumns), maType));
}
}
@@ -453,7 +453,7 @@ ScXMLColumnNumberContext::~ScXMLColumnNumberContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::NumberTransformation>(maColumns, maType, maPrecision));
+ std::make_shared<sc::NumberTransformation>(std::set(maColumns), maType, maPrecision));
}
}
@@ -509,7 +509,7 @@ ScXMLColumnRemoveNullContext::~ScXMLColumnRemoveNullContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::ReplaceNullTransformation>(maColumns, maReplaceString));
+ std::make_shared<sc::ReplaceNullTransformation>(std::set(maColumns), maReplaceString));
}
}
@@ -606,7 +606,7 @@ ScXMLDateTimeContext::~ScXMLDateTimeContext()
if (!rDataSources.empty())
{
rDataSources[rDataSources.size() - 1].AddDataTransformation(
- std::make_shared<sc::DateTimeTransformation>(maColumns, maType));
+ std::make_shared<sc::DateTimeTransformation>(std::set(maColumns), maType));
}
}
diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx
index e868e2269358..29391c378db9 100644
--- a/sc/source/ui/dataprovider/csvdataprovider.cxx
+++ b/sc/source/ui/dataprovider/csvdataprovider.cxx
@@ -66,12 +66,12 @@ public:
namespace sc {
CSVFetchThread::CSVFetchThread(
ScDocument& rDoc, const OUString& mrURL, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rDataTransformations)
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rDataTransformations)
: Thread("CSV Fetch Thread")
, mrDocument(rDoc)
, maURL(mrURL)
, mbTerminate(false)
- , maDataTransformations(rDataTransformations)
+ , maDataTransformations(std::move(rDataTransformations))
, maImportFinishedHdl(std::move(aImportFinishedHdl))
{
maConfig.delimiters.push_back(',');
@@ -142,7 +142,7 @@ void CSVDataProvider::Import()
mpDoc.reset(new ScDocument(SCDOCMODE_CLIP));
mpDoc->ResetClip(mpDocument, SCTAB(0));
- mxCSVFetchThread = new CSVFetchThread(*mpDoc, mrDataSource.getURL(), std::bind(&CSVDataProvider::ImportFinished, this), mrDataSource.getDataTransformation());
+ mxCSVFetchThread = new CSVFetchThread(*mpDoc, mrDataSource.getURL(), std::bind(&CSVDataProvider::ImportFinished, this), std::vector(mrDataSource.getDataTransformation()));
mxCSVFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 14351d7c2004..0c4d2dc300c6 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -38,8 +38,8 @@ SCROW DataTransformation::getLastRow(const ScDocument& rDoc, SCCOL nCol)
return rDoc.GetLastDataRow(0, nCol, nCol, nEndRow);
}
-ColumnRemoveTransformation::ColumnRemoveTransformation(const std::set<SCCOL>& rColumns):
- maColumns(rColumns)
+ColumnRemoveTransformation::ColumnRemoveTransformation(std::set<SCCOL>&& rColumns):
+ maColumns(std::move(rColumns))
{
}
@@ -108,8 +108,8 @@ sal_Unicode SplitColumnTransformation::getSeparator() const
return mcSeparator;
}
-MergeColumnTransformation::MergeColumnTransformation(const std::set<SCCOL>& rColumns, const OUString& rMergeString):
- maColumns(rColumns),
+MergeColumnTransformation::MergeColumnTransformation( std::set<SCCOL>&& rColumns, const OUString& rMergeString):
+ maColumns(std::move(rColumns)),
maMergeString(rMergeString)
{
}
@@ -186,8 +186,8 @@ const ScSortParam & SortTransformation::getSortParam() const
return maSortParam;
}
-TextTransformation::TextTransformation(const std::set<SCCOL>& nCol, const TEXT_TRANSFORM_TYPE rType):
- mnCol(nCol),
+TextTransformation::TextTransformation( std::set<SCCOL>&& nCol, const TEXT_TRANSFORM_TYPE rType):
+ mnCol(std::move(nCol)),
maType(rType)
{
}
@@ -298,8 +298,8 @@ const std::set<SCCOL>& TextTransformation::getColumns() const
return mnCol;
}
-AggregateFunction::AggregateFunction(const std::set<SCCOL>& rColumns, const AGGREGATE_FUNCTION rType):
- maColumns(rColumns),
+AggregateFunction::AggregateFunction(std::set<SCCOL>&& rColumns, const AGGREGATE_FUNCTION rType):
+ maColumns(std::move(rColumns)),
maType(rType)
{
}
@@ -406,17 +406,17 @@ const std::set<SCCOL>& AggregateFunction::getColumns() const
return maColumns;
}
-NumberTransformation::NumberTransformation(const std::set<SCCOL>& nCol,
+NumberTransformation::NumberTransformation(std::set<SCCOL>&& nCol,
const NUMBER_TRANSFORM_TYPE rType)
- : mnCol(nCol)
+ : mnCol(std::move(nCol))
, maType(rType)
, maPrecision(-1)
{
}
-NumberTransformation::NumberTransformation(const std::set<SCCOL>& nCol,
+NumberTransformation::NumberTransformation(std::set<SCCOL>&& nCol,
const NUMBER_TRANSFORM_TYPE rType, int nPrecision)
- : mnCol(nCol)
+ : mnCol(std::move(nCol))
, maType(rType)
, maPrecision(nPrecision)
{
@@ -665,9 +665,9 @@ const std::set<SCCOL>& NumberTransformation::getColumn() const
return mnCol;
}
-ReplaceNullTransformation::ReplaceNullTransformation(const std::set<SCCOL>& nCol,
+ReplaceNullTransformation::ReplaceNullTransformation(std::set<SCCOL>&& nCol,
const OUString& sReplaceWith)
- : mnCol(nCol)
+ : mnCol(std::move(nCol))
, msReplaceWith(sReplaceWith)
{
}
@@ -710,9 +710,9 @@ TransformationType ReplaceNullTransformation::getTransformationType() const
return TransformationType::REMOVE_NULL_TRANSFORMATION;
}
-DateTimeTransformation::DateTimeTransformation(const std::set<SCCOL>& nCol,
+DateTimeTransformation::DateTimeTransformation(std::set<SCCOL>&& nCol,
const DATETIME_TRANSFORMATION_TYPE rType)
- : mnCol(nCol)
+ : mnCol(std::move(nCol))
, maType(rType)
{
}
diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx
index fbd1daaa3271..75f222e5fb6d 100644
--- a/sc/source/ui/dataprovider/htmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/htmldataprovider.cxx
@@ -38,7 +38,7 @@ class HTMLFetchThread : public salhelper::Thread
public:
HTMLFetchThread(ScDocument& rDoc, const OUString&, const OUString& rID, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations);
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations);
virtual void execute() override;
};
@@ -46,12 +46,12 @@ public:
HTMLFetchThread::HTMLFetchThread(
ScDocument& rDoc, const OUString& rURL, const OUString& rID,
std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations)
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations)
: salhelper::Thread("HTML Fetch Thread")
, mrDocument(rDoc)
, maURL(rURL)
, maID(rID)
- , maDataTransformations(rTransformations)
+ , maDataTransformations(std::move(rTransformations))
, maImportFinishedHdl(std::move(aImportFinishedHdl))
{
}
@@ -255,7 +255,7 @@ void HTMLDataProvider::Import()
mpDoc.reset(new ScDocument(SCDOCMODE_CLIP));
mpDoc->ResetClip(mpDocument, SCTAB(0));
mxHTMLFetchThread = new HTMLFetchThread(*mpDoc, mrDataSource.getURL(), mrDataSource.getID(),
- std::bind(&HTMLDataProvider::ImportFinished, this), mrDataSource.getDataTransformation());
+ std::bind(&HTMLDataProvider::ImportFinished, this), std::vector(mrDataSource.getDataTransformation()));
mxHTMLFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dataprovider/sqldataprovider.cxx b/sc/source/ui/dataprovider/sqldataprovider.cxx
index 313f64a76c5d..c8ffd0d7aa29 100644
--- a/sc/source/ui/dataprovider/sqldataprovider.cxx
+++ b/sc/source/ui/dataprovider/sqldataprovider.cxx
@@ -39,18 +39,18 @@ class SQLFetchThread : public salhelper::Thread
public:
SQLFetchThread(ScDocument& rDoc, const OUString& rID, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations);
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations);
virtual void execute() override;
};
SQLFetchThread::SQLFetchThread(
ScDocument& rDoc, const OUString& rID, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations)
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations)
: salhelper::Thread("SQL Fetch Thread")
, mrDocument(rDoc)
, maID(rID)
- , maDataTransformations(rTransformations)
+ , maDataTransformations(std::move(rTransformations))
, maImportFinishedHdl(aImportFinishedHdl)
{
}
@@ -147,7 +147,7 @@ void SQLDataProvider::Import()
mpDoc->ResetClip(mpDocument, SCTAB(0));
mxSQLFetchThread = new SQLFetchThread(*mpDoc, mrDataSource.getID(),
std::bind(&SQLDataProvider::ImportFinished, this),
- mrDataSource.getDataTransformation());
+ std::vector(mrDataSource.getDataTransformation()));
mxSQLFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx
index d540f81c5dc9..ba5bba61ac1c 100644
--- a/sc/source/ui/dataprovider/xmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/xmldataprovider.cxx
@@ -34,20 +34,20 @@ class XMLFetchThread : public salhelper::Thread
public:
XMLFetchThread(ScDocument& rDoc, const OUString&, const ScOrcusImportXMLParam& rParam,
const OUString& rID, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations);
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations);
virtual void execute() override;
};
XMLFetchThread::XMLFetchThread(
ScDocument& rDoc, const OUString& rURL, const ScOrcusImportXMLParam& rParam,
const OUString& rID, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations)
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& rTransformations)
: salhelper::Thread("XML Fetch Thread")
, mrDocument(rDoc)
, maURL(rURL)
, maID(rID)
, maParam(rParam)
- , maDataTransformations(rTransformations)
+ , maDataTransformations(std::move(rTransformations))
, maImportFinishedHdl(std::move(aImportFinishedHdl))
{
}
@@ -105,9 +105,10 @@ void XMLDataProvider::Import()
mpDoc.reset(new ScDocument(SCDOCMODE_CLIP));
mpDoc->ResetClip(mpDocument, SCTAB(0));
- mxXMLFetchThread = new XMLFetchThread(
- *mpDoc, mrDataSource.getURL(), mrDataSource.getXMLImportParam(), mrDataSource.getID(),
- std::bind(&XMLDataProvider::ImportFinished, this), mrDataSource.getDataTransformation());
+ mxXMLFetchThread = new XMLFetchThread(*mpDoc, mrDataSource.getURL(),
+ mrDataSource.getXMLImportParam(), mrDataSource.getID(),
+ std::bind(&XMLDataProvider::ImportFinished, this),
+ std::vector(mrDataSource.getDataTransformation()));
mxXMLFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 325353606fdd..a18ce7f5e7b5 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -482,9 +482,9 @@ sal_Int32 ScCsvGrid::GetColumnWidth( sal_uInt32 nColIndex ) const
return IsValidColumn( nColIndex ) ? (GetColumnPos( nColIndex + 1 ) - GetColumnPos( nColIndex )) : 0;
}
-void ScCsvGrid::SetColumnStates( const ScCsvColStateVec& rStates )
+void ScCsvGrid::SetColumnStates( ScCsvColStateVec&& rStates )
{
- maColStates = rStates;
+ maColStates = std::move(rStates);
maColStates.resize( maSplits.Count() - 1 );
Execute( CSVCMD_EXPORTCOLUMNTYPE );
AccSendTableUpdateEvent( 0, GetColumnCount(), false );
@@ -532,10 +532,10 @@ void ScCsvGrid::SetSelColumnType( sal_Int32 nType )
}
}
-void ScCsvGrid::SetTypeNames( const std::vector<OUString>& rTypeNames )
+void ScCsvGrid::SetTypeNames( std::vector<OUString>&& rTypeNames )
{
OSL_ENSURE( !rTypeNames.empty(), "ScCsvGrid::SetTypeNames - vector is empty" );
- maTypeNames = rTypeNames;
+ maTypeNames = std::move(rTypeNames);
Repaint( true );
mxPopup->clear();
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 884715813259..10dba1b810b3 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -71,7 +71,7 @@ void ScCsvTableBox::SetSeparatorsMode()
mxGrid->Execute( CSVCMD_SETLINEOFFSET, 0 );
mxGrid->Execute( CSVCMD_SETPOSCOUNT, 1 );
mxGrid->Execute( CSVCMD_NEWCELLTEXTS );
- mxGrid->SetColumnStates( maSepColStates );
+ mxGrid->SetColumnStates( std::vector(maSepColStates) );
InitControls();
mxGrid->EnableRepaint();
}
@@ -90,7 +90,7 @@ void ScCsvTableBox::SetFixedWidthMode()
mxGrid->Execute( CSVCMD_SETLINEOFFSET, 0 );
mxGrid->Execute( CSVCMD_SETPOSCOUNT, mnFixedWidth );
mxGrid->SetSplits( mxRuler->GetSplits() );
- mxGrid->SetColumnStates( maFixColStates );
+ mxGrid->SetColumnStates( std::vector(maFixColStates) );
InitControls();
mxGrid->EnableRepaint();
}
@@ -188,7 +188,7 @@ void ScCsvTableBox::InitTypes(const weld::ComboBox& rListBox)
std::vector<OUString> aTypeNames( nTypeCount );
for( sal_Int32 nIndex = 0; nIndex < nTypeCount; ++nIndex )
aTypeNames[ nIndex ] = rListBox.get_text( nIndex );
- mxGrid->SetTypeNames( aTypeNames );
+ mxGrid->SetTypeNames( std::move(aTypeNames) );
}
void ScCsvTableBox::FillColumnData( ScAsciiOptions& rOptions ) const
@@ -235,7 +235,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl&, rCtrl, void )
mxGrid->Execute( CSVCMD_SETPOSCOUNT, 1 );
mxGrid->Execute( CSVCMD_UPDATECELLTEXTS );
mxGrid->Execute( CSVCMD_SETPOSOFFSET, nPos );
- mxGrid->SetColumnStates( aStates );
+ mxGrid->SetColumnStates( std::move(aStates) );
mxGrid->EnableRepaint();
}
break;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index a598f07708cb..c75dd7e9fb37 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3447,7 +3447,7 @@ void ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi )
{
std::vector<SCTAB> undoTabs;
undoTabs.push_back(nTab);
- rDocShell.GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( &rDocShell, undoTabs, bVisible ) );
+ rDocShell.GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( &rDocShell, std::move(undoTabs), bVisible ) );
}
// update views
@@ -3613,7 +3613,7 @@ bool ScDocFunc::SetTabBgColor(
if (bRecord)
{
rDocShell.GetUndoManager()->AddUndoAction(
- std::make_unique<ScUndoTabColor>( &rDocShell, rUndoTabColorList));
+ std::make_unique<ScUndoTabColor>( &rDocShell, std::vector(rUndoTabColorList)));
}
rDocShell.PostPaintExtras();
ScDocShellModificator aModificator( rDocShell );
@@ -3798,7 +3798,7 @@ bool ScDocFunc::SetWidthOrHeight(
rDocShell.GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoWidthOrHeight>(
&rDocShell, aMark, nStart, nTab, nEnd, nTab, std::move(pUndoDoc),
- aUndoRanges, std::move(pUndoTab), eMode, nSizeTwips, bWidth));
+ std::move(aUndoRanges), std::move(pUndoTab), eMode, nSizeTwips, bWidth));
}
rDoc.UpdatePageBreaks( nTab );
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index c7857ffbb4c4..a186df02c0bb 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -172,13 +172,13 @@ public:
/** Returns the vector with the states of all columns. */
const ScCsvColStateVec& GetColumnStates() const { return maColStates; }
/** Sets all column states to the values in the passed vector. */
- void SetColumnStates( const ScCsvColStateVec& rColStates );
+ void SetColumnStates( ScCsvColStateVec&& rColStates );
/** Returns the data type of the selected columns. */
sal_Int32 GetSelColumnType() const;
/** Changes the data type of all selected columns. */
void SetSelColumnType( sal_Int32 nType );
/** Sets new UI data type names. */
- void SetTypeNames( const std::vector<OUString>& rTypeNames );
+ void SetTypeNames( std::vector<OUString>&& rTypeNames );
/** Returns the UI type name of the specified column. */
const OUString& GetColumnTypeName( sal_uInt32 nColIndex ) const;
diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx
index 9f7b2b2e3a50..e6457c48e243 100644
--- a/sc/source/ui/inc/dataprovider.hxx
+++ b/sc/source/ui/inc/dataprovider.hxx
@@ -49,7 +49,7 @@ class CSVFetchThread : public salhelper::Thread
public:
CSVFetchThread(ScDocument& rDoc, const OUString&, std::function<void()> aImportFinishedHdl,
- const std::vector<std::shared_ptr<sc::DataTransformation>>& mrDataTransformations);
+ std::vector<std::shared_ptr<sc::DataTransformation>>&& mrDataTransformations);
virtual ~CSVFetchThread() override;
void RequestTerminate();
diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx
index d575be4c4785..2b7c611cf96a 100644
--- a/sc/source/ui/inc/datatransformation.hxx
+++ b/sc/source/ui/inc/datatransformation.hxx
@@ -68,7 +68,7 @@ class SC_DLLPUBLIC ColumnRemoveTransformation : public DataTransformation
public:
- ColumnRemoveTransformation(const std::set<SCCOL>& rColumns);
+ ColumnRemoveTransformation(std::set<SCCOL>&& rColumns);
virtual ~ColumnRemoveTransformation() override;
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
@@ -96,7 +96,7 @@ class SC_DLLPUBLIC MergeColumnTransformation : public DataTransformation
public:
- MergeColumnTransformation(const std::set<SCCOL>& rColumns, const OUString& rMergeString);
+ MergeColumnTransformation(std::set<SCCOL>&& rColumns, const OUString& rMergeString);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
const OUString & getMergeString() const;
@@ -120,7 +120,7 @@ class SC_DLLPUBLIC TextTransformation : public DataTransformation
TEXT_TRANSFORM_TYPE maType;
public:
- TextTransformation(const std::set<SCCOL>& nCol, const TEXT_TRANSFORM_TYPE rType);
+ TextTransformation(std::set<SCCOL>&& nCol, const TEXT_TRANSFORM_TYPE rType);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
TEXT_TRANSFORM_TYPE getTextTransformationType() const;
@@ -133,7 +133,7 @@ class SC_DLLPUBLIC AggregateFunction : public DataTransformation
AGGREGATE_FUNCTION maType;
public:
- AggregateFunction(const std::set<SCCOL>& rColumns, const AGGREGATE_FUNCTION rType);
+ AggregateFunction(std::set<SCCOL>&& rColumns, const AGGREGATE_FUNCTION rType);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
AGGREGATE_FUNCTION getAggregateType() const;
@@ -147,8 +147,8 @@ class SC_DLLPUBLIC NumberTransformation : public DataTransformation
int maPrecision;
public:
- NumberTransformation(const std::set<SCCOL>& nCol, const NUMBER_TRANSFORM_TYPE rType);
- NumberTransformation(const std::set<SCCOL>& nCol, const NUMBER_TRANSFORM_TYPE rType,
+ NumberTransformation(std::set<SCCOL>&& nCol, const NUMBER_TRANSFORM_TYPE rType);
+ NumberTransformation(std::set<SCCOL>&& nCol, const NUMBER_TRANSFORM_TYPE rType,
int nPrecision);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
@@ -163,7 +163,7 @@ class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation
OUString msReplaceWith;
public:
- ReplaceNullTransformation(const std::set<SCCOL>& nCol, const OUString& sReplaceWith);
+ ReplaceNullTransformation(std::set<SCCOL>&& nCol, const OUString& sReplaceWith);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
const std::set<SCCOL>& getColumn() const;
@@ -176,7 +176,7 @@ class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation
DATETIME_TRANSFORMATION_TYPE maType;
public:
- DateTimeTransformation(const std::set<SCCOL>& nCol,
+ DateTimeTransformation(std::set<SCCOL>&& nCol,
const DATETIME_TRANSFORMATION_TYPE rType);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index f1ff30b609fd..fe05059e8007 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -72,7 +72,7 @@ protected:
public:
ScNameDefDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
- const ScViewData& rViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
+ const ScViewData& rViewData, std::map<OUString, ScRangeName*>&& aRangeMap,
const ScAddress& aCursorPos, const bool bUndo);
virtual ~ScNameDefDlg() override;
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index d8f3910edca2..538a4a536009 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -71,7 +71,7 @@ class ScOptSolverSave
public:
ScOptSolverSave( const OUString& rObjective, bool bMax, bool bMin, bool bValue,
const OUString& rTarget, const OUString& rVariable,
- const std::vector<ScOptConditionRow>& rConditions,
+ std::vector<ScOptConditionRow>&& rConditions,
const OUString& rEngine,
const css::uno::Sequence<css::beans::PropertyValue>& rProperties );
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 39f1792a8327..39dba0afa20d 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -107,7 +107,7 @@ public:
ScUndoDeleteMulti( ScDocShell* pNewDocShell,
bool bNewRows, bool bNeedsRefresh, SCTAB nNewTab,
- const std::vector<sc::ColRowSpan>& rSpans,
+ std::vector<sc::ColRowSpan>&& rSpans,
ScDocumentUniquePtr pUndoDocument, std::unique_ptr<ScRefUndoData> pRefData );
virtual ~ScUndoDeleteMulti() override;
@@ -361,7 +361,7 @@ public:
SCCOLROW nNewStart, SCTAB nNewStartTab,
SCCOLROW nNewEnd, SCTAB nNewEndTab,
ScDocumentUniquePtr pNewUndoDoc,
- const std::vector<sc::ColRowSpan>& rRanges,
+ std::vector<sc::ColRowSpan>&& rRanges,
std::unique_ptr<ScOutlineTable> pNewUndoTab,
ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips,
bool bNewWidth );
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 2f39b5002e36..2d94d69657c0 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -67,7 +67,7 @@ public:
ScUndoInsertTables(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- const std::vector<OUString>& newNameList);
+ std::vector<OUString>&& newNameList);
virtual ~ScUndoInsertTables() override;
virtual void Undo() override;
@@ -203,7 +203,7 @@ public:
const Color& aNTabBgColor);
ScUndoTabColor(
ScDocShell* pNewDocShell,
- const ScUndoTabColorInfo::List& rUndoTabColorList);
+ ScUndoTabColorInfo::List&& rUndoTabColorList);
virtual ~ScUndoTabColor() override;
virtual void Undo() override;
@@ -308,7 +308,7 @@ class ScUndoShowHideTab : public ScSimpleUndo
public:
ScUndoShowHideTab(
ScDocShell* pShell,
- const std::vector<SCTAB>& newUndoTabs,
+ std::vector<SCTAB>&& newUndoTabs,
bool bNewShow );
virtual ~ScUndoShowHideTab() override;
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index e3c8c517b404..8cb2d9d33a0c 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -121,7 +121,7 @@ std::shared_ptr<sc::DataTransformation> ScDeleteColumnTransformationControl::get
ColNums.insert(nCol - 1);
}
- return std::make_shared<sc::ColumnRemoveTransformation>(ColNums);
+ return std::make_shared<sc::ColumnRemoveTransformation>(std::move(ColNums));
}
class ScSplitColumnTransformationControl : public ScDataTransformationBaseControl
@@ -217,7 +217,7 @@ std::shared_ptr<sc::DataTransformation> ScMergeColumnTransformationControl::getT
// translate from 1-based column notations to internal Calc one
aMergedColumns.insert(nCol - 1);
}
- return std::make_shared<sc::MergeColumnTransformation>(aMergedColumns, mxSeparator->get_text());
+ return std::make_shared<sc::MergeColumnTransformation>(std::move(aMergedColumns), mxSeparator->get_text());
}
class ScSortTransformationControl : public ScDataTransformationBaseControl
@@ -316,13 +316,13 @@ std::shared_ptr<sc::DataTransformation> ScColumnTextTransformation::getTransform
switch (nPos)
{
case 0:
- return std::make_shared<sc::TextTransformation>(aColumns,sc::TEXT_TRANSFORM_TYPE::TO_LOWER);
+ return std::make_shared<sc::TextTransformation>(std::move(aColumns),sc::TEXT_TRANSFORM_TYPE::TO_LOWER);
case 1:
- return std::make_shared<sc::TextTransformation>(aColumns,sc::TEXT_TRANSFORM_TYPE::TO_UPPER);
+ return std::make_shared<sc::TextTransformation>(std::move(aColumns),sc::TEXT_TRANSFORM_TYPE::TO_UPPER);
case 2:
- return std::make_shared<sc::TextTransformation>(aColumns,sc::TEXT_TRANSFORM_TYPE::CAPITALIZE);
+ return std::make_shared<sc::TextTransformation>(std::move(aColumns),sc::TEXT_TRANSFORM_TYPE::CAPITALIZE);
case 3:
- return std::make_shared<sc::TextTransformation>(aColumns,sc::TEXT_TRANSFORM_TYPE::TRIM);
+ return std::make_shared<sc::TextTransformation>(std::move(aColumns),sc::TEXT_TRANSFORM_TYPE::TRIM);
default:
assert(false);
}
@@ -379,13 +379,13 @@ std::shared_ptr<sc::DataTransformation> ScAggregateFunction::getTransformation()
switch (nPos)
{
case 0:
- return std::make_shared<sc::AggregateFunction>(aColumns,sc::AGGREGATE_FUNCTION::SUM);
+ return std::make_shared<sc::AggregateFunction>(std::move(aColumns),sc::AGGREGATE_FUNCTION::SUM);
case 1:
- return std::make_shared<sc::AggregateFunction>(aColumns,sc::AGGREGATE_FUNCTION::AVERAGE);
+ return std::make_shared<sc::AggregateFunction>(std::move(aColumns),sc::AGGREGATE_FUNCTION::AVERAGE);
case 2:
- return std::make_shared<sc::AggregateFunction>(aColumns,sc::AGGREGATE_FUNCTION::MIN);
+ return std::make_shared<sc::AggregateFunction>(std::move(aColumns),sc::AGGREGATE_FUNCTION::MIN);
case 3:
- return std::make_shared<sc::AggregateFunction>(aColumns,sc::AGGREGATE_FUNCTION::MAX);
+ return std::make_shared<sc::AggregateFunction>(std::move(aColumns),sc::AGGREGATE_FUNCTION::MAX);
default:
assert(false);
}
@@ -442,31 +442,31 @@ std::shared_ptr<sc::DataTransformation> ScNumberTransformation::getTransformatio
switch (nPos)
{
case 0:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::SIGN);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::SIGN);
case 1:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::ROUND);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::ROUND);
case 2:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::ROUND_UP);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::ROUND_UP);
case 3:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::ROUND_DOWN);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::ROUND_DOWN);
case 4:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::ABSOLUTE);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::ABSOLUTE);
case 5:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::LOG_E);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::LOG_E);
case 6:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::LOG_10);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::LOG_10);
case 7:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::CUBE);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::CUBE);
case 8:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::SQUARE);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::SQUARE);
case 9:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::SQUARE_ROOT);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::SQUARE_ROOT);
case 10:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::EXPONENT);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::EXPONENT);
case 11:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::IS_EVEN);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::IS_EVEN);
case 12:
- return std::make_shared<sc::NumberTransformation>(aColumns,sc::NUMBER_TRANSFORM_TYPE::IS_ODD);
+ return std::make_shared<sc::NumberTransformation>(std::move(aColumns),sc::NUMBER_TRANSFORM_TYPE::IS_ODD);
default:
assert(false);
}
@@ -522,7 +522,7 @@ std::shared_ptr<sc::DataTransformation> ScReplaceNullTransformation::getTransfor
aColumns.insert(nCol - 1);
}
- return std::make_shared<sc::ReplaceNullTransformation>(aColumns,aReplaceWithString);
+ return std::make_shared<sc::ReplaceNullTransformation>(std::move(aColumns),aReplaceWithString);
}
class ScDateTimeTransformation : public ScDataTransformationBaseControl
@@ -574,41 +574,41 @@ std::shared_ptr<sc::DataTransformation> ScDateTimeTransformation::getTransformat
switch (nPos)
{
case 0:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::DATE_STRING);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::DATE_STRING);
case 1:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::YEAR);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::YEAR);
case 2:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::START_OF_YEAR);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::START_OF_YEAR);
case 3:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::END_OF_YEAR);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::END_OF_YEAR);
case 4:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::MONTH);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::MONTH);
case 5:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::MONTH_NAME);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::MONTH_NAME);
case 6:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::START_OF_MONTH);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::START_OF_MONTH);
case 7:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::END_OF_MONTH);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::END_OF_MONTH);
case 8:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::DAY);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::DAY);
case 9:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::DAY_OF_WEEK);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::DAY_OF_WEEK);
case 10:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::DAY_OF_YEAR);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::DAY_OF_YEAR);
case 11:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::QUARTER);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::QUARTER);
case 12:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::START_OF_QUARTER);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::START_OF_QUARTER);
case 13:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::END_OF_QUARTER);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::END_OF_QUARTER);
case 14:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::HOUR);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::HOUR);
case 15:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::MINUTE);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::MINUTE);
case 16:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::SECOND);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::SECOND);
case 17:
- return std::make_shared<sc::DateTimeTransformation>(aColumns,sc::DATETIME_TRANSFORMATION_TYPE::TIME);
+ return std::make_shared<sc::DateTimeTransformation>(std::move(aColumns),sc::DATETIME_TRANSFORMATION_TYPE::TIME);
default:
assert(false);
}
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 5630307d3329..5425a65c6c6d 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -134,7 +134,7 @@ IMPL_LINK(ScCursorRefEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
ScOptSolverSave::ScOptSolverSave( const OUString& rObjective, bool bMax, bool bMin, bool bValue,
const OUString& rTarget, const OUString& rVariable,
- const std::vector<ScOptConditionRow>& rConditions,
+ std::vector<ScOptConditionRow>&& rConditions,
const OUString& rEngine,
const uno::Sequence<beans::PropertyValue>& rProperties ) :
maObjective( rObjective ),
@@ -143,7 +143,7 @@ ScOptSolverSave::ScOptSolverSave( const OUString& rObjective, bool bMax, bool bM
mbValue( bValue ),
maTarget( rTarget ),
maVariable( rVariable ),
- maConditions( rConditions ),
+ maConditions( std::move(rConditions) ),
maEngine( rEngine ),
maProperties( rProperties )
{
@@ -526,7 +526,7 @@ IMPL_LINK(ScOptSolverDlg, BtnHdl, weld::Button&, rBtn, void)
ReadConditions();
std::unique_ptr<ScOptSolverSave> pSave( new ScOptSolverSave(
m_xEdObjectiveCell->GetText(), m_xRbMax->get_active(), m_xRbMin->get_active(), m_xRbValue->get_active(),
- m_xEdTargetValue->GetText(), m_xEdVariableCells->GetText(), maConditions, maEngine, maProperties ) );
+ m_xEdTargetValue->GetText(), m_xEdVariableCells->GetText(), std::vector(maConditions), maEngine, maProperties ) );
mpDocShell->SetSolverSaveData( std::move(pSave) );
response(RET_CLOSE);
}
@@ -564,7 +564,7 @@ IMPL_LINK(ScOptSolverDlg, BtnHdl, weld::Button&, rBtn, void)
maConditions.clear();
std::unique_ptr<ScOptSolverSave> pEmpty( new ScOptSolverSave(
sEmpty, true, false, false,
- sEmpty, sEmpty, maConditions, maEngine, maProperties ) );
+ sEmpty, sEmpty, std::vector(maConditions), maEngine, maProperties ) );
mpDocShell->SetSolverSaveData( std::move(pEmpty) );
ShowConditions();
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index b38059af2d41..97988e390c31 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -25,7 +25,7 @@
#include <tokenarray.hxx>
ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
- const ScViewData& rViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
+ const ScViewData& rViewData, std::map<OUString, ScRangeName*>&& aRangeMap,
const ScAddress& aCursorPos, const bool bUndo )
: ScAnyRefDlgController( pB, pCW, pParent, "modules/scalc/ui/definename.ui", "DefineNameDialog")
, mbUndo( bUndo )
@@ -36,7 +36,7 @@ ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window*
, maErrInvalidNameStr( ScResId(STR_ERR_NAME_INVALID))
, maErrInvalidNameCellRefStr( ScResId(STR_ERR_NAME_INVALID_CELL_REF))
, maErrNameInUse ( ScResId(STR_ERR_NAME_EXISTS))
- , maRangeMap( aRangeMap )
+ , maRangeMap( std::move(aRangeMap) )
, m_xEdName(m_xBuilder->weld_entry("edit"))
, m_xEdRange(new formula::RefEdit(m_xBuilder->weld_entry("range")))
, m_xRbRange(new formula::RefButton(m_xBuilder->weld_button("refbutton")))
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 438cacb4884d..26841c009eb2 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -638,13 +638,13 @@ bool ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoDeleteMulti::ScUndoDeleteMulti(
ScDocShell* pNewDocShell,
bool bNewRows, bool bNeedsRefresh, SCTAB nNewTab,
- const std::vector<sc::ColRowSpan>& rSpans,
+ std::vector<sc::ColRowSpan>&& rSpans,
ScDocumentUniquePtr pUndoDocument, std::unique_ptr<ScRefUndoData> pRefData ) :
ScMoveUndo( pNewDocShell, std::move(pUndoDocument), std::move(pRefData) ),
mbRows(bNewRows),
mbRefresh(bNeedsRefresh),
nTab( nNewTab ),
- maSpans(rSpans)
+ maSpans(std::move(rSpans))
{
SetChangeTrack();
}
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 149da08b5be2..52ee421cc3de 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -36,7 +36,7 @@
ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab,
- ScDocumentUniquePtr pNewUndoDoc, const std::vector<sc::ColRowSpan>& rRanges,
+ ScDocumentUniquePtr pNewUndoDoc, std::vector<sc::ColRowSpan>&& rRanges,
std::unique_ptr<ScOutlineTable> pNewUndoTab,
ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, bool bNewWidth ) :
ScSimpleUndo( pNewDocShell ),
@@ -47,7 +47,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
nEndTab( nNewEndTab ),
pUndoDoc( std::move(pNewUndoDoc) ),
pUndoTab( std::move(pNewUndoTab) ),
- maRanges(rRanges),
+ maRanges( std::move(rRanges) ),
nNewSize( nNewSizeTwips ),
bWidth( bNewWidth ),
eMode( eNewMode )
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 28f8188b34b0..467e93cb7145 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -155,9 +155,9 @@ bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- const std::vector<OUString>& newNameList) :
+ std::vector<OUString>&& newNameList) :
ScSimpleUndo( pNewDocShell ),
- aNameList( newNameList ),
+ aNameList( std::move(newNameList) ),
nTab( nTabNum )
{
pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
@@ -715,9 +715,9 @@ ScUndoTabColor::ScUndoTabColor(
ScUndoTabColor::ScUndoTabColor(
ScDocShell* pNewDocShell,
- const ScUndoTabColorInfo::List& rUndoTabColorList) :
+ ScUndoTabColorInfo::List&& rUndoTabColorList) :
ScSimpleUndo(pNewDocShell),
- aTabColorList(rUndoTabColorList)
+ aTabColorList(std::move(rUndoTabColorList))
{
}
@@ -1086,9 +1086,9 @@ bool ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
return false;
}
-ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, const std::vector<SCTAB>& newUndoTabs, bool bNewShow ) :
+ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, std::vector<SCTAB>&& newUndoTabs, bool bNewShow ) :
ScSimpleUndo( pShell ),
- undoTabs( newUndoTabs ),
+ undoTabs( std::move(newUndoTabs) ),
bShow( bNewShow )
{
}
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index c0b96154e0a6..0b534a820dc3 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -255,14 +255,14 @@ PivotTableDataProvider::createCategoriesDataSource(bool bOrientationIsColumn)
{
uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument,
- lcl_identifierForCategories(), rCategories));
+ lcl_identifierForCategories(), std::vector(rCategories)));
pSequence->setRole("categories");
xResult->setValues(uno::Reference<chart2::data::XDataSequence>(pSequence));
aLabeledSequences.push_back(xResult);
}
- xDataSource.set(new PivotTableDataSource(aLabeledSequences));
+ xDataSource.set(new PivotTableDataSource(std::move(aLabeledSequences)));
return xDataSource;
}
@@ -583,7 +583,7 @@ PivotTableDataProvider::assignValuesToDataSequence(size_t nIndex)
OUString sDataID = lcl_identifierForData(nIndex);
std::vector<ValueAndFormat> const & rRowOfData = m_aDataRowVector[nIndex];
- rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, sDataID, rRowOfData));
+ rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument, sDataID, std::vector(rRowOfData)));
pSequence->setRole("values-y");
xDataSequence = pSequence;
return xDataSequence;
@@ -622,7 +622,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t nIndex)
std::vector<ValueAndFormat> aLabelVector { ValueAndFormat(aLabel.makeStringAndClear()) };
rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument,
- sLabelID, aLabelVector));
+ sLabelID, std::move(aLabelVector)));
pSequence->setRole("values-y");
xDataSequence = pSequence;
return xDataSequence;
@@ -639,7 +639,7 @@ css::uno::Reference<css::chart2::data::XDataSequence>
std::vector<ValueAndFormat> const & rCategories = m_aCategoriesColumnOrientation.back();
rtl::Reference<PivotTableDataSequence> pSequence(new PivotTableDataSequence(m_pDocument,
- lcl_identifierForCategories(), rCategories));
+ lcl_identifierForCategories(), std::vector(rCategories)));
pSequence->setRole("categories");
xDataSequence = pSequence;
@@ -673,7 +673,7 @@ uno::Reference<chart2::data::XDataSource>
}
}
- xDataSource.set(new PivotTableDataSource(aLabeledSequences));
+ xDataSource.set(new PivotTableDataSource(std::move(aLabeledSequences)));
return xDataSource;
}
diff --git a/sc/source/ui/unoobj/PivotTableDataSequence.cxx b/sc/source/ui/unoobj/PivotTableDataSequence.cxx
index 565a67cb2d3c..330cca25dfb8 100644
--- a/sc/source/ui/unoobj/PivotTableDataSequence.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataSequence.cxx
@@ -40,10 +40,10 @@ static const SfxItemPropertyMapEntry* lcl_GetDataSequencePropertyMap()
}
PivotTableDataSequence::PivotTableDataSequence(ScDocument* pDocument, OUString const & sID,
- std::vector<ValueAndFormat> const & rData)
+ std::vector<ValueAndFormat>&& rData)
: m_pDocument(pDocument)
, m_aID(sID)
- , m_aData(rData)
+ , m_aData(std::move(rData))
, m_aPropSet(lcl_GetDataSequencePropertyMap())
{
if (m_pDocument)
@@ -165,7 +165,7 @@ uno::Reference<util::XCloneable> SAL_CALL PivotTableDataSequence::createClone()
{
SolarMutexGuard aGuard;
- rtl::Reference<PivotTableDataSequence> pClone(new PivotTableDataSequence(m_pDocument, m_aID, m_aData));
+ rtl::Reference<PivotTableDataSequence> pClone(new PivotTableDataSequence(m_pDocument, m_aID, std::vector(m_aData)));
pClone->setRole(m_aRole);
return pClone;
diff --git a/sc/source/ui/unoobj/PivotTableDataSource.cxx b/sc/source/ui/unoobj/PivotTableDataSource.cxx
index a31469d94faf..5c47f0d12799 100644
--- a/sc/source/ui/unoobj/PivotTableDataSource.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataSource.cxx
@@ -23,8 +23,8 @@ namespace sc
SC_SIMPLE_SERVICE_INFO(PivotTableDataSource, "PivotTableDataSource", "com.sun.star.chart2.data.DataSource")
-PivotTableDataSource::PivotTableDataSource(const std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>& xLabeledSequence)
- : m_xLabeledSequence(xLabeledSequence)
+PivotTableDataSource::PivotTableDataSource(std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence>>&& xLabeledSequence)
+ : m_xLabeledSequence(std::move(xLabeledSequence))
{
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 4c3d7456c2b3..209bef5f7ac5 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -9250,12 +9250,12 @@ uno::Reference<container::XEnumeration> SAL_CALL ScUniqueCellFormatsObj::createE
{
SolarMutexGuard aGuard;
if (pDocShell)
- return new ScUniqueCellFormatsEnumeration( pDocShell, aRangeLists );
+ return new ScUniqueCellFormatsEnumeration( pDocShell, std::vector(aRangeLists) );
return nullptr;
}
-ScUniqueCellFormatsEnumeration::ScUniqueCellFormatsEnumeration(ScDocShell* pDocSh, const std::vector<ScRangeList>& rRangeLists) :
- aRangeLists(rRangeLists),
+ScUniqueCellFormatsEnumeration::ScUniqueCellFormatsEnumeration(ScDocShell* pDocSh, std::vector<ScRangeList>&& rRangeLists) :
+ aRangeLists(std::move(rRangeLists)),
pDocShell( pDocSh ),
nCurrentPosition(0)
{
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index e5f058f8aaa8..0b945a182419 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2024,7 +2024,7 @@ void ScDataPilotFieldObj::setFunction(ScGeneralFunction eNewFunc)
{
nSubTotalFuncs.push_back( eNewFunc );
}
- pDim->SetSubTotals( nSubTotalFuncs );
+ pDim->SetSubTotals( std::move(nSubTotalFuncs) );
}
else
pDim->SetFunction( eNewFunc );
@@ -2071,7 +2071,7 @@ void ScDataPilotFieldObj::setSubtotals( const std::vector< ScGeneralFunction >&
{
nTmpFuncs.push_back( rSubtotals[ 0 ] );
}
- pDim->SetSubTotals( nTmpFuncs );
+ pDim->SetSubTotals( std::move(nTmpFuncs) );
}
else if( nCount > 1 )
{
@@ -2088,7 +2088,7 @@ void ScDataPilotFieldObj::setSubtotals( const std::vector< ScGeneralFunction >&
}
}
// set values from vector to ScDPSaveDimension
- pDim->SetSubTotals( aSubt );
+ pDim->SetSubTotals( std::move(aSubt) );
}
}
SetDPObject( pDPObj );
@@ -2282,7 +2282,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
aGroup.maMembers.push_back( *pMem );
aGroups.push_back( aGroup );
}
- aInfo.Groups = new ScDataPilotFieldGroupsObj( aGroups );
+ aInfo.Groups = new ScDataPilotFieldGroupsObj( std::move(aGroups) );
}
}
else if( const ScDPSaveNumGroupDimension* pNumGroupDim = pDimData->GetNumGroupDim( pDim->GetName() ) )
@@ -2720,8 +2720,8 @@ bool lclExtractGroupMembers( ScFieldGroupMembers& rMembers, const Any& rElement
} // namespace
-ScDataPilotFieldGroupsObj::ScDataPilotFieldGroupsObj( const ScFieldGroups& rGroups ) :
- maGroups( rGroups )
+ScDataPilotFieldGroupsObj::ScDataPilotFieldGroupsObj( ScFieldGroups&& rGroups ) :
+ maGroups( std::move(rGroups) )
{
}
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index 6f523c8c1d72..1aa4e77e83ea 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -139,7 +139,7 @@ sal_Int32 ScVbaFileDialog::Show()
}
m_xItems = css::uno::Reference< ov::excel::XFileDialogSelectedItems >(
- new ScVbaFileDialogSelectedItems(this, mxContext, sSelectedPaths) );
+ new ScVbaFileDialogSelectedItems(this, mxContext, std::move(sSelectedPaths)) );
return nRet;
}
diff --git a/sc/source/ui/vba/vbafiledialogitems.cxx b/sc/source/ui/vba/vbafiledialogitems.cxx
index 14c7853ee178..20ca30e3bf89 100644
--- a/sc/source/ui/vba/vbafiledialogitems.cxx
+++ b/sc/source/ui/vba/vbafiledialogitems.cxx
@@ -28,7 +28,7 @@ class FileDialogItemEnumeration : public ::cppu::WeakImplHelper< container::XEnu
std::vector< OUString > m_sItems;
std::vector< OUString >::iterator mIt;
public:
- explicit FileDialogItemEnumeration( const std::vector< OUString >& rVector ) : m_sItems( rVector ), mIt( m_sItems.begin() ) {}
+ explicit FileDialogItemEnumeration( std::vector< OUString >&& rVector ) : m_sItems( std::move(rVector) ), mIt( m_sItems.begin() ) {}
virtual sal_Bool SAL_CALL hasMoreElements() override
{
return ( mIt != m_sItems.end() );
@@ -47,9 +47,9 @@ public:
ScVbaFileDialogSelectedItems::ScVbaFileDialogSelectedItems(
const css::uno::Reference< ov::XHelperInterface >& xParent
,const css::uno::Reference< css::uno::XComponentContext >& xContext
- ,const std::vector< OUString >& rItems)
+ ,std::vector< OUString >&& rItems)
: FileDialogSelectedItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() )
- , m_sItems(rItems) {}
+ , m_sItems(std::move(rItems)) {}
// XEnumerationAccess
@@ -62,7 +62,7 @@ ScVbaFileDialogSelectedItems::getElementType()
uno::Reference< container::XEnumeration >
ScVbaFileDialogSelectedItems::createEnumeration()
{
- return uno::Reference< container::XEnumeration >( new FileDialogItemEnumeration( m_sItems ) );
+ return uno::Reference< container::XEnumeration >( new FileDialogItemEnumeration( std::vector(m_sItems) ) );
}
uno::Any
diff --git a/sc/source/ui/vba/vbafiledialogitems.hxx b/sc/source/ui/vba/vbafiledialogitems.hxx
index fa56fde53a7f..7a656237359b 100644
--- a/sc/source/ui/vba/vbafiledialogitems.hxx
+++ b/sc/source/ui/vba/vbafiledialogitems.hxx
@@ -17,7 +17,9 @@ class ScVbaFileDialogSelectedItems final : public FileDialogSelectedItems_BASE
{
const std::vector<OUString> m_sItems;
public:
- ScVbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const std::vector<OUString>& sItems);
+ ScVbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ std::vector<OUString>&& sItems);
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() override;
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 1691fbbc3bf3..f43775f1fc88 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -72,7 +72,8 @@ public:
Sheets::const_iterator m_it;
/// @throws uno::RuntimeException
- SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, const Sheets& sheets, const uno::Reference< frame::XModel >& xModel ) : m_xContext( xContext ), m_sheets( sheets ), m_xModel( xModel )
+ SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, Sheets&& sheets, const uno::Reference< frame::XModel >& xModel )
+ : m_xContext( xContext ), m_sheets( std::move(sheets) ), m_xModel( xModel )
{
m_it = m_sheets.begin();
}
@@ -133,7 +134,7 @@ public:
//XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override
{
- return new SelectedSheetsEnum( m_xContext, sheets, m_xModel );
+ return new SelectedSheetsEnum( m_xContext, std::vector(sheets), m_xModel );
}
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount( ) override
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index 45f215eea41d..9108913df41b 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -65,7 +65,8 @@ protected:
public:
/// @throws uno::RuntimeException
- WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const Components& components ) : m_xContext( xContext ), m_components( components )
+ WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, Components&& components )
+ : m_xContext( xContext ), m_components( std::move(components) )
{
m_it = m_components.begin();
}
@@ -151,7 +152,7 @@ public:
//XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override
{
- return new WindowComponentEnumImpl( m_xContext, m_windows );
+ return new WindowComponentEnumImpl( m_xContext, std::vector(m_windows) );
}
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount( ) override
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index d1acee975d3c..f1231cabf4ea 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -56,7 +56,7 @@ class WorkSheetsEnumeration : public ::cppu::WeakImplHelper< container::XEnumera
SheetMap mSheetMap;
SheetMap::iterator mIt;
public:
- explicit WorkSheetsEnumeration( const SheetMap& sMap ) : mSheetMap( sMap ), mIt( mSheetMap.begin() ) {}
+ explicit WorkSheetsEnumeration( SheetMap&& sMap ) : mSheetMap( std::move(sMap) ), mIt( mSheetMap.begin() ) {}
virtual sal_Bool SAL_CALL hasMoreElements( ) override
{
return ( mIt != mSheetMap.end() );
@@ -77,7 +77,7 @@ class SheetCollectionHelper : public ::cppu::WeakImplHelper< container::XNameAcc
SheetMap mSheetMap;
SheetMap::iterator cachePos;
public:
- explicit SheetCollectionHelper( const SheetMap& sMap ) : mSheetMap( sMap ), cachePos(mSheetMap.begin()) {}
+ explicit SheetCollectionHelper( SheetMap&& sMap ) : mSheetMap( std::move(sMap) ), cachePos(mSheetMap.begin()) {}
// XElementAccess
virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<sheet::XSpreadsheet>::get(); }
virtual sal_Bool SAL_CALL hasElements( ) override { return ( !mSheetMap.empty() ); }
@@ -127,7 +127,7 @@ public:
// XEnumerationAccess
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override
{
- return new WorkSheetsEnumeration( mSheetMap );
+ return new WorkSheetsEnumeration( std::vector(mSheetMap) );
}
};
@@ -439,7 +439,7 @@ ScVbaWorksheets::Item(const uno::Any& Index, const uno::Any& Index2)
uno::Reference< container::XNamed > xName( xSheet, uno::UNO_QUERY_THROW );
aSheets.push_back( xSheet );
}
- uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( aSheets );
+ uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( std::move(aSheets) );
uno::Reference< XCollection > xSelectedSheets( new ScVbaWorksheets( getParent(), mxContext, xIndexAccess, mxModel ) );
return uno::makeAny( xSelectedSheets );
}
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index cb9fcba6f2d3..7807288fa123 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -342,12 +342,12 @@ void ScTabView::InvalidateAttribs()
namespace {
-void collectUIInformation(const std::map<OUString, OUString>& aParameters)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = "SELECT";
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 4dc3cf3bdb46..e43cb2ff31bc 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -214,7 +214,7 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
{
std::map<OUString, ScRangeName*> aRangeMap;
rDoc.GetRangeNameMap(aRangeMap);
- xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, GetViewData(), aRangeMap,
+ xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, GetViewData(), std::move(aRangeMap),
ScAddress(GetViewData().GetCurX(),
GetViewData().GetCurY(),
GetViewData().GetTabNo()), true);
@@ -226,7 +226,7 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
{
aRangeMap.insert(std::pair<OUString, ScRangeName*>(itr.first, itr.second.get()));
}
- xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, GetViewData(), aRangeMap,
+ xResult = std::make_shared<ScNameDefDlg>(pB, pCW, pParent, GetViewData(), std::move(aRangeMap),
ScAddress(GetViewData().GetCurX(),
GetViewData().GetCurY(),
GetViewData().GetTabNo()), false);
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index fdf24fe0cffa..cf43eee2403a 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -94,12 +94,12 @@ void lcl_LOKRemoveWindow(ScTabViewShell* pTabViewShell, ScSplitPos eWhich)
namespace {
-void collectUIInformation(const std::map<OUString, OUString>& aParameters, const OUString& rAction)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUString& rAction)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = rAction;
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 964a9ef2e100..d4675b98c4c5 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -95,12 +95,12 @@ using ::editeng::SvxBorderLine;
namespace {
-void collectUIInformation(const std::map<OUString, OUString>& aParameters, const OUString& rAction)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUString& rAction)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = rAction;
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
@@ -2379,7 +2379,7 @@ void ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab,
if (bRecord)
pDocSh->GetUndoManager()->AddUndoAction(
- std::make_unique<ScUndoInsertTables>( pDocSh, nTab, aNames));
+ std::make_unique<ScUndoInsertTables>( pDocSh, nTab, std::move(aNames)));
// Update views
@@ -3182,7 +3182,7 @@ void ScViewFunc::ShowTable( const std::vector<OUString>& rNames )
{
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( pDocSh, undoTabs, true ) );
+ pDocSh->GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( pDocSh, std::move(undoTabs), true ) );
}
pDocSh->PostPaint(0,0,0,rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB, PaintPartFlags::Extras);
pDocSh->SetDocumentModified();
@@ -3230,7 +3230,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark, SCTAB nTabToSelect )
if (bUndo)
{
- pDocSh->GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( pDocSh, undoTabs, false ) );
+ pDocSh->GetUndoManager()->AddUndoAction( std::make_unique<ScUndoShowHideTab>( pDocSh, std::move(undoTabs), false ) );
}
// Update views
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index fd14410929ad..32d934c92c29 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -68,12 +68,12 @@ using namespace com::sun::star;
namespace {
-void collectUIInformation(const std::map<OUString, OUString>& aParameters, const OUString& action)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUString& action)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = action;
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index e3c725dcb4f0..b6c1e92ea5c7 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -102,12 +102,12 @@ ScViewFunc::~ScViewFunc()
namespace {
-void collectUIInformation(const std::map<OUString, OUString>& aParameters, const OUString& rAction)
+void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUString& rAction)
{
EventDescription aDescription;
aDescription.aID = "grid_window";
aDescription.aAction = rAction;
- aDescription.aParameters = aParameters;
+ aDescription.aParameters = std::move(aParameters);
aDescription.aParent = "MainWindow";
aDescription.aKeyWord = "ScGridWinUIObject";
@@ -1906,7 +1906,7 @@ void ScViewFunc::DeleteMulti( bool bRows )
{
pDocSh->GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoDeleteMulti>(
- pDocSh, bRows, bNeedRefresh, nTab, aSpans, std::move(pUndoDoc), std::move(pUndoData)));
+ pDocSh, bRows, bNeedRefresh, nTab, std::vector(aSpans), std::move(pUndoDoc), std::move(pUndoData)));
}
if (!AdjustRowHeight(0, rDoc.MaxRow(), true))
@@ -2258,7 +2258,7 @@ void ScViewFunc::SetWidthOrHeight(
pDocSh->GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoWidthOrHeight>(
pDocSh, aMarkData, nStart, nCurTab, nEnd, nCurTab,
- std::move(pUndoDoc), aUndoRanges, std::move(pUndoTab), eMode, nSizeTwips, bWidth));
+ std::move(pUndoDoc), std::move(aUndoRanges), std::move(pUndoTab), eMode, nSizeTwips, bWidth));
}
if (nCurX < 0)