diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-04 11:57:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-05 06:40:10 +0000 |
commit | 3d6c84f2d9683b23c14fa5bf50ca4425cf4ceb04 (patch) | |
tree | bc18d71a94b1a9015d45155ad79179e61e6aa3c0 /sw | |
parent | cedbc4031f26ea13b188a4ecc5b90cc9646095fb (diff) |
loplugin:constantparam
Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec
Reviewed-on: https://gerrit.libreoffice.org/36070
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 2 | ||||
-rw-r--r-- | sw/inc/SwUndoField.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/DocumentContentOperationsManager.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoField.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 14 |
7 files changed, 15 insertions, 17 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 51699a014c25..be4c084e78f9 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -137,7 +137,7 @@ public: /** Move a range. */ - virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0; + virtual bool MoveAndJoin(SwPaM&, SwPosition&) = 0; /** Overwrite string in an existing text node. */ diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index 50825408dd67..d652e748416c 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -37,7 +37,7 @@ protected: SwPosition GetPosition(); public: - SwUndoField(const SwPosition & rPos, SwUndoId nId = SwUndoId::FIELD ); + SwUndoField(const SwPosition & rPos ); virtual ~SwUndoField() override; }; diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 2e4fe3c54cac..a434ad938b0a 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2322,14 +2322,14 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod return true; } -bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags ) +bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos ) { SwNodeIndex aIdx( rPaM.Start()->nNode ); bool bJoinText = aIdx.GetNode().IsTextNode(); bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode; aIdx--; // in front of the move area! - bool bRet = MoveRange( rPaM, rPos, eMvFlags ); + bool bRet = MoveRange( rPaM, rPos, SwMoveFlags::DEFAULT ); if( bRet && !bOneNode ) { if( bJoinText ) diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index a8fc41eda758..314e4c84ef27 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1263,7 +1263,7 @@ void SwRangeRedline::MoveToSection() SwNodeIndex aNdIdx( *pTextNd ); SwPosition aPos( aNdIdx, SwIndex( pTextNd )); if( pCSttNd && pCEndNd ) - pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos, SwMoveFlags::DEFAULT ); + pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos ); else { if( pCSttNd && !pCEndNd ) diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index 1319bf4ac214..c1ac6dffffe3 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -54,7 +54,7 @@ public: bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) override; - bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) override; + bool MoveAndJoin(SwPaM&, SwPosition&) override; bool Overwrite(const SwPaM &rRg, const OUString& rStr) override; diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index 929c467d48f4..3b8e50d86dea 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -32,8 +32,8 @@ using namespace ::com::sun::star::uno; -SwUndoField::SwUndoField(const SwPosition & rPos, SwUndoId _nId ) - : SwUndo(_nId, rPos.GetDoc()) +SwUndoField::SwUndoField(const SwPosition & rPos ) + : SwUndo(SwUndoId::FIELD, rPos.GetDoc()) { nNodeIndex = rPos.nNode.GetIndex(); nOffset = rPos.nContent.GetIndex(); @@ -58,7 +58,7 @@ SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & rOldField, const SwField & rNewField, SwMsgPoolItem * _pHint, bool _bUpdate) - : SwUndoField(rPos,SwUndoId::FIELD) + : SwUndoField(rPos) , pOldField(rOldField.CopyField()) , pNewField(rNewField.CopyField()) , pHint(_pHint) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 83bfd70f4e43..10d900654212 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -183,13 +183,11 @@ public: class SwTrnsfrActionAndUndo { SwWrtShell *pSh; - SwUndoId eUndoId; public: - SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId, - bool bDelSel = false) - : pSh( pS ), eUndoId( nId ) + SwTrnsfrActionAndUndo( SwWrtShell *pS, bool bDelSel = false) + : pSh( pS ) { - pSh->StartUndo( eUndoId ); + pSh->StartUndo( SwUndoId::PASTE_CLIPBOARD ); if( bDelSel ) pSh->DelRight(); pSh->StartAllAction(); @@ -1250,7 +1248,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, if( bDelSel ) // #i34830# - pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD, true )); + pAction.reset(new SwTrnsfrActionAndUndo( &rSh, true )); } SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData ); @@ -1295,7 +1293,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, { if( !pAction ) { - pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD)); + pAction.reset(new SwTrnsfrActionAndUndo( &rSh )); } // in Drag&Drop MessageBoxes must not be showed @@ -3247,7 +3245,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) const int nSelection = rShell.GetSelectionType(); - SwTrnsfrActionAndUndo aAction( &rShell, SwUndoId::PASTE_CLIPBOARD); + SwTrnsfrActionAndUndo aAction( &rShell ); bool bKillPaMs = false; |