diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-05 08:34:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-05 09:22:51 +0200 |
commit | 17a2c9e8e2361de27013a25e51f3a3ca729f1b31 (patch) | |
tree | 1c89bc104e5630fb71ff0a5b12c464ca2aceebc3 /sc/source/ui | |
parent | 8fa4b0429b514c0d696ebfc2e47418292d7ec367 (diff) |
clang-tidy performance-unnecessary-value-param
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192
Reviewed-on: https://gerrit.libreoffice.org/38400
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlgitem.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/TableFillingAndNavigationTools.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/cellsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/notemark.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/optsolver.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/solvrdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/uiobject.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/undoblk.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/solvrdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/uitest/uiobject.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/notemark.cxx | 2 |
17 files changed, 30 insertions, 28 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 16d4d3142bd7..5b6f8df55add 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -397,13 +397,13 @@ class ScPreviewCellViewForwarder : public ScPreviewViewForwarder ScAddress maCellPos; public: ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos); + const ScAddress& aCellPos); virtual tools::Rectangle GetVisArea() const override; }; ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos) + const ScAddress& aCellPos) : ScPreviewViewForwarder(pViewShell), maCellPos(aCellPos) @@ -433,14 +433,14 @@ class ScPreviewHeaderCellViewForwarder : public ScPreviewViewForwarder bool mbColHeader; public: ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos, + const ScAddress& aCellPos, bool bColHeader); virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos, + const ScAddress& aCellPos, bool bColHeader) : ScPreviewViewForwarder(pViewShell), @@ -472,14 +472,14 @@ class ScPreviewNoteViewForwarder : public ScPreviewViewForwarder bool mbNoteMark; public: ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos, + const ScAddress& aCellPos, bool bNoteMark); virtual tools::Rectangle GetVisArea() const override; }; ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, - ScAddress aCellPos, + const ScAddress& aCellPos, bool bNoteMark) : ScPreviewViewForwarder(pViewShell), diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index 91a886423b2d..501e97b46319 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -90,7 +90,7 @@ void FormulaTemplate::applyNumber(const OUString& aVariable, sal_Int32 aValue) mTemplate = mTemplate.replaceAll(aVariable, OUString::number(aValue)); } -AddressWalker::AddressWalker(ScAddress aInitialAddress) : +AddressWalker::AddressWalker(const ScAddress& aInitialAddress) : mCurrentAddress(aInitialAddress), mMinimumAddress(aInitialAddress), mMaximumAddress(aInitialAddress) @@ -148,7 +148,7 @@ void AddressWalker::push(SCCOL aRelativeCol, SCROW aRelativeRow, SCTAB aRelative mAddressStack.push_back(mCurrentAddress); } -AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, +AddressWalkerWriter::AddressWalkerWriter(const ScAddress& aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, formula::FormulaGrammar::Grammar eGrammar ) : AddressWalker(aInitialAddress), mpDocShell(pDocShell), @@ -263,7 +263,7 @@ ScAddress DataCellIterator::getRelative(int aDelta) // DataRangeIterator -DataRangeIterator::DataRangeIterator(ScRange aInputRange) : +DataRangeIterator::DataRangeIterator(const ScRange& aInputRange) : mInputRange(aInputRange), mIndex(0) {} diff --git a/sc/source/ui/condformat/condformatdlgitem.cxx b/sc/source/ui/condformat/condformatdlgitem.cxx index dc038c806ba5..0bd3fcc99d72 100644 --- a/sc/source/ui/condformat/condformatdlgitem.cxx +++ b/sc/source/ui/condformat/condformatdlgitem.cxx @@ -8,13 +8,15 @@ */ +#include <utility> + #include "scitems.hxx" #include "condformatdlgitem.hxx" ScCondFormatDlgItem::ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList> pCondFormats, sal_Int32 nItem, bool bManaged): SfxPoolItem(SCITEM_CONDFORMATDLGDATA), - mpCondFormats(pCondFormats), + mpCondFormats(std::move(pCondFormats)), mnItem(nItem), meDialogType(condformat::dialog::CONDITION), mbManaged(bManaged) diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index 0d8d066f94ff..b1d7a54d9a32 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -61,7 +61,7 @@ public: ScAddress mMinimumAddress; ScAddress mMaximumAddress; - AddressWalker(ScAddress aInitialAddress); + AddressWalker(const ScAddress& aInitialAddress); ScAddress current(SCCOL aRelativeCol = 0, SCROW aRelativeRow = 0, SCTAB aRelativeTab = 0); @@ -81,7 +81,7 @@ public: ScDocument* mpDocument; formula::FormulaGrammar::Grammar meGrammar; - AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, + AddressWalkerWriter(const ScAddress& aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, formula::FormulaGrammar::Grammar eGrammar ); void writeFormula(const OUString& aFormula); @@ -117,7 +117,7 @@ protected: sal_Int32 mIndex; public: - DataRangeIterator(ScRange aInputRange); + DataRangeIterator(const ScRange& aInputRange); virtual ~DataRangeIterator(); virtual bool hasNext() = 0; diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx index 5a3ee9ed6f37..50cd54eecccd 100644 --- a/sc/source/ui/inc/cellsh.hxx +++ b/sc/source/ui/inc/cellsh.hxx @@ -80,7 +80,7 @@ private: static void InitInterface_Impl(); public: - ScCellShell( ScViewData* pData, VclPtr<vcl::Window> pFrameWin ); + ScCellShell( ScViewData* pData, const VclPtr<vcl::Window>& pFrameWin ); virtual ~ScCellShell() override; void Execute(SfxRequest &); diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index bf427a66de0e..f01cd52e603f 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -53,7 +53,7 @@ private: public: ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* pBottom, vcl::Window* pDiagonal, - ScDocument* pD, ScAddress aPos, const OUString& rUser, + ScDocument* pD, const ScAddress& aPos, const OUString& rUser, const MapMode& rMap, bool bLeftEdge, bool bForce, bool bKeyboard ); ~ScNoteMarker(); diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index a46978b3c19e..1edbdecad7be 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -94,7 +94,7 @@ class ScOptSolverDlg : public ScAnyRefDlg { public: ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, - ScDocShell* pDocSh, ScAddress aCursorPos ); + ScDocShell* pDocSh, const ScAddress& aCursorPos ); virtual ~ScOptSolverDlg() override; virtual void dispose() override; diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx index 3879d66a813e..2739b24e0634 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -40,7 +40,7 @@ class ScSolverDlg : public ScAnyRefDlg public: ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocument* pDocument, - ScAddress aCursorPos ); + const ScAddress& aCursorPos ); virtual ~ScSolverDlg() override; virtual void dispose() override; diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx index a76e4b315977..b316aa58a13c 100644 --- a/sc/source/ui/inc/uiobject.hxx +++ b/sc/source/ui/inc/uiobject.hxx @@ -21,7 +21,7 @@ class ScGridWinUIObject : public WindowUIObject public: - ScGridWinUIObject(VclPtr<ScGridWindow> xGridWin); + ScGridWinUIObject(const VclPtr<ScGridWindow>& xGridWin); virtual StringMap get_state() override; diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index b5cc4ad789c1..1dd470ff264f 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -134,7 +134,7 @@ class ScUndoCut: public ScBlockUndo public: ScUndoCut( ScDocShell* pNewDocShell, ScRange aRange, // adjusted for merged cells - ScAddress aOldEnd, // end position without adjustment + const ScAddress& aOldEnd, // end position without adjustment const ScMarkData& rMark, // selected sheets ScDocument* pNewUndoDoc ); virtual ~ScUndoCut() override; @@ -214,7 +214,7 @@ class ScUndoDragDrop: public ScMoveUndo { public: ScUndoDragDrop( ScDocShell* pNewDocShell, - const ScRange& rRange, ScAddress aNewDestPos, bool bNewCut, + const ScRange& rRange, const ScAddress& aNewDestPos, bool bNewCut, ScDocument* pUndoDocument, bool bScenario ); virtual ~ScUndoDragDrop() override; diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 8296542b6440..7c7eb3fd5704 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -177,7 +177,7 @@ ScOptSolverSave::ScOptSolverSave( const OUString& rObjective, bool bMax, bool bM // class ScOptSolverDlg ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, - ScDocShell* pDocSh, ScAddress aCursorPos ) + ScDocShell* pDocSh, const ScAddress& aCursorPos ) : ScAnyRefDlg(pB, pCW, pParent, "SolverDialog", "modules/scalc/ui/solverdlg.ui") , maInputError(ScGlobal::GetRscString(STR_INVALIDINPUT)) diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 1d41b94d08f8..06d4a75366ac 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -41,7 +41,7 @@ namespace ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocument* pDocument, - ScAddress aCursorPos ) + const ScAddress& aCursorPos ) : ScAnyRefDlg(pB, pCW, pParent, "GoalSeekDialog", "modules/scalc/ui/goalseekdlg.ui") , theFormulaCell(aCursorPos) diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx index 462915db0ac8..c5cb60dcdcc0 100644 --- a/sc/source/ui/uitest/uiobject.cxx +++ b/sc/source/ui/uitest/uiobject.cxx @@ -43,7 +43,7 @@ ScRange get_range_from_string(const OUString& rStr) } -ScGridWinUIObject::ScGridWinUIObject(VclPtr<ScGridWindow> xGridWin): +ScGridWinUIObject::ScGridWinUIObject(const VclPtr<ScGridWindow>& xGridWin): WindowUIObject(xGridWin), mxGridWindow(xGridWin) { diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 1c2757c40897..a13a3a50f1eb 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -740,7 +740,7 @@ bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoCut::ScUndoCut( ScDocShell* pNewDocShell, - ScRange aRange, ScAddress aOldEnd, const ScMarkData& rMark, + ScRange aRange, const ScAddress& aOldEnd, const ScMarkData& rMark, ScDocument* pNewUndoDoc ) : ScBlockUndo( pNewDocShell, ScRange(aRange.aStart, aOldEnd), SC_UNDO_AUTOHEIGHT ), aMarkData( rMark ), @@ -1112,7 +1112,7 @@ bool ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell, - const ScRange& rRange, ScAddress aNewDestPos, bool bNewCut, + const ScRange& rRange, const ScAddress& aNewDestPos, bool bNewCut, ScDocument* pUndoDocument, bool bScenario ) : ScMoveUndo( pNewDocShell, pUndoDocument, nullptr, SC_UNDO_REFLAST ), mnPaintExtFlags( 0 ), diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 8d06f5ed5471..ef67bfc77a39 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -260,7 +260,7 @@ void ScHeaderFooterTextData::UpdateData(EditEngine& rEditEngine) } ScHeaderFooterTextObj::ScHeaderFooterTextObj( - uno::WeakReference<sheet::XHeaderFooterContent> xContent, ScHeaderFooterPart nP, const EditTextObject* pTextObj) : + const uno::WeakReference<sheet::XHeaderFooterContent>& xContent, ScHeaderFooterPart nP, const EditTextObject* pTextObj) : aTextData(xContent, nP, pTextObj) { // ScHeaderFooterTextData acquires rContent diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 3a6a46e03e0b..2bc601a1ae72 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -75,7 +75,7 @@ void ScCellShell::InitInterface_Impl() GetStaticInterface()->RegisterPopupMenu("cell"); } -ScCellShell::ScCellShell(ScViewData* pData, VclPtr<vcl::Window> frameWin) : +ScCellShell::ScCellShell(ScViewData* pData, const VclPtr<vcl::Window>& frameWin) : ScFormatShell(pData), pImpl( new CellShell_Impl() ), bPastePossible(false), diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx index 52dc58ef26d0..348cfddcecc9 100644 --- a/sc/source/ui/view/notemark.cxx +++ b/sc/source/ui/view/notemark.cxx @@ -35,7 +35,7 @@ #define SC_NOTEMARK_SHORT 70 ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* pBottom, vcl::Window* pDiagonal, - ScDocument* pD, ScAddress aPos, const OUString& rUser, + ScDocument* pD, const ScAddress& aPos, const OUString& rUser, const MapMode& rMap, bool bLeftEdge, bool bForce, bool bKeyboard ) : pWindow( pWin ), pRightWin( pRight ), |