summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-19 14:37:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-20 10:02:03 +0200
commita7933203b79adc0b5f8a72a9dc51633df9ded283 (patch)
treee58518aaf89b73993252081b9fdcc31807100d13
parent5b38e1e82439d6338b08f2695712c038f32d2b52 (diff)
loplugin:constantparam in sw
Change-Id: Ibb4d4d1cca59ece6bcd28e887f84d657dedee756 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/inc/crsrsh.hxx4
-rw-r--r--sw/source/core/crsr/crbm.cxx8
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
4 files changed, 9 insertions, 9 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 5b0031882487..1d85ce278736 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -591,8 +591,8 @@ public:
bool IsFormProtected();
::sw::mark::IFieldmark* GetCurrentFieldmark();
- sw::mark::IFieldmark* GetFieldmarkAfter(bool bLoop);
- sw::mark::IFieldmark* GetFieldmarkBefore(bool bLoop);
+ sw::mark::IFieldmark* GetFieldmarkAfter();
+ sw::mark::IFieldmark* GetFieldmarkBefore();
bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark, bool completeSelection = false );
// update Cursr, i.e. reset it into content should only be called when the
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index fbc2ab28e1da..15b1bba2b1b6 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -290,16 +290,16 @@ bool SwCursorShell::IsFormProtected()
return getIDocumentMarkAccess()->getInnerFieldmarkFor(pos);
}
-sw::mark::IFieldmark* SwCursorShell::GetFieldmarkAfter(bool bLoop)
+sw::mark::IFieldmark* SwCursorShell::GetFieldmarkAfter()
{
SwPosition pos(*GetCursor()->GetPoint());
- return getIDocumentMarkAccess()->getFieldmarkAfter(pos, bLoop);
+ return getIDocumentMarkAccess()->getFieldmarkAfter(pos, /*bLoop*/true);
}
-sw::mark::IFieldmark* SwCursorShell::GetFieldmarkBefore(bool bLoop)
+sw::mark::IFieldmark* SwCursorShell::GetFieldmarkBefore()
{
SwPosition pos(*GetCursor()->GetPoint());
- return getIDocumentMarkAccess()->getFieldmarkBefore(pos, bLoop);
+ return getIDocumentMarkAccess()->getFieldmarkBefore(pos, /*bLoop*/true);
}
bool SwCursorShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark, bool completeSelection)
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 3972071383ab..2abfb959a46d 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -938,7 +938,7 @@ void SwCursorShell::GotoFormControl(bool bNext)
if (aFormMap.begin() == aFormMap.end())
{
// only legacy fields exist. Avoid reprocessing everything and use legacy code path.
- GotoFieldmark(bNext ? GetFieldmarkAfter(/*Loop=*/true) : GetFieldmarkBefore(/*Loop=*/true));
+ GotoFieldmark(bNext ? GetFieldmarkAfter() : GetFieldmarkBefore());
return;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index bb90ab645d1c..4337fede35d7 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2004,7 +2004,7 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, vcl::Window *_pWin, SwView &rShell )
// place the cursor on the first field...
IFieldmark *pBM = nullptr;
- if (IsFormProtected() && (pBM = GetFieldmarkAfter(/*bLoop=*/true)) !=nullptr) {
+ if (IsFormProtected() && (pBM = GetFieldmarkAfter()) !=nullptr) {
GotoFieldmark(pBM);
}
}
@@ -2022,7 +2022,7 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView &rShell,
// place the cursor on the first field...
IFieldmark *pBM = nullptr;
- if (IsFormProtected() && (pBM = GetFieldmarkAfter(/*bLoop=*/true)) !=nullptr) {
+ if (IsFormProtected() && (pBM = GetFieldmarkAfter()) !=nullptr) {
GotoFieldmark(pBM);
}
}