sw/inc/editsh.hxx | 7 +++---- sw/source/core/edit/editsh.cxx | 14 ++++---------- sw/source/core/edit/ednumber.cxx | 10 ++++------ 3 files changed, 11 insertions(+), 20 deletions(-)
New commits: commit 5b38e1e82439d6338b08f2695712c038f32d2b52 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Apr 19 14:31:42 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Apr 20 10:01:54 2024 +0200 loplugin:constantparam in sw Change-Id: Ia1379762ba957097a1a2134c5d206f254e22683b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 5ac1d9a460da..a4dcecd6d449 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -531,7 +531,7 @@ public: bool MoveNumParas( bool bUpperLower, bool bUpperLeft ); /// Switch on/off of numbering via Delete/Backspace. - SW_DLLPUBLIC bool NumOrNoNum(bool bDelete = false, bool bChkStart = true); + SW_DLLPUBLIC bool NumOrNoNum(bool bDelete = false); // #i23726# // #i90078# @@ -542,7 +542,7 @@ public: void SetIndent(short nIndent, const SwPosition & rPos); bool IsFirstOfNumRuleAtCursorPos() const; - bool IsNoNum( bool bChkStart = true ) const; + bool IsNoNum() const; /** @return Num-Level of the node in which point of cursor is. @return values can be: NO_NUMBERING, 0..MAXLEVEL-1 */ diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 625cd43cb1c8..372e7b1e48ad 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -628,15 +628,13 @@ bool SwEditShell::IsOutlineCopyable( SwOutlineNodes::size_type nIdx ) const return lcl_IsOutlineMoveAndCopyable( *this, nIdx, true ); } -bool SwEditShell::NumOrNoNum( - bool bNumOn, - bool bChkStart ) +bool SwEditShell::NumOrNoNum( bool bNumOn ) { bool bRet = false; if ( !IsMultiSelection() && !HasSelection() - && ( !bChkStart || IsSttPara() ) ) + && IsSttPara() ) { StartAllAction(); SwPosition const pos(sw::GetParaPropsPos(*GetLayout(), *GetCursor()->GetPoint())); @@ -646,14 +644,14 @@ bool SwEditShell::NumOrNoNum( return bRet; } -bool SwEditShell::IsNoNum( bool bChkStart ) const +bool SwEditShell::IsNoNum() const { // a Backspace in the paragraph without number becomes a Delete bool bResult = false; if ( !IsMultiSelection() && !HasSelection() - && ( !bChkStart || IsSttPara() ) ) + && IsSttPara() ) { const SwTextNode* pTextNd = sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->GetNode()); if ( pTextNd != nullptr ) commit 4aea0b8423ab8f4d7942d66e61d64de448357c73 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Apr 19 14:23:52 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Apr 20 10:01:43 2024 +0200 loplugin:constantparam in sw Change-Id: Idf7d3abd464b7be87d109d14adf94357a5d49dd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b8bd2ad6effe..5ac1d9a460da 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -675,8 +675,7 @@ public: /** @return name and filter of a graphic if the cursor is in a graphic, else give a rap on the knuckles! If a string-ptr != 0 return the respective name. */ - void GetGrfNms( OUString* pGrfName, OUString* pFltName, - const SwFlyFrameFormat* = nullptr ) const; + void GetGrfNms( OUString* pGrfName, OUString* pFltName ) const; /// Re-read if graphic is not ok. Current graphic is replaced by the new one. void ReRead( const OUString& rGrfName, const OUString& rFltName, diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 5927681128f2..a65b83f52ad2 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -301,18 +301,12 @@ void SwEditShell::ReRead( const OUString& rGrfName, const OUString& rFltName, /// Returns the name and the filter name of a graphic if the pointer is on a graphic. /// If a String-pointer is != 0 then return corresponding name. -void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName, - const SwFlyFrameFormat* pFormat ) const +void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName ) const { OSL_ENSURE( pGrfName || pFltName, "No parameters" ); - if( pFormat ) - SwDoc::GetGrfNms( *pFormat, pGrfName, pFltName ); - else - { - SwGrfNode *pGrfNode = GetGrfNode_(); - if( pGrfNode && pGrfNode->IsLinkedFile() ) - pGrfNode->GetFileFilterNms( pGrfName, pFltName ); - } + SwGrfNode *pGrfNode = GetGrfNode_(); + if( pGrfNode && pGrfNode->IsLinkedFile() ) + pGrfNode->GetFileFilterNms( pGrfName, pFltName ); } const tools::PolyPolygon *SwEditShell::GetGraphicPolygon() const