sw/source/core/layout/colfrm.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 0480e84e4c0b43d3829d83746636ad7a7037e76e Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Dec 20 11:20:17 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Dec 20 12:29:01 2024 +0100 sw: pass by reference Change-Id: I974472bc55104f0487a3406d4885ed0b52441896 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178878 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 8b6aa8b60a3b..8aa4fb2fdce5 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -81,12 +81,12 @@ void SwColumnFrame::dumpAsXml(xmlTextWriterPtr writer) const (void)xmlTextWriterEndElement(writer); } -static void lcl_RemoveColumns( SwLayoutFrame *pCont, sal_uInt16 nCnt ) +static void lcl_RemoveColumns( SwLayoutFrame &rCont, sal_uInt16 nCnt ) { - OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrame(), + OSL_ENSURE( rCont.Lower() && rCont.Lower()->IsColumnFrame(), "no columns to remove." ); - SwColumnFrame *pColumn = static_cast<SwColumnFrame*>(pCont->Lower()); + SwColumnFrame *pColumn = static_cast<SwColumnFrame*>(rCont.Lower()); sw_RemoveFootnotes( pColumn, true, true ); while ( pColumn->GetNext() ) { @@ -247,7 +247,7 @@ void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew //If columns exist, they get deleted if a column count of 0 or 1 is requested. if ( nNewNum == 1 && !bAtEnd ) { - ::lcl_RemoveColumns( this, nOldNum ); + ::lcl_RemoveColumns( *this, nOldNum ); if ( IsBodyFrame() ) SetFrameFormat( pDoc->GetDfltFrameFormat() ); else @@ -267,7 +267,7 @@ void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew } if ( nOldNum > nNewNum ) { - ::lcl_RemoveColumns( this, nOldNum - nNewNum ); + ::lcl_RemoveColumns( *this, nOldNum - nNewNum ); bAdjustAttributes = true; } else if( nOldNum < nNewNum )