diff options
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r-- | sc/source/ui/undo/UndoDeleteSparklineGroup.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/undo/UndoEditSparkline.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/undo/UndoEditSparklineGroup.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/undo/UndoGroupSparklines.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/undo/UndoInsertSparkline.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/undo/undobase.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 29 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk2.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk3.cxx | 95 | ||||
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/undo/undodat.cxx | 17 | ||||
-rw-r--r-- | sc/source/ui/undo/undosort.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/undo/undostyl.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 35 |
14 files changed, 136 insertions, 123 deletions
diff --git a/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx b/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx index 9a8e4eb5df48..71702560b03c 100644 --- a/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx +++ b/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx @@ -16,13 +16,14 @@ #include <Sparkline.hxx> #include <SparklineList.hxx> #include <SparklineGroup.hxx> +#include <utility> namespace sc { UndoDeleteSparklineGroup::UndoDeleteSparklineGroup( - ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup, SCTAB nTab) + ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> pSparklineGroup, SCTAB nTab) : ScSimpleUndo(&rDocShell) - , mpSparklineGroup(pSparklineGroup) + , mpSparklineGroup(std::move(pSparklineGroup)) , mnTab(nTab) { } diff --git a/sc/source/ui/undo/UndoEditSparkline.cxx b/sc/source/ui/undo/UndoEditSparkline.cxx index b1f6f38f5dc4..f33b7fa7aabe 100644 --- a/sc/source/ui/undo/UndoEditSparkline.cxx +++ b/sc/source/ui/undo/UndoEditSparkline.cxx @@ -14,17 +14,18 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> +#include <utility> namespace sc { UndoEditSparkline::UndoEditSparkline(ScDocShell& rDocShell, - std::shared_ptr<sc::Sparkline> const& rpSparkline, SCTAB nTab, - ScRangeList const& rDataRange) + std::shared_ptr<sc::Sparkline> pSparkline, SCTAB nTab, + ScRangeList aDataRange) : ScSimpleUndo(&rDocShell) - , mpSparkline(rpSparkline) + , mpSparkline(std::move(pSparkline)) , mnTab(nTab) , maOldDataRange(mpSparkline->getInputRange()) - , maNewDataRange(rDataRange) + , maNewDataRange(std::move(aDataRange)) { } diff --git a/sc/source/ui/undo/UndoEditSparklineGroup.cxx b/sc/source/ui/undo/UndoEditSparklineGroup.cxx index 8136003d6b20..dbe7a7b59987 100644 --- a/sc/source/ui/undo/UndoEditSparklineGroup.cxx +++ b/sc/source/ui/undo/UndoEditSparklineGroup.cxx @@ -16,15 +16,16 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineAttributes.hxx> +#include <utility> namespace sc { UndoEditSparklneGroup::UndoEditSparklneGroup( ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup, - sc::SparklineAttributes const& rAttributes) + sc::SparklineAttributes aAttributes) : ScSimpleUndo(&rDocShell) , m_pSparklineGroup(pSparklineGroup) - , m_aNewAttributes(rAttributes) + , m_aNewAttributes(std::move(aAttributes)) , m_aOriginalAttributes(pSparklineGroup->getAttributes()) { } diff --git a/sc/source/ui/undo/UndoGroupSparklines.cxx b/sc/source/ui/undo/UndoGroupSparklines.cxx index ac2182714fc1..c8570995b655 100644 --- a/sc/source/ui/undo/UndoGroupSparklines.cxx +++ b/sc/source/ui/undo/UndoGroupSparklines.cxx @@ -16,15 +16,15 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineAttributes.hxx> +#include <utility> namespace sc { -UndoGroupSparklines::UndoGroupSparklines( - ScDocShell& rDocShell, ScRange const& rRange, - std::shared_ptr<sc::SparklineGroup> const& rpSparklineGroup) +UndoGroupSparklines::UndoGroupSparklines(ScDocShell& rDocShell, ScRange const& rRange, + std::shared_ptr<sc::SparklineGroup> pSparklineGroup) : ScSimpleUndo(&rDocShell) , m_aRange(rRange) - , m_pSparklineGroup(rpSparklineGroup) + , m_pSparklineGroup(std::move(pSparklineGroup)) { } diff --git a/sc/source/ui/undo/UndoInsertSparkline.cxx b/sc/source/ui/undo/UndoInsertSparkline.cxx index c35cc3f6dc03..708f3d746f91 100644 --- a/sc/source/ui/undo/UndoInsertSparkline.cxx +++ b/sc/source/ui/undo/UndoInsertSparkline.cxx @@ -15,15 +15,16 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineData.hxx> +#include <utility> namespace sc { UndoInsertSparkline::UndoInsertSparkline(ScDocShell& rDocShell, - std::vector<SparklineData> const& rSparklineDataVector, + std::vector<SparklineData> aSparklineDataVector, std::shared_ptr<sc::SparklineGroup> pSparklineGroup) : ScSimpleUndo(&rDocShell) - , maSparklineDataVector(rSparklineDataVector) - , mpSparklineGroup(pSparklineGroup) + , maSparklineDataVector(std::move(aSparklineDataVector)) + , mpSparklineGroup(std::move(pSparklineGroup)) { } diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index cc7b8069cfe5..c9a233604281 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/virdev.hxx> #include <svx/svdundo.hxx> @@ -343,9 +344,9 @@ void ScBlockUndo::ShowBlock() } ScMultiBlockUndo::ScMultiBlockUndo( - ScDocShell* pDocSh, const ScRangeList& rRanges) : + ScDocShell* pDocSh, ScRangeList aRanges) : ScSimpleUndo(pDocSh), - maBlockRanges(rRanges) + maBlockRanges(std::move(aRanges)) { mpDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ); } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index e3b10f78bca8..68f9351c5897 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -18,6 +18,7 @@ */ #include <scitems.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <editeng/boxitem.hxx> #include <sfx2/app.hxx> @@ -813,9 +814,9 @@ bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoCut::ScUndoCut(ScDocShell* pNewDocShell, const ScRange& aRange, const ScAddress& aOldEnd, - const ScMarkData& rMark, ScDocumentUniquePtr pNewUndoDoc) + ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc) : ScBlockUndo(pNewDocShell, ScRange(aRange.aStart, aOldEnd), SC_UNDO_AUTOHEIGHT) - , aMarkData(rMark) + , aMarkData(std::move(aMark)) , pUndoDoc(std::move(pNewUndoDoc)) , aExtendedRange(aRange) { @@ -912,13 +913,13 @@ bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, const ScRangeList& rRanges, - const ScMarkData& rMark, + ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, InsertDeleteFlags nNewFlags, std::unique_ptr<ScRefUndoData> pRefData, bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) : ScMultiBlockUndo( pNewDocShell, rRanges ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), pUndoDoc( std::move(pNewUndoDoc) ), pRedoDoc( std::move(pNewRedoDoc) ), nFlags( nNewFlags ), @@ -1670,14 +1671,14 @@ bool ScUndoConditionalFormatList::CanRepeat(SfxRepeatTarget& ) const } ScUndoUseScenario::ScUndoUseScenario( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, /*C*/ const ScArea& rDestArea, ScDocumentUniquePtr pNewUndoDoc, - const OUString& rNewName ) : + OUString aNewName ) : ScSimpleUndo( pNewDocShell ), pUndoDoc( std::move(pNewUndoDoc) ), - aMarkData( rMark ), - aName( rNewName ) + aMarkData(std::move( aMark )), + aName(std::move( aNewName )) { aRange.aStart.SetCol(rDestArea.nColStart); aRange.aStart.SetRow(rDestArea.nRowStart); @@ -1789,14 +1790,14 @@ bool ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoSelectionStyle::ScUndoSelectionStyle( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, const ScRange& rRange, - const OUString& rName, + OUString aName, ScDocumentUniquePtr pNewUndoDoc ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), pUndoDoc( std::move(pNewUndoDoc) ), - aStyleName( rName ), + aStyleName(std::move( aName )), aRange( rRange ) { aMarkData.MarkToMulti(); @@ -1893,10 +1894,10 @@ bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoEnterMatrix::ScUndoEnterMatrix( ScDocShell* pNewDocShell, const ScRange& rArea, - ScDocumentUniquePtr pNewUndoDoc, const OUString& rForm ) : + ScDocumentUniquePtr pNewUndoDoc, OUString aForm ) : ScBlockUndo( pNewDocShell, rArea, SC_UNDO_SIMPLE ), pUndoDoc( std::move(pNewUndoDoc) ), - aFormula( rForm ) + aFormula(std::move( aForm )) { SetChangeTrack(); } diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 52ee421cc3de..c296d0b811c1 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -31,16 +31,17 @@ #include <undoolk.hxx> #include <svx/svdundo.hxx> +#include <utility> /** Change column widths or row heights */ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab, ScDocumentUniquePtr pNewUndoDoc, std::vector<sc::ColRowSpan>&& rRanges, std::unique_ptr<ScOutlineTable> pNewUndoTab, ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, bool bNewWidth ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), nStart( nNewStart ), nEnd( nNewEnd ), nStartTab( nNewStartTab ), diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 4aa05b5780e8..79c4c7252705 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -26,6 +26,7 @@ #include <editeng/justifyitem.hxx> #include <svl/srchitem.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <sfx2/app.hxx> #include <svx/svdundo.hxx> @@ -57,12 +58,12 @@ ScUndoDeleteContents::ScUndoDeleteContents( ScDocShell* pNewDocShell, - const ScMarkData& rMark, const ScRange& rRange, + ScMarkData aMark, const ScRange& rRange, ScDocumentUniquePtr&& pNewUndoDoc, bool bNewMulti, InsertDeleteFlags nNewFlags, bool bObjects ) : ScSimpleUndo( pNewDocShell ), aRange ( rRange ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), nFlags ( nNewFlags ), bMulti ( bNewMulti ) // unnecessary @@ -203,14 +204,14 @@ bool ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, SCTAB nSrc, InsertDeleteFlags nFlg, ScPasteFunc nFunc, bool bSkip, bool bLink ) : ScSimpleUndo( pNewDocShell ), aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), nFlags ( nFlg ), nFunction ( nFunc ), @@ -339,7 +340,7 @@ bool ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, @@ -347,7 +348,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell, const SvxBoxItem* pNewOuter, const SvxBoxInfoItem* pNewInner, const ScRange* pRangeCover ) : ScSimpleUndo( pNewDocShell ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), mpDataArray(new ScEditDataArray), pUndoDoc ( std::move(pNewUndoDoc) ), @@ -482,12 +483,12 @@ bool ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell, const ScRange& rRange, const ScRange& rSourceArea, - ScDocumentUniquePtr pNewUndoDoc, const ScMarkData& rMark, + ScDocumentUniquePtr pNewUndoDoc, ScMarkData aMark, FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, double fNewStartValue, double fNewStepValue, double fNewMaxValue ) : ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ), aSource ( rSourceArea ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), eFillDir ( eNewFillDir ), eFillCmd ( eNewFillCmd ), @@ -634,10 +635,10 @@ bool ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoMerge::ScUndoMerge(ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, +ScUndoMerge::ScUndoMerge(ScDocShell* pNewDocShell, ScCellMergeOption aOption, bool bMergeContents, ScDocumentUniquePtr pUndoDoc, std::unique_ptr<SdrUndoAction> pDrawUndo) : ScSimpleUndo(pNewDocShell) - , maOption(rOption) + , maOption(std::move(aOption)) , mbMergeContents(bMergeContents) , mxUndoDoc(std::move(pUndoDoc)) , mpDrawUndo(std::move(pDrawUndo)) @@ -766,10 +767,10 @@ bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell, const ScRange& rRange, ScDocumentUniquePtr pNewUndoDoc, - const ScMarkData& rMark, bool bNewSize, sal_uInt16 nNewFormatNo ) + ScMarkData aMark, bool bNewSize, sal_uInt16 nNewFormatNo ) : ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ), pUndoDoc ( std::move(pNewUndoDoc) ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), bSize ( bNewSize ), nFormatNo ( nNewFormatNo ) { @@ -914,14 +915,14 @@ bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoReplace::ScUndoReplace( ScDocShell* pNewDocShell, const ScMarkData& rMark, +ScUndoReplace::ScUndoReplace( ScDocShell* pNewDocShell, ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - const OUString& rNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, + OUString aNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, const SvxSearchItem* pItem ) : ScSimpleUndo( pNewDocShell ), aCursorPos ( nCurX, nCurY, nCurZ ), - aMarkData ( rMark ), - aUndoStr ( rNewUndoStr ), + aMarkData (std::move( aMark )), + aUndoStr (std::move( aNewUndoStr )), pUndoDoc ( std::move(pNewUndoDoc) ) { pSearchItem.reset( new SvxSearchItem( *pItem ) ); @@ -1168,17 +1169,17 @@ bool ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoConversion::ScUndoConversion( - ScDocShell* pNewDocShell, const ScMarkData& rMark, + ScDocShell* pNewDocShell, ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScDocumentUniquePtr pNewUndoDoc, SCCOL nNewX, SCROW nNewY, SCTAB nNewZ, ScDocumentUniquePtr pNewRedoDoc, - const ScConversionParam& rConvParam ) : + ScConversionParam aConvParam ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), aCursorPos( nCurX, nCurY, nCurZ ), pUndoDoc( std::move(pNewUndoDoc) ), aNewCursorPos( nNewX, nNewY, nNewZ ), pRedoDoc( std::move(pNewRedoDoc) ), - maConvParam( rConvParam ) + maConvParam(std::move( aConvParam )) { SetChangeTrack(); } @@ -1279,10 +1280,10 @@ bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell, - const ScRange& aMarkRange, const ScMarkData& rMark, + const ScRange& aMarkRange, ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, bool bNewMulti) : ScSimpleUndo( pNewDocShell ), -aMarkData ( rMark ), +aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), pRedoDoc ( std::move(pNewRedoDoc) ), aRange ( aMarkRange ), @@ -1484,15 +1485,15 @@ static ScAreaLink* lcl_FindAreaLink( const sfx2::LinkManager* pLinkManager, std: } ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell, - const OUString& rDoc, - const OUString& rFlt, const OUString& rOpt, - const OUString& rArea, const ScRange& rDestRange, + OUString aDoc, + OUString aFlt, OUString aOpt, + OUString aArea, const ScRange& rDestRange, sal_uLong nRefresh ) : ScSimpleUndo ( pShell ), - aDocName ( rDoc ), - aFltName ( rFlt ), - aOptions ( rOpt ), - aAreaName ( rArea ), + aDocName (std::move( aDoc )), + aFltName (std::move( aFlt )), + aOptions (std::move( aOpt )), + aAreaName (std::move( aArea )), aRange ( rDestRange ), nRefreshDelay ( nRefresh ) { @@ -1547,14 +1548,14 @@ bool ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell, - const OUString& rDoc, const OUString& rFlt, const OUString& rOpt, - const OUString& rArea, const ScRange& rDestRange, + OUString aDoc, OUString aFlt, OUString aOpt, + OUString aArea, const ScRange& rDestRange, sal_uLong nRefresh ) : ScSimpleUndo ( pShell ), - aDocName ( rDoc ), - aFltName ( rFlt ), - aOptions ( rOpt ), - aAreaName ( rArea ), + aDocName (std::move( aDoc )), + aFltName (std::move( aFlt )), + aOptions (std::move( aOpt )), + aAreaName (std::move( aArea )), aRange ( rDestRange ), nRefreshDelay ( nRefresh ) { @@ -1609,21 +1610,21 @@ bool ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell, - const OUString& rOldD, const OUString& rOldF, const OUString& rOldO, - const OUString& rOldA, const ScRange& rOldR, sal_uLong nOldRD, - const OUString& rNewD, const OUString& rNewF, const OUString& rNewO, - const OUString& rNewA, const ScRange& rNewR, sal_uLong nNewRD, + OUString aOldD, OUString aOldF, OUString aOldO, + OUString aOldA, const ScRange& rOldR, sal_uLong nOldRD, + OUString aNewD, OUString aNewF, OUString aNewO, + OUString aNewA, const ScRange& rNewR, sal_uLong nNewRD, ScDocumentUniquePtr pUndo, ScDocumentUniquePtr pRedo, bool bDoInsert ) : ScSimpleUndo( pShell ), - aOldDoc ( rOldD ), - aOldFlt ( rOldF ), - aOldOpt ( rOldO ), - aOldArea ( rOldA ), + aOldDoc (std::move( aOldD )), + aOldFlt (std::move( aOldF )), + aOldOpt (std::move( aOldO )), + aOldArea (std::move( aOldA )), aOldRange ( rOldR ), - aNewDoc ( rNewD ), - aNewFlt ( rNewF ), - aNewOpt ( rNewO ), - aNewArea ( rNewA ), + aNewDoc (std::move( aNewD )), + aNewFlt (std::move( aNewF )), + aNewOpt (std::move( aNewO )), + aNewArea (std::move( aNewA )), aNewRange ( rNewR ), xUndoDoc ( std::move(pUndo) ), xRedoDoc ( std::move(pRedo) ), diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 480238023ef5..b306dcd83a07 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -42,6 +42,7 @@ #include <rangenam.hxx> #include <chgtrack.hxx> #include <stringutil.hxx> +#include <utility> namespace HelperNotifyChanges { @@ -159,9 +160,9 @@ ScUndoEnterData::Value::Value() : mnTab(-1), mbHasFormat(false), mnFormat(0) {} ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell, const ScAddress& rPos, ValuesType& rOldValues, - const OUString& rNewStr, std::unique_ptr<EditTextObject> pObj ) : + OUString aNewStr, std::unique_ptr<EditTextObject> pObj ) : ScSimpleUndo( pNewDocShell ), - maNewString(rNewStr), + maNewString(std::move(aNewStr)), mpNewEditData(std::move(pObj)), mnEndChangeAction(0), maPos(rPos) @@ -306,10 +307,10 @@ bool ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - const ScCellValue& rUndoCell, double nVal ) : + ScCellValue aUndoCell, double nVal ) : ScSimpleUndo( pNewDocShell ), aPos ( rNewPos ), - maOldCell(rUndoCell), + maOldCell(std::move(aUndoCell)), nValue ( nVal ) { SetChangeTrack(); @@ -380,8 +381,8 @@ bool ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const return false; } -ScUndoSetCell::ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, const ScCellValue& rOldVal, const ScCellValue& rNewVal ) : - ScSimpleUndo(pDocSh), maPos(rPos), maOldValue(rOldVal), maNewValue(rNewVal), mnEndChangeAction(0) +ScUndoSetCell::ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, ScCellValue aOldVal, ScCellValue aNewVal ) : + ScSimpleUndo(pDocSh), maPos(rPos), maOldValue(std::move(aOldVal)), maNewValue(std::move(aNewVal)), mnEndChangeAction(0) { SetChangeTrack(); } @@ -640,13 +641,13 @@ bool ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoThesaurus::ScUndoThesaurus( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, - const ScCellValue& rOldText, const ScCellValue& rNewText ) : + ScCellValue aOldText, ScCellValue aNewText ) : ScSimpleUndo( pNewDocShell ), nCol( nNewCol ), nRow( nNewRow ), nTab( nNewTab ), - maOldText(rOldText), - maNewText(rNewText) + maOldText(std::move(aOldText)), + maNewText(std::move(aNewText)) { SetChangeTrack(maOldText); } @@ -740,11 +741,11 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP } ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rPos, - const ScNoteData& rOldData, const ScNoteData& rNewData, std::unique_ptr<SdrUndoAction> pDrawUndo ) : + ScNoteData aOldData, ScNoteData aNewData, std::unique_ptr<SdrUndoAction> pDrawUndo ) : ScSimpleUndo( &rDocShell ), maPos( rPos ), - maOldData( rOldData ), - maNewData( rNewData ), + maOldData(std::move( aOldData )), + maNewData(std::move( aNewData )), mpDrawUndo( std::move(pDrawUndo) ) { OSL_ENSURE( maOldData.mxCaption || maNewData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" ); diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index 1ab89a8b543f..498060839ab1 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -44,6 +44,7 @@ #include <chgtrack.hxx> #include <refundo.hxx> #include <markdata.hxx> +#include <utility> // Show or hide outline groups @@ -897,9 +898,9 @@ bool ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const // Show or hide AutoFilter buttons (doesn't include filter settings) ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange, - const OUString& rName, bool bSet ) : + OUString aName, bool bSet ) : ScDBFuncUndo( pNewDocShell, rRange ), - aDBName( rName ), + aDBName(std::move( aName )), bFilterSet( bSet ) { } @@ -1685,11 +1686,11 @@ void ScUndoChartData::Init() rDoc.GetOldChartParameters( aChartName, *aOldRangeListRef, bOldColHeaders, bOldRowHeaders ); } -ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rName, +ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, OUString aName, const ScRange& rNew, bool bColHdr, bool bRowHdr, bool bAdd ) : ScSimpleUndo( pNewDocShell ), - aChartName( rName ), + aChartName(std::move( aName )), bOldColHeaders(false), bOldRowHeaders(false), bNewColHeaders( bColHdr ), @@ -1702,14 +1703,14 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rNam Init(); } -ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rName, - const ScRangeListRef& rNew, bool bColHdr, bool bRowHdr, +ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, OUString aName, + ScRangeListRef xNew, bool bColHdr, bool bRowHdr, bool bAdd ) : ScSimpleUndo( pNewDocShell ), - aChartName( rName ), + aChartName(std::move( aName )), bOldColHeaders(false), bOldRowHeaders(false), - aNewRangeListRef( rNew ), + aNewRangeListRef(std::move( xNew )), bNewColHeaders( bColHdr ), bNewRowHeaders( bRowHdr ), bAddRange( bAdd ) diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx index ed65c760e8f4..4a8844720246 100644 --- a/sc/source/ui/undo/undosort.cxx +++ b/sc/source/ui/undo/undosort.cxx @@ -12,11 +12,12 @@ #include <scresid.hxx> #include <global.hxx> #include <undoutil.hxx> +#include <utility> namespace sc { -UndoSort::UndoSort( ScDocShell* pDocSh, const ReorderParam& rParam ) : - ScSimpleUndo(pDocSh), maParam(rParam) {} +UndoSort::UndoSort( ScDocShell* pDocSh, ReorderParam aParam ) : + ScSimpleUndo(pDocSh), maParam(std::move(aParam)) {} OUString UndoSort::GetComment() const { diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index b0c17277a34d..74fd7590c077 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -18,6 +18,7 @@ */ #include <svl/itemset.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <osl/diagnose.h> @@ -219,15 +220,15 @@ bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const // apply page style -ScUndoApplyPageStyle::ApplyStyleEntry::ApplyStyleEntry( SCTAB nTab, const OUString& rOldStyle ) : +ScUndoApplyPageStyle::ApplyStyleEntry::ApplyStyleEntry( SCTAB nTab, OUString aOldStyle ) : mnTab( nTab ), - maOldStyle( rOldStyle ) + maOldStyle(std::move( aOldStyle )) { } -ScUndoApplyPageStyle::ScUndoApplyPageStyle( ScDocShell* pDocSh, const OUString& rNewStyle ) : +ScUndoApplyPageStyle::ScUndoApplyPageStyle( ScDocShell* pDocSh, OUString aNewStyle ) : ScSimpleUndo( pDocSh ), - maNewStyle( rNewStyle ) + maNewStyle(std::move( aNewStyle )) { } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index b898faf8075f..628d80cece58 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -38,6 +38,7 @@ #include <printfun.hxx> #include <chgtrack.hxx> #include <tabprotection.hxx> +#include <utility> #include <viewdata.hxx> #include <progress.hxx> #include <markdata.hxx> @@ -65,9 +66,9 @@ using ::std::vector; ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell, SCTAB nTabNum, bool bApp, - const OUString& rNewName) : + OUString aNewName) : ScSimpleUndo( pNewDocShell ), - sNewName( rNewName ), + sNewName(std::move( aNewName )), nTab( nTabNum ), bAppend( bApp ) { @@ -774,15 +775,15 @@ bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell, SCTAB nSrc, SCTAB nDest, - const OUString& rN, const OUString& rC, + OUString aN, OUString aC, const Color& rCol, ScScenarioFlags nF, const ScMarkData& rMark ) : ScSimpleUndo( pNewDocShell ), mpMarkData(new ScMarkData(rMark)), nSrcTab( nSrc ), nDestTab( nDest ), - aName( rN ), - aComment( rC ), + aName(std::move( aN )), + aComment(std::move( aC )), aColor( rCol ), nFlags( nF ) { @@ -1011,9 +1012,9 @@ bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDocName ) : +ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, OUString _aDocName ) : ScSimpleUndo( pShell ), - aDocName( rDocName ), + aDocName(std::move( _aDocName )), nRefreshDelay( 0 ), nCount( 0 ) { @@ -1365,14 +1366,14 @@ OUString ScUndoPrintRange::GetComment() const } ScUndoScenarioFlags::ScUndoScenarioFlags(ScDocShell* pNewDocShell, SCTAB nT, - const OUString& rON, const OUString& rNN, const OUString& rOC, const OUString& rNC, + OUString aON, OUString aNN, OUString aOC, OUString aNC, const Color& rOCol, const Color& rNCol, ScScenarioFlags nOF, ScScenarioFlags nNF) : ScSimpleUndo( pNewDocShell ), nTab ( nT ), - aOldName ( rON ), - aNewName ( rNN ), - aOldComment ( rOC ), - aNewComment ( rNC ), + aOldName (std::move( aON )), + aNewName (std::move( aNN )), + aOldComment (std::move( aOC )), + aNewComment (std::move( aNC )), aOldColor ( rOCol ), aNewColor ( rNCol ), nOldFlags (nOF), @@ -1434,12 +1435,12 @@ bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const } // (move to different file?) -ScUndoRenameObject::ScUndoRenameObject( ScDocShell* pNewDocShell, const OUString& rPN, - const OUString& rON, const OUString& rNN ) : +ScUndoRenameObject::ScUndoRenameObject( ScDocShell* pNewDocShell, OUString aPN, + OUString aON, OUString aNN ) : ScSimpleUndo( pNewDocShell ), - aPersistName( rPN ), - aOldName ( rON ), - aNewName ( rNN ) + aPersistName(std::move( aPN )), + aOldName (std::move( aON )), + aNewName (std::move( aNN )) { } |