summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-19 14:04:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-20 10:01:33 +0200
commit3e68a5cfa9807ee5e4a83fd5c763d0e2fee3428e (patch)
tree51b75a350e584749f1b5e9e580ba1370b71bf76d /sw/source
parentc9bf1e18bd80098d5498c831ee4586d04f003053 (diff)
loplugin:constantparam in sw
Change-Id: Ia3e1b50954354973ffef701821f661cf782687db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166311 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/tox/txmsrt.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx8
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx7
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx2
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx2
7 files changed, 12 insertions, 19 deletions
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 3f762f6a8ad1..6c91573bec73 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -416,9 +416,9 @@ static OUString lcl_formatStringByCombiningCharacter(std::u16string_view sText,
// #i85090#
OUString SwGetRefField::GetExpandedTextOfReferencedTextNode(
- SwRootFrame const& rLayout, SwTextNode* pTextNode, SwFrame* pFrame) const
+ SwRootFrame const& rLayout) const
{
- const SwTextNode* pReferencedTextNode( GetReferencedTextNode(pTextNode, pFrame) );
+ const SwTextNode* pReferencedTextNode( GetReferencedTextNode(/*pTextNode*/nullptr, /*pFrame*/nullptr) );
if ( !pReferencedTextNode )
return OUString();
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 4dcbd49fe70b..95ba1911feed 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -620,7 +620,7 @@ void SwTOXPara::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uI
{
pSrc->CopyExpandText( rNd, &rInsPos, nStartIndex,
nEndIndex == -1 ? -1 : nEndIndex - nStartIndex,
- pLayout, false, false, true );
+ pLayout, false, true );
}
else
{
@@ -628,7 +628,7 @@ void SwTOXPara::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uI
assert(nEndIndex == -1);
// sw_redlinehide: this probably won't HideDeletions
pSrc->CopyExpandText( rNd, &rInsPos, 0, -1,
- pLayout, false, false, true );
+ pLayout, false, true );
if (pLayout && pLayout->HasMergedParas())
{
if (SwTextFrame const*const pFrame = static_cast<SwTextFrame*>(pSrc->getLayoutFrame(pLayout)))
@@ -646,7 +646,7 @@ void SwTOXPara::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uI
pTmp->GetTextNode()->CopyExpandText(
rNd, &rInsPos, 0, -1,
- pLayout, false, false, false );
+ pLayout, false, false );
}
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index bbb725e5c13c..05269577db3b 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3579,7 +3579,7 @@ OUString SwTextNode::GetExpandText(SwRootFrame const*const pLayout,
bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
sal_Int32 nIdx, sal_Int32 nLen,
- SwRootFrame const*const pLayout, bool bWithNum,
+ SwRootFrame const*const pLayout,
bool bWithFootnote, bool bReplaceTabsWithSpaces ) const
{
if( &rDestNd == this )
@@ -3710,12 +3710,6 @@ bool SwTextNode::CopyExpandText(SwTextNode& rDestNd, const SwContentIndex* pDest
}
}
- if( bWithNum )
- {
- aDestIdx = nDestStt;
- rDestNd.InsertText( GetNumString(true, MAXLEVEL, pLayout), aDestIdx );
- }
-
aDestIdx = 0;
sal_Int32 nStartDelete(-1);
while (aDestIdx < rDestNd.GetText().getLength())
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 7dbe10221ef1..ec2563088dfd 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -899,7 +899,7 @@ ErrCode RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED);
Strm().WriteOString("1");
- OutPageDescription(rPageDesc, true); // Changed bCheckForFirstPage to true so headers
+ OutPageDescription(rPageDesc); // Changed bCheckForFirstPage to true so headers
// following title page are correctly added - i13107
if (pSttPgDsc)
{
@@ -1413,14 +1413,13 @@ const OUString* RtfExport::GetRedline(sal_uInt16 nId)
return nullptr;
}
-void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bCheckForFirstPage)
+void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc)
{
SAL_INFO("sw.rtf", __func__ << " start");
const SwPageDesc* pSave = m_pCurrentPageDesc;
m_pCurrentPageDesc = &rPgDsc;
- if (bCheckForFirstPage && m_pCurrentPageDesc->GetFollow()
- && m_pCurrentPageDesc->GetFollow() != m_pCurrentPageDesc)
+ if (m_pCurrentPageDesc->GetFollow() && m_pCurrentPageDesc->GetFollow() != m_pCurrentPageDesc)
m_pCurrentPageDesc = m_pCurrentPageDesc->GetFollow();
if (m_pCurrentPageDesc->GetLandscape())
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 11f3f0471f23..1a24aaf3e151 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -188,7 +188,7 @@ public:
void resetStream();
void OutUnicode(std::string_view pToken, std::u16string_view rContent, bool bUpr = false);
void OutDateTime(std::string_view pStr, const css::util::DateTime& rDT);
- void OutPageDescription(const SwPageDesc& rPgDsc, bool bCheckForFirstPage);
+ void OutPageDescription(const SwPageDesc& rPgDsc);
sal_uInt16 GetColor(const Color& rColor) const;
void InsColor(const Color& rCol);
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 07bf72ff4b99..a0a1016b114d 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -580,7 +580,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
pRefField->IsRefToNumItemCrossRefBookmark() )
{
- sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout(), nullptr, nullptr);
+ sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
if ( sText.getLength() > 80 )
{
sText = OUString::Concat(sText.subView(0, 80)) + "...";
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 9e80e06c3292..eff50a0ea76c 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -735,7 +735,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
{
OUString sExpandedTextOfReferencedTextNode =
pRefField->GetExpandedTextOfReferencedTextNode(
- *m_pWrtShell->GetLayout(), nullptr, nullptr);
+ *m_pWrtShell->GetLayout());
if (sExpandedTextOfReferencedTextNode.getLength() > 80)
{
sExpandedTextOfReferencedTextNode = OUString::Concat(