summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-03 09:36:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-03 10:29:57 +0200
commit101a9b4a3fcf1fd0a7163dac3a5dcd69431f4fee (patch)
tree29039a491e9ca058bd3ea9114bf8889ce8089ebc /sw/source
parent55220e7bc6576a7575c675ba425e757a3aefa243 (diff)
loplugin:constantparam
Change-Id: I9cdd15185cfa8347a08402da956eab7cbdd63de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/inc/navipi.hxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx11
3 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 1ae6542fb51b..8c2c210df969 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -130,7 +130,7 @@ public:
virtual void dispose() override;
void UpdateListBox();
- void MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget, bool bWithCilds);
+ void MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget);
virtual void NotifyItemUpdate(const sal_uInt16 nSId,
const SfxItemState eState,
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index febda121a810..54f3c6e94caf 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3028,7 +3028,7 @@ void SwContentTree::MoveOutline(SwOutlineNodes::size_type nTargetPos)
nTargetPos = nPrevTargetPosOrOffset;
}
}
- GetParentWindow()->MoveOutline(nSourcePos, nTargetPos, true);
+ GetParentWindow()->MoveOutline(nSourcePos, nTargetPos);
}
pShell->EndUndo();
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index ca52eeb8cc5f..2a0d30610c26 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -86,8 +86,7 @@ OUString SwNavigationPI::CleanEntry(const OUString& rEntry)
// Execution of the drag operation with and without the children.
-void SwNavigationPI::MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget,
- bool bWithChildren)
+void SwNavigationPI::MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget)
{
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
@@ -98,18 +97,16 @@ void SwNavigationPI::MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNod
SwOutlineNodes::difference_type nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ;
rSh.GotoOutline(nSource);
- if (bWithChildren)
- rSh.MakeOutlineSel(nSource, nSource, true);
+ rSh.MakeOutlineSel(nSource, nSource, true);
// While moving, the selected children does not counting.
const SwOutlineNodes::size_type nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
- if(bWithChildren && nMove > 1 &&
- nLastOutlinePos < nTarget)
+ if(nMove > 1 && nLastOutlinePos < nTarget)
{
if(!rSh.IsCursorPtAtEnd())
rSh.SwapPam();
nMove -= nLastOutlinePos - nSource;
}
- if(!bWithChildren || nMove < 1 || nLastOutlinePos < nTarget )
+ if( nMove < 1 || nLastOutlinePos < nTarget )
rSh.MoveOutlinePara( nMove );
rSh.ClearMark();
rSh.GotoOutline( nSource + nMove);