diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-30 09:40:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-30 11:24:33 +0200 |
commit | 3b8e53f66ffd4d631a850fe76250124dc4a195c3 (patch) | |
tree | 2613882a4876f0a66324b7e29e61c46b3ec451b0 /sw/source/core/edit | |
parent | d242a19dbdd53b7ae0b6a6ceacca6aa1b6ac54a9 (diff) |
loplugin:constparams improve handling of pointer params
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/edfld.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 9fb2546b238c..bef3f2b286fb 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -160,13 +160,13 @@ void SwEditShell::Insert2(SwField const & rField, const bool bForceExpandHints) } /// Are the PaMs positioned on fields? -static SwTextField* lcl_FindInputField( SwDoc* pDoc, SwField& rField ) +static SwTextField* lcl_FindInputField( SwDoc* pDoc, const SwField& rField ) { // Search field via its address. For input fields this needs to be done in protected fields. SwTextField* pTField = nullptr; if (SwFieldIds::Input == rField.Which() || (SwFieldIds::SetExp == rField.Which() - && static_cast<SwSetExpField&>(rField).GetInputFlag() + && static_cast<const SwSetExpField&>(rField).GetInputFlag() && (static_cast<SwSetExpFieldType*>(rField.GetTyp())->GetType() & nsSwGetSetExpType::GSE_STRING))) { @@ -181,7 +181,7 @@ static SwTextField* lcl_FindInputField( SwDoc* pDoc, SwField& rField ) } } else if( SwFieldIds::SetExp == rField.Which() - && static_cast<SwSetExpField&>(rField).GetInputFlag() ) + && static_cast<const SwSetExpField&>(rField).GetInputFlag() ) { for (const SfxPoolItem* pItem : pDoc->GetAttrPool().GetItemSurrogates(RES_TXTATR_FIELD)) { |