sw/source/core/doc/tblrwcl.cxx                                      |    2 
 sw/source/core/docnode/ndtbl.cxx                                    |    8 -
 sw/source/core/docnode/ndtbl1.cxx                                   |    6 
 sw/source/core/frmedt/fetab.cxx                                     |   14 -
 sw/source/core/frmedt/fews.cxx                                      |    4 
 sw/source/core/frmedt/tblsel.cxx                                    |   12 -
 sw/source/core/inc/frame.hxx                                        |    4 
 sw/source/core/layout/anchoreddrawobject.cxx                        |    2 
 sw/source/core/layout/anchoredobject.cxx                            |    2 
 sw/source/core/layout/calcmove.cxx                                  |   18 +-
 sw/source/core/layout/colfrm.cxx                                    |    2 
 sw/source/core/layout/flowfrm.cxx                                   |    6 
 sw/source/core/layout/fly.cxx                                       |   34 ++--
 sw/source/core/layout/flycnt.cxx                                    |    4 
 sw/source/core/layout/flyincnt.cxx                                  |    2 
 sw/source/core/layout/flylay.cxx                                    |   14 -
 sw/source/core/layout/frmtool.cxx                                   |   12 -
 sw/source/core/layout/ftnfrm.cxx                                    |   16 +-
 sw/source/core/layout/layact.cxx                                    |    8 -
 sw/source/core/layout/layouter.cxx                                  |    2 
 sw/source/core/layout/pagechg.cxx                                   |    2 
 sw/source/core/layout/paintfrm.cxx                                  |   12 -
 sw/source/core/layout/sectfrm.cxx                                   |   36 ++--
 sw/source/core/layout/ssfrm.cxx                                     |    4 
 sw/source/core/layout/tabfrm.cxx                                    |   78 
+++++-----
 sw/source/core/layout/trvlfrm.cxx                                   |   16 +-
 sw/source/core/layout/wsfrm.cxx                                     |   24 +--
 sw/source/core/objectpositioning/anchoredobjectposition.cxx         |   12 -
 sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx   |    2 
 sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx  |   12 -
 sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx |    2 
 sw/source/core/text/EnhancedPDFExportHelper.cxx                     |    6 
 sw/source/core/text/frmcrsr.cxx                                     |   10 -
 sw/source/core/text/frmform.cxx                                     |    8 -
 sw/source/core/text/frminf.cxx                                      |    2 
 sw/source/core/text/itratr.cxx                                      |    4 
 sw/source/core/text/itrcrsr.cxx                                     |    2 
 sw/source/core/text/itrform2.cxx                                    |    6 
 sw/source/core/text/porrst.cxx                                      |    4 
 sw/source/core/text/txtfly.cxx                                      |   16 +-
 sw/source/core/text/txtfrm.cxx                                      |   10 -
 sw/source/core/text/txtftn.cxx                                      |   10 -
 sw/source/core/text/widorp.cxx                                      |    8 -
 sw/source/core/tox/ToxTabStopTokenHandler.cxx                       |    2 
 sw/source/core/txtnode/txtedt.cxx                                   |    6 
 45 files changed, 233 insertions(+), 233 deletions(-)

New commits:
commit 161b39b75c4c7d07724a5a5909fbbb79b22fe1e5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 5 09:37:31 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Dec 5 15:28:27 2025 +0100

    GetFlyAnchorBottom always dereferences its first argument
    
    Change-Id: Ifbcf0a7e168fd700e751de7ad245f64a0737ed05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195070
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 04c3f663e243..e1c2a35e8a24 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -85,9 +85,9 @@ using namespace ::com::sun::star;
 namespace
 {
 /// Gets the bottom position which is a deadline for a split fly.
-SwTwips GetFlyAnchorBottom(SwFlyFrame* pFly, const SwFrame& rAnchor)
+SwTwips GetFlyAnchorBottom(SwFlyFrame& rFly, const SwFrame& rAnchor)
 {
-    SwRectFnSet aRectFnSet(*pFly);
+    SwRectFnSet aRectFnSet(rFly);
 
     const SwPageFrame* pPage = rAnchor.FindPageFrame();
     if (!pPage)
@@ -101,7 +101,7 @@ SwTwips GetFlyAnchorBottom(SwFlyFrame* pFly, const SwFrame& 
rAnchor)
         return 0;
     }
 
-    const auto* pFrameFormat = pFly->GetFrameFormat();
+    const auto* pFrameFormat = rFly.GetFrameFormat();
     const IDocumentSettingAccess& rIDSA = 
pFrameFormat->getIDocumentSettingAccess();
     // Allow overlap with bottom margin / footer only in case we're relative 
to the page frame.
     bool bVertPageFrame = pFrameFormat->GetVertOrient().GetRelationOrient() == 
text::RelOrientation::PAGE_FRAME;
@@ -112,9 +112,9 @@ SwTwips GetFlyAnchorBottom(SwFlyFrame* pFly, const SwFrame& 
rAnchor)
         // Word <= 2010 style: the fly can overlap with the bottom margin / 
footer area in case the
         // fly height fits the body height and the fly bottom fits the page.
         // See if the fly height would fit at least the page height, ignoring 
the vertical offset.
-        SwTwips nFlyHeight = aRectFnSet.GetHeight(pFly->getFrameArea());
+        SwTwips nFlyHeight = aRectFnSet.GetHeight(rFly.getFrameArea());
         SwTwips nPageHeight = aRectFnSet.GetHeight(pPage->getFramePrintArea());
-        SwTwips nFlyTop = aRectFnSet.GetTop(pFly->getFrameArea());
+        SwTwips nFlyTop = aRectFnSet.GetTop(rFly.getFrameArea());
         SwTwips nBodyTop = aRectFnSet.GetTop(pBody->getFrameArea());
         if (nFlyTop < nBodyTop)
         {
@@ -1550,7 +1550,7 @@ void SwFlyFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorderA
             {
                 // If the fly is allowed to be split, then limit its size to 
the upper of the
                 // anchor.
-                SwTwips nDeadline = GetFlyAnchorBottom(this, *pAnchor);
+                SwTwips nDeadline = GetFlyAnchorBottom(*this, *pAnchor);
                 SwTwips nTop = aRectFnSet.GetTop(getFrameArea());
                 SwTwips nBottom = aRectFnSet.GetTop(getFrameArea()) + 
nRemaining;
                 if (nBottom > nDeadline)
@@ -2335,7 +2335,7 @@ SwTwips SwFlyFrame::Grow_(SwTwips nDist, 
SwResizeLimitReason& reason, bool bTst)
         }
         if (pAnchor && IsFlySplitAllowed())
         {
-            SwTwips nDeadline = GetFlyAnchorBottom(this, *pAnchor);
+            SwTwips nDeadline = GetFlyAnchorBottom(*this, *pAnchor);
             SwTwips nTop = aRectFnSet.GetTop(getFrameArea());
             SwTwips nBottom = nTop + aRectFnSet.GetHeight(getFrameArea());
             // Calculate max grow and compare to the requested growth, adding 
to nDist may
@@ -2404,7 +2404,7 @@ SwTwips SwFlyFrame::Grow_(SwTwips nDist, 
SwResizeLimitReason& reason, bool bTst)
         }
         if (pAnchor)
         {
-            SwTwips nDeadline = GetFlyAnchorBottom(this, *pAnchor);
+            SwTwips nDeadline = GetFlyAnchorBottom(*this, *pAnchor);
             SwTwips nTop = aRectFnSet.GetTop(getFrameArea());
             SwTwips nBottom = nTop + aRectFnSet.GetHeight(getFrameArea());
             SwTwips nMaxGrow = nDeadline - nBottom;
commit 95c335e665c498b263ef365aca790a763cca754d
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 5 09:35:14 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Dec 5 15:28:17 2025 +0100

    SwRectFnSet always dereferences its argument
    
    Change-Id: I2e8e140facde68af53de35a629395365ce9f8bb4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195069
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index af3bfcc2c590..b2c97185e1a2 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1035,7 +1035,7 @@ bool SwTable::OldSplitRow( SwDoc& rDoc, const SwSelBoxes& 
rBoxes, sal_uInt16 nCn
             SwTableBox* pSelBox = rBoxes[n];
             const SwRowFrame* pRow = GetRowFrame( *pSelBox->GetUpper() );
             assert(pRow && "Where is the SwTableLine's Frame?");
-            SwRectFnSet aRectFnSet(pRow);
+            SwRectFnSet aRectFnSet(*pRow);
             pRowHeights[ n ] = aRectFnSet.GetHeight(pRow->getFrameArea());
         }
     }
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 953dd1b72d96..85177c19c999 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2651,7 +2651,7 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const 
SwCellFrame* pBoxFrame )
     const SwTableBox* pBox = pBoxFrame->GetTabBox();
 
     // Set fixed points, LeftMin in Document coordinates, all others relative
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     const SwPageFrame* pPage = pTab->FindPageFrame();
     const sal_uLong nLeftMin = aRectFnSet.GetLeft(pTab->getFrameArea()) -
                            aRectFnSet.GetLeft(pPage->getFrameArea());
@@ -2733,7 +2733,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const 
SwCellFrame* pBoxFrame )
     const SwFrame* pFrame = pTab->GetNextLayoutLeaf();
 
     // Set fixed points, LeftMin in Document coordinates, all others relative
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     const SwPageFrame* pPage = pTab->FindPageFrame();
     const tools::Long nLeftMin  = ( aRectFnSet.IsVert() ?
                              pTab->GetPrtLeft() - pPage->getFrameArea().Left() 
:
@@ -2851,7 +2851,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool 
bCurRowOnly,
     // we need to switch to absolute ones.
     SwTable& rTab = *pTab->GetTable();
     const SwFormatFrameSize& rTableFrameSz = 
rTab.GetFrameFormat()->GetFrameSize();
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     // #i17174# - With fix for #i9040# the shadow size is taken
     // from the table width. Thus, add its left and right size to current table
     // printing area width in order to get the correct table size attribute.
@@ -2903,7 +2903,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool 
bCurColOnly,
 
     // If the Table is still using relative values (USHRT_MAX)
     // we need to switch to absolute ones.
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     SwTabCols aOld( rNew.Count() );
 
     // Set fixed points, LeftMin in Document coordinates, all others relative
diff --git a/sw/source/core/docnode/ndtbl1.cxx 
b/sw/source/core/docnode/ndtbl1.cxx
index 3d08d1f61f4f..958ce825f6c8 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1419,7 +1419,7 @@ static sal_uInt16 lcl_CalcCellFit( const SwLayoutFrame 
*pCell )
 {
     SwTwips nRet = 0;
     const SwFrame *pFrame = pCell->Lower(); // The whole Line
-    SwRectFnSet aRectFnSet(pCell);
+    SwRectFnSet aRectFnSet(*pCell);
     while ( pFrame )
     {
         const SwTwips nAdd = aRectFnSet.GetWidth(pFrame->getFrameArea()) -
@@ -1464,7 +1464,7 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> 
&rToFill, const SwTabC
                     ::lcl_CalcCellFit( pCell ) :
                     MINLAY + sal_uInt16(pCell->getFrameArea().Width() - 
pCell->getFramePrintArea().Width());
 
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
 
     for ( size_t i = 0 ; i <= rCols.Count(); ++i )
     {
@@ -1532,7 +1532,7 @@ static void lcl_CalcColValues( std::vector<sal_uInt16> 
&rToFill, const SwTabCols
         const SwTabFrame *pTab = pSelUnion->GetTable();
         const SwRect &rUnion = pSelUnion->GetUnion();
 
-        SwRectFnSet aRectFnSet(pTab);
+        SwRectFnSet aRectFnSet(*pTab);
         bool bRTL = pTab->IsRightToLeft();
 
         const SwLayoutFrame *pCell = pTab->FirstCell();
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 45786fc5e81f..92373faa1428 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -729,7 +729,7 @@ void SwFEShell::GetTabCols_(SwTabCols &rToFill, const 
SwFrame *pBox) const
         if (m_pColumnCache->pLastTable == pTab->GetTable())
         {
             bDel = false;
-            SwRectFnSet aRectFnSet(pTab);
+            SwRectFnSet aRectFnSet(*pTab);
 
             const SwPageFrame* pPage = pTab->FindPageFrame();
             const sal_uLong nLeftMin = 
aRectFnSet.GetLeft(pTab->getFrameArea()) -
@@ -741,7 +741,7 @@ void SwFEShell::GetTabCols_(SwTabCols &rToFill, const 
SwFrame *pBox) const
             {
                 // if TabFrame was changed, we only shift a little bit
                 // as the width is the same
-                SwRectFnSet fnRectX(m_pColumnCache->pLastTabFrame);
+                SwRectFnSet fnRectX(*m_pColumnCache->pLastTabFrame);
                 if 
(fnRectX.GetWidth(m_pColumnCache->pLastTabFrame->getFrameArea()) ==
                     aRectFnSet.GetWidth(pTab->getFrameArea()) )
                 {
@@ -794,7 +794,7 @@ void SwFEShell::GetTabRows_(SwTabCols &rToFill, const 
SwFrame *pBox) const
         if (m_pRowCache->pLastTable == pTab->GetTable())
         {
             bDel = false;
-            SwRectFnSet aRectFnSet(pTab);
+            SwRectFnSet aRectFnSet(*pTab);
             const SwPageFrame* pPage = pTab->FindPageFrame();
             const tools::Long nLeftMin  = ( aRectFnSet.IsVert() ?
                                      pTab->GetPrtLeft() - 
pPage->getFrameArea().Left() :
@@ -1580,7 +1580,7 @@ size_t SwFEShell::GetCurTabColNum() const
 
     size_t nRet = 0;
 
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
 
     const SwPageFrame* pPage = pFrame->FindPageFrame();
 
@@ -1689,7 +1689,7 @@ static const SwCellFrame *lcl_FindFrame( SwDoc & rDoc, 
const SwLayoutFrame *pLay
                     // We first check if the given point is 'close' to the 
left or top
                     // border of the table frame:
                     OSL_ENSURE( pFrame, "Nested table frame without outer 
table" );
-                    SwRectFnSet aRectFnSet(pFrame);
+                    SwRectFnSet aRectFnSet(*pFrame);
                     const bool bRTL = pFrame->IsRightToLeft();
 
                     SwRect aTabRect = pFrame->getFramePrintArea();
@@ -1803,7 +1803,7 @@ static const SwCellFrame *lcl_FindFrame( SwDoc & rDoc, 
const SwLayoutFrame *pLay
                     SwRect aTabRect = pTabFrame->getFramePrintArea();
                     aTabRect.Pos() += pTabFrame->getFrameArea().Pos();
 
-                    SwRectFnSet aRectFnSet(pTabFrame);
+                    SwRectFnSet aRectFnSet(*pTabFrame);
 
                     const SwTwips nTabTop  = aRectFnSet.GetTop(aTabRect);
                     const SwTwips nMouseTop = aRectFnSet.IsVert() ? rPt.X() : 
rPt.Y();
@@ -2407,7 +2407,7 @@ void SwFEShell::SetColRowWidthHeight( 
TableChgWidthHeightType eType, sal_uInt16
     // if the table is in relative values (USHRT_MAX)
     // then it should be recalculated to absolute values now
     const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize();
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     tools::Long nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
     TableChgWidthHeightType eTypePos = extractPosition(eType);
     if( TableChgMode::VarWidthChangeAbs == pTab->GetTable()->GetTableChgMode() 
&&
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 2b109399fb2e..1f721e6bf1ba 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -770,7 +770,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
         if ( !pFrame )
             pFrame = pTmp;
         _orRect = pFrame->getFrameArea();
-        SwRectFnSet aRectFnSet(pFrame);
+        SwRectFnSet aRectFnSet(*pFrame);
         bRTL = pFrame->IsRightToLeft();
         if ( bRTL )
             aPos = pFrame->getFrameArea().TopRight();
@@ -896,7 +896,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
     {
         const SwFrame* pUpper = ( pFrame->IsPageFrame() || 
pFrame->IsFlyFrame() ) ?
                               pFrame : pFrame->GetUpper();
-        SwRectFnSet aRectFnSet(pUpper);
+        SwRectFnSet aRectFnSet(*pUpper);
         if ( _opPercent )
         {
             // If the size is relative from page, then full size should be 
counted from the page frame.
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 8312232de291..0f1a7cb873f1 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -490,7 +490,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& 
rEndNd )
             SwSelUnion *pUnion = &rSelUnion;
             const SwTabFrame *pTable = pUnion->GetTable();
 
-            SwRectFnSet aRectFnSet(pTable);
+            SwRectFnSet aRectFnSet(*pTable);
             bool bRTL = pTable->IsRightToLeft();
 
             if( !pTable->isFrameAreaDefinitionValid() && nLoopMax  )
@@ -964,7 +964,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
     tools::Long nWidth;
     SwTableBox* pLastBox = nullptr;
 
-    SwRectFnSet aRectFnSet(pStart->GetUpper());
+    SwRectFnSet aRectFnSet(*pStart->GetUpper());
 
     for ( auto & rSelUnion : aUnions )
     {
@@ -1622,7 +1622,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrame 
*&rpStart,
     const SwTabFrame *pOrg = rpStart->FindTabFrame();
     const SwTabFrame *pTab = pOrg;
 
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
 
     bool bRTL = pTab->IsRightToLeft();
     const tools::Long nTmpWish = pOrg->GetFormat()->GetFrameSize().GetWidth();
@@ -1794,7 +1794,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const 
SwLayoutFrame *pStart,
     }
     else
     {
-        SwRectFnSet aRectFnSet(pTable);
+        SwRectFnSet aRectFnSet(*pTable);
         tools::Long nSttTop = aRectFnSet.GetTop(pStart->getFrameArea());
         tools::Long nEndTop = aRectFnSet.GetTop(pEnd->getFrameArea());
         if( nSttTop == nEndTop )
@@ -1833,7 +1833,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const 
SwLayoutFrame *pStart,
     const tools::Long nWish = std::max( tools::Long(1), 
pTable->GetFormat()->GetFrameSize().GetWidth() );
     while ( pTable )
     {
-        SwRectFnSet aRectFnSet(pTable);
+        SwRectFnSet aRectFnSet(*pTable);
         const tools::Long nOfst = aRectFnSet.GetPrtLeft(*pTable);
         const tools::Long nPrtWidth = 
aRectFnSet.GetWidth(pTable->getFramePrintArea());
         tools::Long nSt1 = ::lcl_CalcWish( pStart, nWish, nPrtWidth ) + nOfst;
@@ -1995,7 +1995,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 
nDiv,
             pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(),
             nullptr, &tmp)->GetUpper();
 
-    SwRectFnSet aRectFnSet(pStart->GetUpper());
+    SwRectFnSet aRectFnSet(*pStart->GetUpper());
 
     // First, compute tables and rectangles
     SwSelUnions aUnions;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 04c58e76cf24..143ad395ee90 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -1404,11 +1404,11 @@ typedef const SwRectFnCollection* SwRectFn;
 extern const SwRectFn fnRectHori, fnRectVert, fnRectVertL2R, fnRectVertL2RB2T;
 class SwRectFnSet {
 public:
-    explicit SwRectFnSet(const SwFrame* pFrame) { Refresh(pFrame); }
+    explicit SwRectFnSet(const SwFrame& rFrame) { Refresh(rFrame); }
 
     explicit SwRectFnSet(bool vert, bool vL2R, bool vL2RB2T) { Refresh(vert, 
vL2R, vL2RB2T); }
 
-    void Refresh(const SwFrame* p) { Refresh(p->IsVertical(), p->IsVertLR(), 
p->IsVertLRBT()); }
+    void Refresh(const SwFrame& rFrame) { Refresh(rFrame.IsVertical(), 
rFrame.IsVertLR(), rFrame.IsVertLRBT()); }
 
     void Refresh(bool vert, bool vL2R, bool vL2RB2T)
     {
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index 023464c995ab..a8356b38a035 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -497,7 +497,7 @@ void SwAnchoredDrawObject::MakeObjPosAnchoredAtLayout()
     }
     SetCurrRelPos( aObjPositioning.GetRelPos() );
     const SwFrame* pAnchorFrame = GetAnchorFrame();
-    SwRectFnSet aRectFnSet(pAnchorFrame);
+    SwRectFnSet aRectFnSet(*pAnchorFrame);
     const Point aAnchPos( aRectFnSet.GetPos(pAnchorFrame->getFrameArea()) );
     SetObjLeft( aAnchPos.X() + GetCurrRelPos().X() );
     SetObjTop( aAnchPos.Y() + GetCurrRelPos().Y() );
diff --git a/sw/source/core/layout/anchoredobject.cxx 
b/sw/source/core/layout/anchoredobject.cxx
index f60969613ba7..c8c418fa310f 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -263,7 +263,7 @@ void SwAnchoredObject::CheckCharRect( const SwFormatAnchor& 
_rAnch,
 
     // check positioning and alignment for invalidation of position
     {
-        SwRectFnSet aRectFnSet(&_rAnchorCharFrame);
+        SwRectFnSet aRectFnSet(_rAnchorCharFrame);
         // determine positioning and alignment
         const SwFrameFormat* pObjFormat = GetFrameFormat();
         SwFormatVertOrient aVert( pObjFormat->GetVertOrient() );
diff --git a/sw/source/core/layout/calcmove.cxx 
b/sw/source/core/layout/calcmove.cxx
index 0c71e22d5e97..1fdc0c047e5e 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -94,8 +94,8 @@ bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame 
*pNewUpper, bool & )
                     return false;
             }
         }
-        SwRectFnSet aRectFnSet(this);
-        SwRectFnSet fnRectX(pNewUpper);
+        SwRectFnSet aRectFnSet(*this);
+        SwRectFnSet fnRectX(*pNewUpper);
         if( std::abs( fnRectX.GetWidth(pNewUpper->getFramePrintArea()) -
                  aRectFnSet.GetWidth(GetUpper()->getFramePrintArea()) ) > 1 ) {
             // In this case, only a WouldFit_ with test move is possible
@@ -580,7 +580,7 @@ void SwFrame::MakePos()
 
     pPrv = ::sw::PrevSkipDead(this, false);
     const SwFrameType nMyType = GetType();
-    SwRectFnSet aRectFnSet((IsCellFrame() && GetUpper() ? GetUpper() : this));
+    SwRectFnSet aRectFnSet((IsCellFrame() && GetUpper() ? *GetUpper() : 
*this));
     if ( !bUseUpper && pPrv )
     {
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
@@ -1162,7 +1162,7 @@ void SwContentFrame::MakePrtArea( const SwBorderAttrs 
&rAttrs )
         return;
 
     setFramePrintAreaValid(true);
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nUpper = 0;
     if (IsTextFrame() && IsHiddenNow())
     {
@@ -1465,7 +1465,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
         }
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     SwFrame const* pMoveBwdPre(nullptr);
     bool isMoveBwdPreValid(false);
@@ -1487,7 +1487,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
             SwFrame *pPre = GetIndPrev();
             if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
             {
-                aRectFnSet.Refresh(this);
+                aRectFnSet.Refresh(*this);
                 bMovedFwd = true;
                 if ( bMovedBwd )
                 {
@@ -1655,7 +1655,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
              ( !bFootnote || !GetUpper()->FindFootnoteFrame()->GetPrev() )
              && MoveBwd( bDummy ) )
         {
-            aRectFnSet.Refresh(this);
+            aRectFnSet.Refresh(*this);
             pMoveBwdPre = pTemp;
             isMoveBwdPreValid = bTemp;
             bMovedBwd = true;
@@ -1673,7 +1673,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
                 {
                     bMovedFwd = true;
                     bMoveable = IsMoveable();
-                    aRectFnSet.Refresh(this);
+                    aRectFnSet.Refresh(*this);
                 }
                 Point aOldPos = aRectFnSet.GetPos(getFrameArea());
                 MakePos();
@@ -1937,7 +1937,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
 
         if ( !bMovedFwd && !MoveFwd( bMakePage, false ) )
             bMakePage = false;
-        aRectFnSet.Refresh(this);
+        aRectFnSet.Refresh(*this);
         if (!bMovedFwd && bFootnote && GetIndPrev() != pPre)
         {   // SwFlowFrame::CutTree() could have formatted and deleted pPre
             auto const pPrevFootnoteFrame(static_cast<SwFootnoteFrame const*>(
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 1d122e8201f4..ca2d5a59d9c3 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -323,7 +323,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol 
*pAttr, bool bAdjustAttribu
         return;
     }
 
-    SwRectFnSet fnRect(this);
+    SwRectFnSet fnRect(*this);
 
     //If we have a pointer or we have to configure an attribute, we set the
     //column widths in any case. Otherwise we check if a configuration is 
needed.
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index 5e1a926b785f..441da753f810 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -635,7 +635,7 @@ bool SwFlowFrame::PasteTree( SwFrame *pStart, SwLayoutFrame 
*pParent, SwFrame *p
     }
     SwFrame *pFloat = pStart;
     SwFrame *pLst = nullptr;
-    SwRectFnSet aRectFnSet(pParent);
+    SwRectFnSet aRectFnSet(*pParent);
     SwTwips nGrowVal = 0;
     do
     {   pFloat->mpUpper = pParent;
@@ -1795,7 +1795,7 @@ SwTwips 
SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid_(
                 const tools::Long nGridLineHeight =
                         pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
 
-                SwRectFnSet aRectFnSet(&m_rThis);
+                SwRectFnSet aRectFnSet(m_rThis);
                 const SwTwips nBodyPrtTop = aRectFnSet.GetPrtTop(*pBodyFrame);
                 const SwTwips nProposedPrtTop =
                         aRectFnSet.YInc( 
aRectFnSet.GetTop(m_rThis.getFrameArea()),
@@ -2203,7 +2203,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool 
bPageBreak, bool bMoveAlways )
             bSamePage = pNewPage == pOldPage;
             // Set deadline, so the footnotes don't think up
             // silly things...
-            SwRectFnSet aRectFnSet(pOldBoss);
+            SwRectFnSet aRectFnSet(*pOldBoss);
             SwSaveFootnoteHeight aHeight( pOldBoss,
                 aRectFnSet.GetBottom(pOldBoss->getFrameArea()) );
             SwContentFrame* pStart = m_rThis.IsContentFrame() ?
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 5c5b0fa2afef..04c3f663e243 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -87,7 +87,7 @@ namespace
 /// Gets the bottom position which is a deadline for a split fly.
 SwTwips GetFlyAnchorBottom(SwFlyFrame* pFly, const SwFrame& rAnchor)
 {
-    SwRectFnSet aRectFnSet(pFly);
+    SwRectFnSet aRectFnSet(*pFly);
 
     const SwPageFrame* pPage = rAnchor.FindPageFrame();
     if (!pPage)
@@ -533,7 +533,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame &rMaster, 
SwFlyFrame &rFollow )
     {
         // To get a text flow we need to invalidate
         SwFrame *pInva = rMaster.FindLastLower();
-        SwRectFnSet aRectFnSet(&rMaster);
+        SwRectFnSet aRectFnSet(rMaster);
         const tools::Long nBottom = aRectFnSet.GetPrtBottom(rMaster);
         while ( pInva )
         {
@@ -1519,7 +1519,7 @@ void SwFlyFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorderA
         OSL_ENSURE( pAttrs->GetSize().Height() != 0 || 
rFrameSz.GetHeightPercent(), "FrameAttr height is 0." );
         OSL_ENSURE( pAttrs->GetSize().Width()  != 0 || 
rFrameSz.GetWidthPercent(), "FrameAttr width is 0." );
 
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         if( !HasFixSize() )
         {
             tools::Long nMinHeight = 0;
@@ -2063,7 +2063,7 @@ void SwFlyFrame::MakeObjPos()
     SetCurrRelPos( aObjPositioning.GetRelPos() );
 
     {
-        SwRectFnSet aRectFnSet(GetAnchorFrame());
+        SwRectFnSet aRectFnSet(*GetAnchorFrame());
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
         aFrm.Pos( aObjPositioning.GetRelPos() );
         aFrm.Pos() += aRectFnSet.GetPos(GetAnchorFrame()->getFrameArea());
@@ -2080,7 +2080,7 @@ void SwFlyFrame::MakePrtArea( const SwBorderAttrs &rAttrs 
)
         setFramePrintAreaValid(true);
 
         // consider vertical layout
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         SwTwips nLeftLine = rAttrs.CalcLeftLine();
 
         // The fly frame may be partially outside the page, check for this 
case.
@@ -2122,7 +2122,7 @@ void SwFlyFrame::MakeContentPos( const SwBorderAttrs 
&rAttrs )
     const SwTwips nUL = rAttrs.CalcTopLine()  + rAttrs.CalcBottomLine();
     Size aRelSize( CalcRel( GetFormat()->GetFrameSize() ) );
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nMinHeight = 0;
     if( IsMinHeight() )
         nMinHeight = aRectFnSet.IsVert() ? aRelSize.Width() : 
aRelSize.Height();
@@ -2297,7 +2297,7 @@ SwTwips SwFlyFrame::Grow_(SwTwips nDist, 
SwResizeLimitReason& reason, bool bTst)
         return 0;
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nSize = aRectFnSet.GetHeight(getFrameArea());
     if( nSize > 0 && nDist > ( LONG_MAX - nSize ) )
         nDist = LONG_MAX - nSize;
@@ -2440,7 +2440,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
     SwFrame* pLower = Lower();
     if( pLower && !IsColLocked() && !HasFixSize() )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         SwTwips nHeight = aRectFnSet.GetHeight(getFrameArea());
         if ( nDist > nHeight )
             nDist = nHeight;
@@ -2576,7 +2576,7 @@ bool SwFlyFrame::IsResizeValid(const SwBorderAttrs 
*pAttrs, Size aTargetSize)
         Size aRelSize( CalcRel( rFrameSz ) );
 
         tools::Long nMinHeight = 0;
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         nMinHeight = aRectFnSet.IsVert() ? aRelSize.Width() : 
aRelSize.Height();
         SwTwips nRemaining = CalcContentHeight(pAttrs, nMinHeight, nUL);
         nMinFrameHeight = nRemaining + nUL;
@@ -3440,7 +3440,7 @@ void SwFlyFrame::Calc(vcl::RenderContext* pRenderContext) 
const
 
 SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const 
SwTwips nMinHeight, const SwTwips nUL)
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nHeight = 0;
     if ( Lower() )
     {
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 67081a263cb1..f31a5deda331 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -408,7 +408,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
     // the anchor frame, thus it has to move forward.
     bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false );
     do {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         Point aOldPos( aRectFnSet.GetPos(getFrameArea()) );
         SwFlyFreeFrame::MakeAll(pRenderContext);
 
@@ -544,7 +544,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
         }
         if ( pCellFrame )
         {
-            SwRectFnSet aRectFnSet(pCellFrame);
+            SwRectFnSet aRectFnSet(*pCellFrame);
             if ( aRectFnSet.GetTop(pCellFrame->getFrameArea()) == 0 &&
                  aRectFnSet.GetHeight(pCellFrame->getFrameArea()) == 0 )
             {
diff --git a/sw/source/core/layout/flyincnt.cxx 
b/sw/source/core/layout/flyincnt.cxx
index 8098111b58d7..4dfc3a036e9d 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -73,7 +73,7 @@ void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
         xNotify.reset(new SwFlyNotify( this ));
     m_aRef = rPoint;
     SetCurrRelPos( rRelAttr );
-    SwRectFnSet aRectFnSet(GetAnchorFrame());
+    SwRectFnSet aRectFnSet(*GetAnchorFrame());
 
     {
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 1564e156dc1f..fdfd175de6d8 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -180,7 +180,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
 
     while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || 
!isFramePrintAreaValid() || m_bFormatHeightOnly || !m_bValidContentPos )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         const SwFormatFrameSize *pSz;
         {   // Additional scope, so aAccess will be destroyed before the check!
 
@@ -291,7 +291,7 @@ void SwFlyFreeFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
     Unlock();
 
 #if OSL_DEBUG_LEVEL > 0
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     OSL_ENSURE( m_bHeightClipped || ( aRectFnSet.GetHeight(getFrameArea()) > 0 
&&
             aRectFnSet.GetHeight(getFramePrintArea()) > 0),
             "SwFlyFreeFrame::Format(), flipping Fly." );
@@ -1242,7 +1242,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect 
&rRect, bool bMove )
             }
 
             rRect = pClip->getFrameArea();
-            SwRectFnSet aRectFnSet(pClip);
+            SwRectFnSet aRectFnSet(*pClip);
 
             // vertical clipping: Top and Bottom, also to PrtArea if necessary
             if( rV.GetVertOrient() != text::VertOrientation::NONE &&
@@ -1332,7 +1332,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect 
&rRect, bool bMove )
                 }
                 const SwLayoutFrame* pHoriClipFrame =
                         pFly->GetAnchorFrame()->FindPageFrame()->GetUpper();
-                SwRectFnSet aRectFnSet(pFly->GetAnchorFrame());
+                SwRectFnSet aRectFnSet(*pFly->GetAnchorFrame());
                 aRectFnSet.SetLeft( rRect, 
aRectFnSet.GetLeft(pHoriClipFrame->getFrameArea()) );
                 aRectFnSet.SetRight(rRect, 
aRectFnSet.GetRight(pHoriClipFrame->getFrameArea()));
             }
@@ -1341,7 +1341,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect 
&rRect, bool bMove )
                 // #i26945#
                 const SwFrame *pClip =
                         
const_cast<SwFlyFrame*>(pFly)->GetAnchorFrameContainingAnchPos();
-                SwRectFnSet aRectFnSet(pClip);
+                SwRectFnSet aRectFnSet(*pClip);
                 const SwLayoutFrame *pUp = pClip->GetUpper();
                 const SwFrame *pCell = pUp->IsCellFrame() ? pUp : nullptr;
                 const SwFrameType nType = bMove
@@ -1434,7 +1434,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect 
&rRect, bool bMove )
         else
         {
             const SwFrame *pUp = pFly->GetAnchorFrame()->GetUpper();
-            SwRectFnSet aRectFnSet(pFly->GetAnchorFrame());
+            SwRectFnSet aRectFnSet(*pFly->GetAnchorFrame());
             bool bOnlyCellFrame = pUp->IsCellFrame();
             while( pUp->IsColumnFrame() || pUp->IsSctFrame() || 
pUp->IsColBodyFrame())
                 pUp = pUp->GetUpper();
@@ -1528,7 +1528,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect 
&rRect, bool bMove )
                 const SwFrame* pUp = pAnchorFrame->GetUpper();
                 rRect = pUp->getFramePrintArea();
                 rRect += pUp->getFrameArea().Pos();
-                SwRectFnSet aRectFnSet(pAnchorFrame);
+                SwRectFnSet aRectFnSet(*pAnchorFrame);
                 tools::Long nHeight = (9 * aRectFnSet.GetHeight(rRect)) / 10;
                 tools::Long nTop;
                 const SvxULSpaceItem& rUL = pFormat->GetULSpace();
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 227092ae2f55..f226acbc0aa1 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -136,7 +136,7 @@ SwFrameNotify::~SwFrameNotify()
 
 void SwFrameNotify::ImplDestroy()
 {
-    SwRectFnSet aRectFnSet(mpFrame);
+    SwRectFnSet aRectFnSet(*mpFrame);
     const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->getFrameArea());
     const bool bChgWidth =
             aRectFnSet.GetWidth(maFrame) != 
aRectFnSet.GetWidth(mpFrame->getFrameArea());
@@ -492,7 +492,7 @@ static void lcl_InvalidatePosOfLowers( SwLayoutFrame& 
_rLayoutFrame )
 void SwLayNotify::ImplDestroy()
 {
     SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(mpFrame);
-    SwRectFnSet aRectFnSet(pLay);
+    SwRectFnSet aRectFnSet(*pLay);
     bool bNotify = false;
     if ( pLay->getFramePrintArea().SSize() != maPrt.SSize() )
     {
@@ -712,7 +712,7 @@ void SwFlyNotify::ImplDestroy()
 
     //Have the size or the position changed,
     //so should the view know this.
-    SwRectFnSet aRectFnSet(pFly);
+    SwRectFnSet aRectFnSet(*pFly);
     const bool bPosChgd = aRectFnSet.PosDiff( maFrame, pFly->getFrameArea() );
     const bool bFrameChgd = pFly->getFrameArea().SSize() != maFrame.SSize();
     const bool bPrtChgd = maPrt != pFly->getFramePrintArea();
@@ -829,7 +829,7 @@ void SwContentNotify::ImplDestroy()
     if ( bSetCompletePaintOnInvalidate )
         pCnt->SetCompletePaint();
 
-    SwRectFnSet aRectFnSet(pCnt);
+    SwRectFnSet aRectFnSet(*pCnt);
     if ( pCnt->IsInTab() && ( aRectFnSet.PosDiff( pCnt->getFrameArea(), 
maFrame ) ||
                              pCnt->getFrameArea().SSize() != maFrame.SSize()))
     {
@@ -1486,7 +1486,7 @@ void RecreateStartTextFrames(SwTextNode & rNode)
 static void lcl_SetPos( SwFrame&             _rNewFrame,
                  const SwLayoutFrame& _rLayFrame )
 {
-    SwRectFnSet aRectFnSet(&_rLayFrame);
+    SwRectFnSet aRectFnSet(_rLayFrame);
     SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(_rNewFrame);
     aRectFnSet.SetPos( aFrm, aRectFnSet.GetPos(_rLayFrame.getFrameArea()) );
 
@@ -3053,7 +3053,7 @@ static void lcl_AddObjsToPage( SwFrame* _pFrame, 
SwPageFrame* _pPage )
 void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling )
 {
     assert(pSav && pParent && "no Save or Parent provided for 
RestoreContent.");
-    SwRectFnSet aRectFnSet(pParent);
+    SwRectFnSet aRectFnSet(*pParent);
 
     // If there are already FlowFrames below the new parent, so add the chain 
(starting with pSav)
     // after the last one. The parts are inserted and invalidated if needed.
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 491ce87e82fc..308f9deddb08 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -228,7 +228,7 @@ SwFootnoteFrame* SwFootnoteContFrame::AddChained(bool 
bAppend, SwFrame* pThis, b
 static tools::Long lcl_Undersize( const SwFrame* pFrame )
 {
     tools::Long nRet = 0;
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     if( pFrame->IsTextFrame() )
     {
         if( static_cast<const SwTextFrame*>(pFrame)->IsUndersized() )
@@ -281,7 +281,7 @@ void SwFootnoteContFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const
     const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo();
     SwDoc* pDoc = getRootFrame()->GetCurrShell()->GetDoc();
     const SwTwips nBorder = sw::FootnoteSeparatorHeight(*pDoc, rInf);
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     if ( !isFramePrintAreaValid() )
     {
@@ -374,7 +374,7 @@ SwTwips SwFootnoteContFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reaso
     const auto nOrigDist = std::max(nDist, SwTwips(0));
     reason = SwResizeLimitReason::Unspecified;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if( aRectFnSet.GetHeight(getFrameArea()) > 0 &&
          nDist > ( LONG_MAX - aRectFnSet.GetHeight(getFrameArea()) ) )
         nDist = LONG_MAX - aRectFnSet.GetHeight(getFrameArea());
@@ -668,7 +668,7 @@ void SwFootnoteFrame::Paste(  SwFrame* pParent, SwFrame* 
pSibling )
     // insert into tree structure
     InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if( 
aRectFnSet.GetWidth(getFrameArea())!=aRectFnSet.GetWidth(pParent->getFramePrintArea())
 )
         InvalidateSize_();
     InvalidatePos_();
@@ -2101,7 +2101,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( 
SwFootnoteFrames &rFootnoteArr, bool b
     // to a new position (based on the new column/page)
     const sal_uInt16 nMyNum = FindPageFrame()->GetPhyPageNum();
     const sal_uInt16 nMyCol = lcl_ColumnNum( this );
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     // #i21478# - keep last inserted footnote in order to
     // format the content of the following one.
@@ -2431,7 +2431,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const 
SwTwips nDeadLine, const boo
             // assure its correct position, probably calculating its previous
             // footnote frames.
             {
-                SwRectFnSet aRectFnSet(this);
+                SwRectFnSet aRectFnSet(*this);
                 SwFrame* pFootnoteContFrame = pFootnoteFrame->GetUpper();
                 if ( aRectFnSet.TopDist(pFootnoteFrame->getFrameArea(), 
aRectFnSet.GetPrtBottom(*pFootnoteContFrame)) > 0 )
                 {
@@ -2645,7 +2645,7 @@ void SwFootnoteBossFrame::SetFootnoteDeadLine( const 
SwTwips nDeadLine )
 
     SwFrame *pCont = FindFootnoteCont();
     const SwTwips nMax = m_nMaxFootnoteHeight;// current should exceed 
MaxHeight
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if ( pCont )
     {
         pCont->Calc(getRootFrame()->GetCurrShell()->GetOut());
@@ -2678,7 +2678,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
     SwTwips nRet;
     if( pBody )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         nRet = aRectFnSet.GetHeight(pBody->getFrameArea());
         if( IsInSct() )
         {
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 01379463b68b..db88c12ddbef 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -211,7 +211,7 @@ void SwLayAction::PaintContent( const SwContentFrame *pCnt,
                               const SwRect &rOldRect,
                               tools::Long nOldBottom )
 {
-    SwRectFnSet aRectFnSet(pCnt);
+    SwRectFnSet aRectFnSet(*pCnt);
 
     if ( pCnt->IsCompletePaint() || !pCnt->IsTextFrame() )
     {
@@ -1458,7 +1458,7 @@ bool SwLayAction::FormatLayout( OutputDevice 
*pRenderContext, SwLayoutFrame *pLa
          !pLay->GetNext() && pLay->IsRetoucheFrame() && pLay->IsRetouche() )
     {
         // vertical layout support
-        SwRectFnSet aRectFnSet(pLay);
+        SwRectFnSet aRectFnSet(*pLay);
         SwRect aRect( pLay->GetUpper()->GetPaintArea() );
         aRectFnSet.SetTop( aRect, aRectFnSet.GetPrtBottom(*pLay) );
         if ( !m_pImp->GetShell().AddPaintRect( aRect ) )
@@ -1601,7 +1601,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool 
bAddRect )
     const SwPageFrame *pOldPage = pTab->FindPageFrame();
 
     // vertical layout support
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
 
     if ( !pTab->isFrameAreaDefinitionValid() || pTab->IsCompletePaint() || 
pTab->IsComplete() )
     {
@@ -2020,7 +2020,7 @@ void SwLayAction::FormatContent_( const SwContentFrame 
*pContent, const SwPageFr
 {
     // We probably only ended up here because the Content holds DrawObjects.
     const bool bDrawObjsOnly = pContent->isFrameAreaDefinitionValid() && 
!pContent->IsCompletePaint() && !pContent->IsRetouche();
-    SwRectFnSet aRectFnSet(pContent);
+    SwRectFnSet aRectFnSet(*pContent);
     if ( !bDrawObjsOnly && IsPaint() )
     {
         const SwRect aOldRect( pContent->UnionFrame() );
diff --git a/sw/source/core/layout/layouter.cxx 
b/sw/source/core/layout/layouter.cxx
index f4fb8426047b..d69e0c5f6abd 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -483,7 +483,7 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
     aMoveBwdLayoutInfo.mnNewUpperPosY = 
p_rNewUpperFrame.getFrameArea().Pos().Y();
     aMoveBwdLayoutInfo.mnNewUpperWidth = 
p_rNewUpperFrame.getFrameArea().Width();
     aMoveBwdLayoutInfo.mnNewUpperHeight =  
p_rNewUpperFrame.getFrameArea().Height();
-    SwRectFnSet aRectFnSet(&p_rNewUpperFrame);
+    SwRectFnSet aRectFnSet(p_rNewUpperFrame);
     const SwFrame* pLastLower( p_rNewUpperFrame.Lower() );
     while ( pLastLower && pLastLower->GetNext() )
     {
diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 070b8b8ccf32..abcfba0d4973 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -128,7 +128,7 @@ void SwBodyFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorder
         {
             bNoGrid = false;
             tools::Long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
-            SwRectFnSet aRectFnSet(this);
+            SwRectFnSet aRectFnSet(*this);
             tools::Long nSize = aRectFnSet.GetWidth(getFrameArea());
             tools::Long nBorder = 0;
             if( SwTextGrid::LinesAndChars == pGrid->GetGridType() )
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index c4d5caf3c0e2..cddf1e100fbf 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1257,7 +1257,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const 
SwFrame *pFrame,
         rRect = pFrame->getFramePrintArea();
         rRect.Pos() += pFrame->getFrameArea().Pos();
 
-        SwRectFnSet fnRect(pFrame);
+        SwRectFnSet fnRect(*pFrame);
 
         const SvxBoxItem &rBox = rAttrs.GetBox();
         const bool bTop = 0 != fnRect.GetTopMargin(*pFrame);
@@ -3350,7 +3350,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& 
rRenderContext, SwRect const&
                 {
                     // enlarge paint rectangle to complete page width, subtract
                     // current paint area and invalidate the resulting region.
-                    SwRectFnSet aRectFnSet(pPage);
+                    SwRectFnSet aRectFnSet(*pPage);
                     SwRect aPageRectTemp( aPaintRect );
                     aRectFnSet.SetLeftAndWidth( aPageRectTemp,
                          aRectFnSet.GetLeft(pPage->getFrameArea()),
@@ -4921,7 +4921,7 @@ void SwFrame::PaintShadow( const SwRect& rRect, SwRect& 
rOutRect,
               static_cast<const 
SwLayoutFrame*>(this)->GetFormat()->IsBackgroundTransparent()
             );
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     ::lcl_ExtendLeftAndRight( rOutRect, *(this), rAttrs, aRectFnSet.FnRect() );
 
     lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, 
bBottom, true, true, gProp);
@@ -5618,7 +5618,7 @@ void SwFrame::PaintSwFrameShadowAndBorder(
         if(IsContentFrame())
         {
             const SwFrame* pDirRefFrame(IsCellFrame() ? FindTabFrame() : this);
-            const SwRectFnSet aRectFnSet(pDirRefFrame);
+            const SwRectFnSet aRectFnSet(*pDirRefFrame);
             const SwRectFn _aRectFn(aRectFnSet.FnRect());
 
             if(rAttrs.JoinedWithPrev(*this))
@@ -5763,7 +5763,7 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
         pPage = FindPageFrame();
     const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo();
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nPrtWidth = aRectFnSet.GetWidth(getFramePrintArea());
     Fraction aFract( nPrtWidth, 1 );
     aFract *= rInf.GetWidth();
@@ -5844,7 +5844,7 @@ void SwLayoutFrame::PaintColLines( const SwRect &rRect, 
const SwFormatCol &rForm
     if ( !pCol || !pCol->IsColumnFrame() )
         return;
 
-    SwRectFnSet fnRect(pCol);
+    SwRectFnSet fnRect(*pCol);
 
     SwRect aLineRect = getFramePrintArea();
     aLineRect += getFrameArea().Pos();
diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 5d4b7eb173a5..9a417e2d0598 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -125,7 +125,7 @@ SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool 
bMaster ) :
 void SwSectionFrame::Init()
 {
     assert(GetUpper() && "SwSectionFrame::Init before insertion?!");
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nWidth = aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
 
     {
@@ -336,7 +336,7 @@ void SwSectionFrame::Cut_( bool bRemove )
     if ( !pUp )
         return;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
     if( nFrameHeight <= 0 )
         return;
@@ -377,7 +377,7 @@ void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* 
pSibling )
         }
     }
 
-    SwRectFnSet aRectFnSet(pParent);
+    SwRectFnSet aRectFnSet(*pParent);
     if( pSect && HasToBreak( pSect ) )
     {
         if( pParent->IsColBodyFrame() ) // dealing with a single-column area
@@ -560,7 +560,7 @@ SwSectionFrame* SwSectionFrame::SplitSect( SwFrame* 
pFrameStartAfter, SwFrame* p
     SwSectionFrame* pNew = new SwSectionFrame( *GetSection(), this );
     pNew->InsertBehind( pFramePutAfter->GetUpper(), pFramePutAfter );
     pNew->Init();
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     assert(!pFramePutAfter->IsSctFrame() || 
static_cast<SwSectionFrame*>(pFramePutAfter)->GetSection()); // it's not dead
     aRectFnSet.MakePos( *pNew, nullptr, pFramePutAfter, true );
     // OD 25.03.2003 #108339# - restore content:
@@ -782,7 +782,7 @@ void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* 
pDel, bool bSave )
                 pPrvSct = new SwSectionFrame( *pParent->GetSection(), pUp );
                 pPrvSct->InsertBehind( pUp, pPrv );
                 pPrvSct->Init();
-                SwRectFnSet aRectFnSet(pUp);
+                SwRectFnSet aRectFnSet(*pUp);
                 aRectFnSet.MakePos( *pPrvSct, pUp, pPrv, true );
                 pUp = FirstLeaf( pPrvSct );
                 pPrv = nullptr;
@@ -820,7 +820,7 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
         {
             if( GetUpper() )
             {
-                SwRectFnSet aRectFnSet(GetUpper());
+                SwRectFnSet aRectFnSet(*GetUpper());
                 aRectFnSet.MakePos(*this, GetUpper(), ::sw::PrevSkipDead(this, 
false), false);
             }
 
@@ -1038,7 +1038,7 @@ bool SwSectionFrame::CalcMinDiff( SwTwips& rMinDiff ) 
const
 {
     if( ToMaximize( true ) )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         rMinDiff = aRectFnSet.GetPrtBottom(*GetUpper());
         rMinDiff = aRectFnSet.BottomDist( getFrameArea(), rMinDiff );
         return true;
@@ -1167,7 +1167,7 @@ void SwSectionFrame::CollectEndnotes( SwLayouter* 
pLayouter )
 |*/
 void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nDiff;
     SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
     if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrame() ||
@@ -1264,7 +1264,7 @@ void SwSectionFrame::SimpleFormat()
     if ( IsJoinLocked() || IsColLocked() )
         return;
     LockJoin();
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwFrame *const pPrev{::sw::PrevSkipDead(this, false)};
     if (pPrev || GetUpper())
     {
@@ -1362,7 +1362,7 @@ class ExtraFormatToPositionObjs
                 return;
 
             // grow section till bottom of printing area of upper frame
-            SwRectFnSet aRectFnSet(mpSectFrame);
+            SwRectFnSet aRectFnSet(*mpSectFrame);
             SwTwips nTopMargin = aRectFnSet.GetTopMargin(*mpSectFrame);
             Size aOldSectPrtSize( mpSectFrame->getFramePrintArea().SSize() );
             SwTwips nDiff = aRectFnSet.BottomDist( 
mpSectFrame->getFrameArea(), aRectFnSet.GetPrtBottom(*mpSectFrame->GetUpper()) 
);
@@ -1445,7 +1445,7 @@ void SwSectionFrame::Format( vcl::RenderContext* 
pRenderContext, const SwBorderA
         return;
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     if (GetSection()->CalcHiddenFlag())
     {
@@ -1903,7 +1903,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType 
eMakePage )
             pNew = new SwSectionFrame( *pSect, false );
             pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() );
             pNew->Init();
-            SwRectFnSet aRectFnSet(pNew);
+            SwRectFnSet aRectFnSet(*pNew);
             aRectFnSet.MakePos( *pNew, pLayLeaf, nullptr, true );
 
 #ifndef NDEBUG
@@ -2205,7 +2205,7 @@ SwLayoutFrame *SwFrame::GetPrevSctLeaf()
         pNew = new SwSectionFrame( *pSect, true );
         pNew->InsertBefore( pLayLeaf, nullptr );
         pNew->Init();
-        SwRectFnSet aRectFnSet(pNew);
+        SwRectFnSet aRectFnSet(*pNew);
         aRectFnSet.MakePos(*pNew, pLayLeaf, ::sw::PrevSkipDead(pNew, false), 
true);
 
         pLayLeaf = FirstLeaf( pNew );
@@ -2255,7 +2255,7 @@ static SwTwips lcl_DeadLine( const SwFrame* pFrame )
         else
             break;
     }
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     return pUp ? aRectFnSet.GetPrtBottom(*pUp) :
                  aRectFnSet.GetBottom(pFrame->getFrameArea());
 }
@@ -2263,7 +2263,7 @@ static SwTwips lcl_DeadLine( const SwFrame* pFrame )
 /// checks whether the SectionFrame is still able to grow, as case may be the 
environment has to be asked
 bool SwSectionFrame::Growable() const
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if( aRectFnSet.YDiff( lcl_DeadLine( this ),
         aRectFnSet.GetBottom(getFrameArea()) ) > 0 )
         return true;
@@ -2288,7 +2288,7 @@ SwTwips SwSectionFrame::Grow_(SwTwips nDist, 
SwResizeLimitReason& reason, bool b
 
     const auto nOrigDist = nDist;
     reason = SwResizeLimitReason::Unspecified;
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
     if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
         nDist = LONG_MAX - nFrameHeight;
@@ -2432,7 +2432,7 @@ SwTwips SwSectionFrame::Shrink_( SwTwips nDist, bool bTst 
)
         }
         else
         {
-            SwRectFnSet aRectFnSet(this);
+            SwRectFnSet aRectFnSet(*this);
             tools::Long nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
             if ( nDist > nFrameHeight )
                 nDist = nFrameHeight;
@@ -3082,7 +3082,7 @@ void SwSectionFrame::InvalidateFootnotePos()
 
 SwTwips SwSectionFrame::CalcUndersize() const
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     return InnerHeight() - aRectFnSet.GetHeight(getFramePrintArea());
 }
 
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index f564779c2a85..9ded10fa3de2 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -597,7 +597,7 @@ SwRect SwFrame::GetPaintArea() const
     // NEW TABLES
     // Cell frames may not leave their upper:
     SwRect aRect = IsRowFrame() ? GetUpper()->getFrameArea() : getFrameArea();
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nRight = aRectFnSet.GetRight(aRect);
     tools::Long nLeft  = aRectFnSet.GetLeft(aRect);
     const SwFrame* pTmp = this;
@@ -700,7 +700,7 @@ SwRect SwFrame::GetPaintArea() const
 |*/
 SwRect SwFrame::UnionFrame( bool bBorder ) const
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     tools::Long nLeft = aRectFnSet.GetLeft(getFrameArea());
     tools::Long nWidth = aRectFnSet.GetWidth(getFrameArea());
     tools::Long nPrtLeft = aRectFnSet.GetLeft(getFramePrintArea());
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index a08ce1af68e2..bf525e7c313c 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -233,7 +233,7 @@ static SwTwips lcl_GetHeightOfRows( const SwFrame* pStart, 
tools::Long nCount )
     // to the new page's starting Y coordinate). This disallows to simplify 
the height calculation
     // to just difference between top row's top and bottom row's bottom.
     SwTwips nRet = 0;
-    SwRectFnSet aRectFnSet(pStart);
+    SwRectFnSet aRectFnSet(*pStart);
     while (pStart && nCount > 0)
     {
         nRet += aRectFnSet.GetHeight(pStart->getFrameArea());
@@ -342,7 +342,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& 
_rLayoutFrame,
 static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
 {
     SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rRow.Lower());
-    SwRectFnSet aRectFnSet(pCurrMasterCell);
+    SwRectFnSet aRectFnSet(*pCurrMasterCell);
 
     bool bAllCellsCollapsed = true;
     while ( pCurrMasterCell )
@@ -539,7 +539,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, 
SwRowFrame& rLastLine,
     SwCellFrame* pCurrLastLineCell = 
static_cast<SwCellFrame*>(rLastLine.Lower());
     SwCellFrame* pCurrFollowFlowLineCell = 
static_cast<SwCellFrame*>(rFollowFlowLine.Lower());
 
-    SwRectFnSet aRectFnSet(pCurrLastLineCell);
+    SwRectFnSet aRectFnSet(*pCurrLastLineCell);
 
     // Move content of follow cells into master cells
     while ( pCurrLastLineCell )
@@ -683,7 +683,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, 
SwRowFrame& rFollowLine,
 
     vcl::RenderContext* pRenderContext = 
rLastLine.getRootFrame()->GetCurrShell()->GetOut();
     SwTabFrame& rTab = static_cast<SwTabFrame&>(*rLastLine.GetUpper());
-    SwRectFnSet aRectFnSet(rTab.GetUpper());
+    SwRectFnSet aRectFnSet(*rTab.GetUpper());
     SwTwips nCurLastLineHeight = 
aRectFnSet.GetHeight(rLastLine.getFrameArea());
 
     SwTwips nFootnoteHeight(0);
@@ -908,7 +908,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, 
SwRowFrame& rFollowLine,
 // Sets the correct height for all spanned cells
 static void lcl_AdjustRowSpanCells( SwRowFrame* pRow )
 {
-    SwRectFnSet aRectFnSet(pRow);
+    SwRectFnSet aRectFnSet(*pRow);
     SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pRow->GetLower());
     while ( pCellFrame )
     {
@@ -1001,7 +1001,7 @@ bool SwTabFrame::RemoveFollowFlowLine()
 
     if ( nRowsToMove > 1 )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         SwFrame* pRow = pFollowFlowLine->GetNext();
         SwFrame* pInsertBehind = GetLastLower();
         SwTwips nGrow = 0;
@@ -1105,7 +1105,7 @@ bool SwTabFrame::Split(const SwTwips nCutPos, bool 
bTryToSplit,
 {
     bool bRet = true;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     // #i26745# - format row and cell frames of table
     {
@@ -1640,7 +1640,7 @@ void SwTabFrame::Join()
     if (!pFoll || !CanDeleteFollow(pFoll))
         return;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     pFoll->Cut();   //Cut out first to avoid unnecessary notifications.
 
     SwFrame *pRow = pFoll->GetFirstNonHeadlineRow(),
@@ -1694,7 +1694,7 @@ static void SwInvalidatePositions( SwFrame *pFrame, 
tools::Long nBottom )
 {
     // LONG_MAX == nBottom means we have to calculate all
     bool bAll = LONG_MAX == nBottom;
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     do
     {   pFrame->InvalidatePos_();
         pFrame->InvalidateSize_();
@@ -1719,7 +1719,7 @@ void SwInvalidateAll( SwFrame *pFrame, tools::Long 
nBottom )
 {
     // LONG_MAX == nBottom means we have to calculate all
     bool bAll = LONG_MAX == nBottom;
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     do
     {
         pFrame->InvalidatePos_();
@@ -1784,7 +1784,7 @@ bool SwContentFrame::CalcLowers(SwLayoutFrame & rLay, 
SwLayoutFrame const& rDont
     bool bAll = LONG_MAX == nBottom;
     bool bRet = false;
     SwContentFrame *pCnt = rLay.ContainsContent();
-    SwRectFnSet aRectFnSet(&rLay);
+    SwRectFnSet aRectFnSet(rLay);
 
     // FME 2007-08-30 #i81146# new loop control
     int nLoopControlRuns = 0;
@@ -1898,7 +1898,7 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
     // LONG_MAX == nBottom means we have to calculate all
     bool bAll = LONG_MAX == nBottom;
     const SwFrame* pOldUp = pFrame->GetUpper();
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     do
     {
         // #i26945# - parameter <_bOnlyRowsAndCells> controls,
@@ -2426,7 +2426,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
     int nUnSplitted = 5; // Just another loop control :-(
     int nThrowAwayValidLayoutLimit = 5; // And another one :-(
     PosSizeOscillationControl posSizeOscillationControl; // And yet another 
one.
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     while ( !isFrameAreaPositionValid() || !isFrameAreaSizeValid() || 
!isFramePrintAreaValid() )
     {
         const bool bMoveable = IsMoveable();
@@ -2547,7 +2547,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
             {
                 SAL_WARN_IF(oDeleteListener && oDeleteListener->WasDeleted(), 
"sw.layout", "SwFootnoteBossFrame unexpectedly deleted");
 
-                aRectFnSet.Refresh(this);
+                aRectFnSet.Refresh(*this);
                 bMovedBwd = true;
                 aNotify.SetLowersComplete( false );
                 if (bFootnotesInDoc && !oDeleteListener->WasDeleted())
@@ -3184,7 +3184,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
                         {
                             GetFollow()->GetLower()->InvalidatePos();
                         }
-                        SwRectFnSet fnRectX(GetFollow());
+                        SwRectFnSet fnRectX(*GetFollow());
 
                         static sal_uInt8 nStack = 0;
                         if ( !StackHack::IsLocked() && nStack < 4 )
@@ -3296,7 +3296,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
             nUnSplitted = 5;
         }
 
-        aRectFnSet.Refresh(this);
+        aRectFnSet.Refresh(*this);
         m_bCalcLowers = true;
         bMovedFwd = true;
         aNotify.SetLowersComplete( false );
@@ -3437,7 +3437,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
     if (!bWrapAllowed || !pPage->GetSortedObjs())
         return bInvalidatePrtArea;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     const bool bConsiderWrapOnObjPos
         = rIDSA.get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
     tools::Long nPrtPos = aRectFnSet.GetTop(getFrameArea());
@@ -3594,7 +3594,7 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
             // tdf#138039 don't grow beyond the page body
             // if the fly is anchored below the table; the fly
             // must move with its anchor frame to the next page
-            SwRectFnSet fnPage(pPage);
+            SwRectFnSet fnPage(*pPage);
             if (!IsInDocBody() // TODO
                 || fnPage.YDiff(fnPage.GetBottom(aFlyRect), 
fnPage.GetPrtBottom(*pPage)) <= 0
                 || !IsNextOnSamePage(
@@ -3680,7 +3680,7 @@ void SwTabFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorderA
 {
     OSL_ENSURE( pAttrs, "TabFrame::Format, pAttrs is 0." );
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if ( !isFrameAreaSizeValid() )
     {
         tools::Long nDiff = 
aRectFnSet.GetWidth(GetUpper()->getFramePrintArea()) -
@@ -3946,7 +3946,7 @@ void SwTabFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorderA
 
 SwTwips SwTabFrame::GrowFrame(SwTwips nDist, SwResizeLimitReason& reason, bool 
bTst, bool bInfo)
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nHeight = aRectFnSet.GetHeight(getFrameArea());
     if( nHeight > 0 && nDist > ( LONG_MAX - nHeight ) )
         nDist = LONG_MAX - nHeight;
@@ -4315,12 +4315,12 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame 
*pNewUpper, bool &rReformat )
         bool bMoveAnyway = false;
         SwTwips nSpace = 0;
 
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         if ( !SwFlowFrame::IsMoveBwdJump() )
         {
 
             tools::Long nOldWidth = 
aRectFnSet.GetWidth(GetUpper()->getFramePrintArea());
-            SwRectFnSet fnRectX(pNewUpper);
+            SwRectFnSet fnRectX(*pNewUpper);
             tools::Long nNewWidth = 
fnRectX.GetWidth(pNewUpper->getFramePrintArea());
             if( std::abs( nNewWidth - nOldWidth ) < 2 )
             {
@@ -4479,7 +4479,7 @@ void SwTabFrame::Cut()
 
     //First remove, then shrink the upper.
     SwLayoutFrame *pUp = GetUpper();
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     RemoveFromLayout();
     if ( pUp )
     {
@@ -4569,7 +4569,7 @@ void SwTabFrame::Paste( SwFrame* pParent, SwFrame* 
pSibling )
             GetNext()->InvalidatePage( pPage );
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if( aRectFnSet.GetHeight(getFrameArea()) )
         pParent->Grow( aRectFnSet.GetHeight(getFrameArea()) );
 
@@ -4904,7 +4904,7 @@ static tools::Long CalcHeightWithFlys_Impl(const SwFrame* 
pTmp, const SwFrame* p
 
 tools::Long CalcHeightWithFlys( const SwFrame *pFrame )
 {
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     if (pFrame->IsSctFrame())
     {
         if (pFrame->IsHiddenNow())
@@ -4961,7 +4961,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame 
*_pCell,
                                       const bool _bConsiderObjs,
                                       const SwBorderAttrs *pAttrs = nullptr )
 {
-    SwRectFnSet aRectFnSet(_pCell);
+    SwRectFnSet aRectFnSet(*_pCell);
     SwTwips nHeight = 0;
     const SwFrame* pLow = _pCell->Lower();
     tools::Long nFlyAdd = 0;
@@ -5076,7 +5076,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* 
_pRow,
         }
     }
 
-    SwRectFnSet aRectFnSet(_pRow);
+    SwRectFnSet aRectFnSet(*_pRow);
     const SwCellFrame* pLow = static_cast<const SwCellFrame*>(_pRow->Lower());
     while ( pLow )
     {
@@ -5228,7 +5228,7 @@ static SwTwips lcl_calcHeightOfRowBeforeThisFrame(const 
SwRowFrame& rRow)
     // We don't need to account for previous instances of repeated headlines
     if (rRow.IsRepeatedHeadline())
         return 0;
-    SwRectFnSet aRectFnSet(&rRow);
+    SwRectFnSet aRectFnSet(rRow);
     const SwTableLine* pLine = rRow.GetTabLine();
     const SwTabFrame* pTab = rRow.FindTabFrame();
     if (!pLine || !pTab || !pTab->IsFollow())
@@ -5261,7 +5261,7 @@ static SwTwips lcl_calcHeightOfRowBeforeThisFrame(const 
SwRowFrame& rRow)
 
 void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const 
SwBorderAttrs *pAttrs )
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     OSL_ENSURE( pAttrs, "SwRowFrame::Format without Attrs." );
 
     const bool bFix = mbFixSize;
@@ -5438,7 +5438,7 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, 
const bool bHeight )
     SwFrame *pFrame = Lower();
     if ( bHeight )
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
         SwRect aOldFrame;
 #endif
@@ -5557,7 +5557,7 @@ SwTwips SwRowFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reason, bool b
     SwTwips nReal = 0;
 
     SwTabFrame* pTab = FindTabFrame();
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
 
     bool bRestrictTableGrowth;
     bool bHasFollowFlowLine = pTab->HasFollowFlowLine();
@@ -5610,7 +5610,7 @@ SwTwips SwRowFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reason, bool b
     //Update the height of the cells to the newest value.
     if ( !bTst )
     {
-        SwRectFnSet fnRectX(this);
+        SwRectFnSet fnRectX(*this);
         AdjustCells( fnRectX.GetHeight(getFramePrintArea()) + nReal, true );
         if ( nReal )
             SetCompletePaint();
@@ -5622,7 +5622,7 @@ SwTwips SwRowFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reason, bool b
 
 SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     if( HasFixSize() )
     {
         AdjustCells( aRectFnSet.GetHeight(getFramePrintArea()), true );
@@ -5819,7 +5819,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, 
tools::Long lYStart, bool bI
 {
     bool bRet = false;
     SwFrame *pFrame = pLay->Lower();
-    SwRectFnSet aRectFnSet(pLay);
+    SwRectFnSet aRectFnSet(*pLay);
     while ( pFrame )
     {
         tools::Long nFrameTop = aRectFnSet.GetTop(pFrame->getFrameArea());
@@ -6041,7 +6041,7 @@ void SwCellFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorder
 {
     OSL_ENSURE( pAttrs, "CellFrame::Format, pAttrs is 0." );
     const SwTabFrame* pTab = FindTabFrame();
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     SwFrame* pLower = Lower();
 
     if ( !isFramePrintAreaValid() )
@@ -6212,7 +6212,7 @@ void SwCellFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorder
         return;
 
     // From now on, all operations are related to the table cell.
-    aRectFnSet.Refresh(this);
+    aRectFnSet.Refresh(*this);
 
     SwPageFrame* pPg = nullptr;
     if ( !FindTabFrame()->IsRebuildLastLine() && text::VertOrientation::NONE 
!= rOri.GetVertOrient() &&
@@ -6425,7 +6425,7 @@ void SwCellFrame::SwClientNotify(const SwModify& rMod, 
const SfxHint& rHint)
             SwFrame* pLower = Lower();
             if(text::VertOrientation::NONE == eVertOrient && pLower && 
pLower->IsContentFrame())
             {
-                SwRectFnSet aRectFnSet(this);
+                SwRectFnSet aRectFnSet(*this);
                 const tools::Long lYStart = aRectFnSet.GetPrtTop(*this);
                 bInva = lcl_ArrangeLowers(this, lYStart, false);
             }
@@ -6723,7 +6723,7 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const 
SwRowFrame& rSourceLine )
 {
     // Find corresponding split line in master table
     const SwTabFrame* pTab = rSourceLine.FindTabFrame();
-    SwRectFnSet aRectFnSet(pTab);
+    SwRectFnSet aRectFnSet(*pTab);
     const SwCellFrame* pCurrSourceCell = static_cast<const 
SwCellFrame*>(rSourceLine.Lower());
 
     // 1. Case: rSourceLine is a follow flow line.
@@ -6870,7 +6870,7 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const 
SwRowFrame& rSourceLine )
 /// Function to calculate height of first text row
 SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     const bool bDontSplit = !IsFollow() && 
!GetFormat()->GetLayoutSplit().GetValue();
 
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index fed5b30a9e99..b7c3df403152 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -332,7 +332,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition 
*pPos, Point &rPoint,
                         nextTextPos.AdjustContent(+1);
                         SwRect nextTextRect;
                         pTextFrame->GetCharRect(nextTextRect, nextTextPos);
-                        SwRectFnSet aRectFnSet(pTextFrame);
+                        SwRectFnSet aRectFnSet(*pTextFrame);
                         if (aRectFnSet.GetTop(aTextRect) ==
                             aRectFnSet.GetTop(nextTextRect)) // same line?
                         {
@@ -762,7 +762,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame 
*pStart,
     const SwFrame* pVertRefFrame = pStart;
     if ( bTableSel && pStTab )
         pVertRefFrame = pStTab;
-    SwRectFnSet aRectFnSet(pVertRefFrame);
+    SwRectFnSet aRectFnSet(*pVertRefFrame);
 
     SwTwips nX = 0;
     if ( bTab )
@@ -1372,7 +1372,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( 
Point& rPoint,
     if ( aActualSize.Height() > 
pActual->GetUpper()->getFramePrintArea().Height() )
         aActualSize.setHeight( 
pActual->GetUpper()->getFramePrintArea().Height() );
 
-    SwRectFnSet aRectFnSet(pActual);
+    SwRectFnSet aRectFnSet(*pActual);
     if ( !pActual->GetPrev() &&
          aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pActual),
                               aRectFnSet.IsVert() ? rPoint.X() : rPoint.Y() ) 
> 0 )
@@ -1739,7 +1739,7 @@ bool SwFrame::IsHiddenNow() const
 
 void SwFrame::MakeValidZeroHeight()
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     {
         SwFrameAreaDefinition::FramePrintAreaWriteAccess area(*this);
         aRectFnSet.SetHeight(area, 0);
@@ -2243,7 +2243,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& 
rCursor, SwRects & rRects,
     {
         aEndFrame.Intersection( pEndFrame->GetPaintArea() );
     }
-    SwRectFnSet aRectFnSet(pStartFrame);
+    SwRectFnSet aRectFnSet(*pStartFrame);
     const bool bR2L = pStartFrame->IsRightToLeft();
     const bool bEndR2L = pEndFrame->IsRightToLeft();
     const bool bB2T = pStartFrame->IsVertLRBT();
@@ -2329,7 +2329,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& 
rCursor, SwRects & rRects,
 
         if( pEnd2Pos )
         {
-            SwRectFnSet fnRectX(pEndFrame);
+            SwRectFnSet fnRectX(*pEndFrame);
             SwRect aTmp( aEndRect );
 
             // BiDi-Portions are swimming against the current.
@@ -2427,7 +2427,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& 
rCursor, SwRects & rRects,
             aRectFnSet.SetWidth( aStRect, 1 );
         }
 
-        SwRectFnSet fnRectX(pEndFrame);
+        SwRectFnSet fnRectX(*pEndFrame);
         if ( fnRectX.GetWidth(pEnd2Pos->aPortion2) )
         {
             SwRect aTmp( aEndRect );
@@ -2639,7 +2639,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor const& 
rCursor, SwRects & rRects,
             Sub( aRegion, aPrvRect );
 
         // At last the endframe...
-        aRectFnSet.Refresh(pEndFrame);
+        aRectFnSet.Refresh(*pEndFrame);
         nTmpTwips = aRectFnSet.GetTop(aEndRect);
         if( aRectFnSet.GetTop(aEndFrame) != nTmpTwips )
         {
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 554f5ac37c31..8d8b78460ae3 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1384,7 +1384,7 @@ void SwContentFrame::Cut()
     }
     else
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         tools::Long nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
         if( nFrameHeight )
             pUp->Shrink( nFrameHeight );
@@ -1496,7 +1496,7 @@ void SwLayoutFrame::Cut()
     if ( GetNext() )
         GetNext()->InvalidatePos_();
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nShrink = aRectFnSet.GetHeight(getFrameArea());
 
     // Remove first, then shrink upper.
@@ -1589,7 +1589,7 @@ SwTwips SwFrame::Grow(SwTwips nDist, SwResizeLimitReason& 
reason, bool bTst, boo
         }
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     SwTwips nPrtHeight = aRectFnSet.GetHeight(getFramePrintArea());
     if( nPrtHeight > 0 && nDist > (LONG_MAX - nPrtHeight) )
@@ -1630,7 +1630,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool 
bInfo )
                      pThisCell->GetLayoutRowSpan() < 1 )
                     return 0;
             }
-            SwRectFnSet aRectFnSet(this);
+            SwRectFnSet aRectFnSet(*this);
             SwTwips nReal = aRectFnSet.GetHeight(getFrameArea());
             ShrinkFrame( nDist, bTst, bInfo );
             nReal -= aRectFnSet.GetHeight(getFrameArea());
@@ -1840,7 +1840,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool 
bTst )
     SwTwips nReal = 0,
             nAdd  = 0;
     SwFrame *pFrame = nullptr;
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     if( IsBodyFrame() )
     {
@@ -2159,7 +2159,7 @@ void SwFrame::ValidateThisAndAllLowers( const sal_uInt16 
nStage )
 
 SwTwips SwContentFrame::GrowFrame(SwTwips nDist, SwResizeLimitReason& reason, 
bool bTst, bool bInfo)
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     SwTwips nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
     if( nFrameHeight > 0 &&
@@ -2286,7 +2286,7 @@ SwTwips SwContentFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reason, bo
 
 SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
 {
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     OSL_ENSURE( nDist >= 0, "nDist < 0" );
     OSL_ENSURE( nDist <= aRectFnSet.GetHeight(getFrameArea()),
             "nDist > than current size." );
@@ -2694,7 +2694,7 @@ SwTwips SwLayoutFrame::InnerHeight() const
     if (!pCnt)
         return 0;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nRet = 0;
     if( pCnt->IsColumnFrame() || pCnt->IsCellFrame() )
     {
@@ -2744,7 +2744,7 @@ SwTwips SwLayoutFrame::GrowFrame(SwTwips nDist, 
SwResizeLimitReason& reason, boo
         return 0;
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     const SwTwips nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
     const SwTwips nFramePos = getFrameArea().Pos().X();
 
@@ -2965,7 +2965,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool 
bTst, bool bInfo )
         return 0;
 
     OSL_ENSURE( nDist >= 0, "nDist < 0" );
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nFrameHeight = aRectFnSet.GetHeight(getFrameArea());
     if ( nDist > nFrameHeight )
         nDist = nFrameHeight;
@@ -3203,7 +3203,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
     const bool bHeightChgd = rOldSize.Height() != getFramePrintArea().Height();
     const bool bWidthChgd  = rOldSize.Width()  != getFramePrintArea().Width();
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     // This shortcut basically tries to handle only lower frames that
     // are affected by the size change. Otherwise much more lower frames
@@ -3929,7 +3929,7 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs 
&rAttrs,
         tools::Long nMinimum = nMinHeight;
         tools::Long nMaximum;
         bool bNoBalance = false;
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         if( IsSctFrame() )
         {
             nMaximum = aRectFnSet.GetHeight(getFrameArea()) - nBorder +
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 0e6b702cc6db..5f2210438b7e 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -217,7 +217,7 @@ void SwAnchoredObjectPosition::GetVertAlignmentValues(
 {
     SwTwips nHeight = 0;
     SwTwips nOffset = 0;
-    SwRectFnSet aRectFnSet(&_rVertOrientFrame);
+    SwRectFnSet aRectFnSet(_rVertOrientFrame);
     // #i11860# - top of <_rVertOrientFrame> for object positioning
     const SwTwips nVertOrientTop = GetTopForObjPos( _rVertOrientFrame, 
aRectFnSet.FnRect(), aRectFnSet.IsVert() );
     // #i11860# - upper space amount of <_rVertOrientFrame> considered
@@ -379,7 +379,7 @@ SwTwips SwAnchoredObjectPosition::GetVertRelPos(
                                     SwTwips& _roVertOffsetToFrameAnchorPos ) 
const
 {
     SwTwips nRelPosY = 0;
-    SwRectFnSet aRectFnSet(&_rVertOrientFrame);
+    SwRectFnSet aRectFnSet(_rVertOrientFrame);
 
     SwTwips nAlignAreaHeight;
     SwTwips nAlignAreaOffset;
@@ -671,7 +671,7 @@ void SwAnchoredObjectPosition::GetHoriAlignmentValues( 
const SwFrame&  _rHoriOri
 {
     SwTwips nWidth = 0;
     SwTwips nOffset = 0;
-    SwRectFnSet aRectFnSet(&_rHoriOrientFrame);
+    SwRectFnSet aRectFnSet(_rHoriOrientFrame);
     switch ( _eRelOrient )
     {
         case text::RelOrientation::PRINT_AREA:
@@ -904,7 +904,7 @@ SwTwips SwAnchoredObjectPosition::CalcRelPosX(
                              nWidth, nOffset, bAlignedRelToPage );
 
     const SwFrame& rAnchorFrame = GetAnchorFrame();
-    SwRectFnSet aRectFnSet(&_rHoriOrientFrame);
+    SwRectFnSet aRectFnSet(_rHoriOrientFrame);
     SwTwips nObjWidth = aRectFnSet.GetWidth(GetAnchoredObj().GetObjRect());
     SwTwips nRelPosX = nOffset;
     if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE )
@@ -1014,7 +1014,7 @@ SwTwips 
SwAnchoredObjectPosition::AdjustHoriRelPosForDrawAside(
     const SwFlyAtContentFrame& rFlyAtContentFrame =
                         static_cast<const 
SwFlyAtContentFrame&>(GetAnchoredObj());
     const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() );
-    SwRectFnSet aRectFnSet(&_rHoriOrientFrame);
+    SwRectFnSet aRectFnSet(_rHoriOrientFrame);
 
     SwTwips nAdjustedRelPosX = _nProposedRelPosX;
 
@@ -1141,7 +1141,7 @@ bool SwAnchoredObjectPosition::DrawAsideFly( const 
SwFlyFrame* _pFly,
 {
     bool bRetVal = false;
 
-    SwRectFnSet aRectFnSet(&GetAnchorFrame());
+    SwRectFnSet aRectFnSet(GetAnchorFrame());
 
     if ( _pFly->IsFlyAtContentFrame() &&
          aRectFnSet.BottomDist( _pFly->getFrameArea(), 
aRectFnSet.GetTop(_rObjRect) ) < 0 &&
diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
index 888b59fd2d0c..de5308dd8cb8 100644
--- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
@@ -82,7 +82,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition()
     // swap anchor frame, if swapped. Note: destructor takes care of the 'undo'
     SwFrameSwapper aFrameSwapper( &rAnchorFrame, false );
 
-    SwRectFnSet aRectFnSet(&rAnchorFrame);
+    SwRectFnSet aRectFnSet(rAnchorFrame);
 
     Point aAnchorPos( mrProposedAnchorPos );
 
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index e938d9937078..57b200c81d58 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -176,7 +176,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
 
     // get text frame the object is anchored at
     const SwTextFrame& rAnchorTextFrame = GetAnchorTextFrame();
-    SwRectFnSet aRectFnSet(&rAnchorTextFrame);
+    SwRectFnSet aRectFnSet(rAnchorTextFrame);
 
     const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() );
 
@@ -265,7 +265,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
             }
         }
     }
-    aRectFnSet.Refresh(pOrientFrame);
+    aRectFnSet.Refresh(*pOrientFrame);
 
     // Microsoft allows WrapThrough shapes to be placed outside of the cell 
despite layoutInCell
     // (Re-use existing compat flag to identify MSO formats. The name also 
matches this purpose.)
@@ -686,7 +686,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
             }
             else
             {
-                aRectFnSet.Refresh(pAnchorFrameForVertPos);
+                aRectFnSet.Refresh(*pAnchorFrameForVertPos);
                 SwTwips nAvail =
                     aRectFnSet.YDiff( 
aRectFnSet.GetPrtBottom(*pUpperOfOrientFrame),
                                         nTopOfAnch );
@@ -767,7 +767,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
                                 {
                                     pUpperOfOrientFrame = pTmp;
                                     bMoveable = rAnchorTextFrame.IsMoveable( 
pUpperOfOrientFrame );
-                                    aRectFnSet.Refresh(pUpperOfOrientFrame);
+                                    aRectFnSet.Refresh(*pUpperOfOrientFrame);
                                     nAvail = 
aRectFnSet.GetHeight(pUpperOfOrientFrame->getFramePrintArea());
                                 }
                                 else
@@ -1015,7 +1015,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
                     }
                     if ( pNextLay )
                     {
-                        SwRectFnSet fnRectX(pNextLay);
+                        SwRectFnSet fnRectX(*pNextLay);
                         if ( !bInSct ||
                              ( 
pUpperOfOrientFrame->FindSctFrame()->IsAnFollow( pNextLay->FindSctFrame() ) &&
                                
fnRectX.GetHeight(pNextLay->getFramePrintArea()) ) )
@@ -1028,7 +1028,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
                             else
                                 aRelPos.setY( nTmpRelPosY );
                             pUpperOfOrientFrame = pNextLay;
-                            aRectFnSet.Refresh(pUpperOfOrientFrame);
+                            aRectFnSet.Refresh(*pUpperOfOrientFrame);
                             bMoveable = rAnchorTextFrame.IsMoveable( 
pUpperOfOrientFrame );
                             if( fnRectX.IsVert() )
                             {
diff --git 
a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx 
b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 04d94185d755..90837d4388b6 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -49,7 +49,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
 {
     const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() );
 
-    SwRectFnSet aRectFnSet(&GetAnchorFrame());
+    SwRectFnSet aRectFnSet(GetAnchorFrame());
 
     const SwFrameFormat& rFrameFormat = GetFrameFormat();
     const SvxLRSpaceItem &rLR = rFrameFormat.GetLRSpace();
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 99041e54b38a..357b2dfdda84 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -729,7 +729,7 @@ void 
SwTaggedPDFHelper::SetAttributes(vcl::pdf::StructElement eType)
     {
         vcl::pdf::PDFWriter::StructAttributeValue eVal;
         const SwFrame* pFrame = &mpFrameInfo->mrFrame;
-        SwRectFnSet aRectFnSet(pFrame);
+        SwRectFnSet aRectFnSet(*pFrame);
 
         bool bPlacement = false;
         bool bWritingMode = false;
@@ -992,7 +992,7 @@ void 
SwTaggedPDFHelper::SetAttributes(vcl::pdf::StructElement eType)
                 const SwTabFrame* pTabFrame = pThisCell->FindTabFrame();
                 const SwTable* pTable = pTabFrame->GetTable();
 
-                SwRectFnSet fnRectX(pTabFrame);
+                SwRectFnSet fnRectX(*pTabFrame);
 
                 const TableColumnsMapEntry& 
rCols(mpPDFExtOutDevData->GetSwPDFState()->m_TableColumnsMap[pTable]);
 
@@ -1705,7 +1705,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
 
                 if ( aIter == rTableColumnsMap.end() )
                 {
-                    SwRectFnSet aRectFnSet(pTabFrame);
+                    SwRectFnSet aRectFnSet(*pTabFrame);
                     TableColumnsMapEntry& rCols = rTableColumnsMap[ pTable ];
 
                     const SwTabFrame* pMasterFrame = pTabFrame->IsFollow() ? 
pTabFrame->FindMaster( true ) : pTabFrame;
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 28a5db42b606..b709561c37f9 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -200,7 +200,7 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const 
SwPosition &rPos,
     if (pTmpFrame->getFrameArea().Top() == FAR_AWAY && !bAllowFarAway)
         return false;
 
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     const SwTwips nUpperMaxY = aRectFnSet.GetPrtBottom(*pTmpFrame);
     const SwTwips nFrameMaxY = aRectFnSet.GetPrtBottom(*pFrame);
 
@@ -374,7 +374,7 @@ bool SwTextFrame::GetAutoPos( SwRect& rOrig, const 
SwPosition &rPos ) const
     pFrame->GetFormatted();
     const SwFrame* pTmpFrame = pFrame->GetUpper();
 
-    SwRectFnSet aRectFnSet(pTmpFrame);
+    SwRectFnSet aRectFnSet(*pTmpFrame);
     SwTwips nUpperMaxY = aRectFnSet.GetPrtBottom(*pTmpFrame);
 
     // nMaxY is in absolute value
@@ -464,7 +464,7 @@ bool SwTextFrame::GetTopOfLine( SwTwips& _onTopOfLine,
     }
     else
     {
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         if ( IsEmpty() || !aRectFnSet.GetHeight(getFramePrintArea()) )
         {
             // consider upper space amount considered
@@ -476,7 +476,7 @@ bool SwTextFrame::GetTopOfLine( SwTwips& _onTopOfLine,
             // determine formatted text frame that contains the requested 
position
             SwTextFrame* pFrame = 
&(const_cast<SwTextFrame*>(this)->GetFrameAtOfst( nOffset ));
             pFrame->GetFormatted();
-            aRectFnSet.Refresh(pFrame);
+            aRectFnSet.Refresh(*pFrame);
             // If proportional line spacing is applied
             // to the text frame, the top of the anchor character is also the
             // top of the line.
@@ -1716,7 +1716,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
                          pUp->GetUpper()->GetUpper()->IsSctFrame() )
                     pUp = pUp->GetUpper()->GetUpper()->GetUpper();
             }
-            SwRectFnSet aRectFnSet(this);
+            SwRectFnSet aRectFnSet(*this);
             SwTwips nLimit = aRectFnSet.GetPrtBottom(*pUp);
             SwTwips nRectBottom = rRect.Bottom();
             if ( aRectFnSet.IsVert() )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 43e54789e65b..dc4e06c89292 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -201,7 +201,7 @@ bool SwTextFrame::CalcFollow(TextFrameIndex const nTextOfst)
         const SwFrame *pOldUp = GetUpper();
 #endif
 
-        SwRectFnSet aRectFnSet(this);
+        SwRectFnSet aRectFnSet(*this);
         SwTwips nOldBottom = aRectFnSet.GetBottom(GetUpper()->getFrameArea());
         SwTwips nMyPos = aRectFnSet.GetTop(getFrameArea());
 
@@ -424,7 +424,7 @@ void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool 
bHasToFit )
     // AdjustFrame is called with a swapped frame during
     // formatting but the frame is not swapped during FormatEmpty
     SwSwapIfSwapped swap( this );
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     // The Frame's size variable is incremented by Grow or decremented by 
Shrink.
     // If the size cannot change, nothing should happen!
@@ -867,7 +867,7 @@ void SwTextFrame::SetOffset_(TextFrameIndex const nNewOfst)
 bool SwTextFrame::CalcPreps()
 {
     OSL_ENSURE( ! IsVertical() || ! IsSwapped(), "SwTextFrame::CalcPreps with 
swapped frame" );
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     SwParaPortion *pPara = GetPara();
     if ( !pPara )
@@ -2101,7 +2101,7 @@ void SwTextFrame::Format( vcl::RenderContext* 
pRenderContext, const SwBorderAttr
     // The previous state is saved here and restored after returning.
     SwTextFrameFormatScopeGuard stSg{ pRenderContext, this };
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     CalcAdditionalFirstLineOffset();
 
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index 386f40942f5f..b3edf1fe6834 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -106,7 +106,7 @@ SwTwips SwTextFrameInfo::GetLineStart() const
 // Calculates the character's position and returns the middle position
 SwTwips SwTextFrameInfo::GetCharPos(TextFrameIndex const nChar, bool bCenter) 
const
 {
-    SwRectFnSet aRectFnSet(m_pFrame);
+    SwRectFnSet aRectFnSet(*m_pFrame);
     SwFrameSwapper aSwapper( m_pFrame, true );
 
     SwTextSizeInfo aInf( const_cast<SwTextFrame*>(m_pFrame) );
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index a25152138f9e..b4b04a333ea3 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -1775,7 +1775,7 @@ bool SwTextFrame::IsEmptyWithSplitFly() const
         return false;
     }
 
-    SwRectFnSet fnUpper(GetUpper());
+    SwRectFnSet fnUpper(*GetUpper());
     if (fnUpper.YDiff(fnUpper.GetBottom(getFrameArea()), 
fnUpper.GetPrtBottom(*GetUpper())) <= 0)
     {
         return false;
@@ -1833,7 +1833,7 @@ SwTwips SwTextNode::GetWidthOfLeadingTabs() const
             if (!pFrame->IsFollow() &&
                 pFrame->GetTextNodeForFirstText() == this)
             {
-                SwRectFnSet aRectFnSet(pFrame);
+                SwRectFnSet aRectFnSet(*pFrame);
                 SwRect aRect;
                 pFrame->GetCharRect( aRect, aPos );
                 nRet = pFrame->IsRightToLeft() ?
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index b2ea1062dc65..6df97bb533b0 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1981,7 +1981,7 @@ bool SwTextFrame::FillSelection( SwSelectionList& 
rSelList, const SwRect& rRect
             SwTextInfo aInf( const_cast<SwTextFrame*>(this) );
             SwTextIter aLine( const_cast<SwTextFrame*>(this), &aInf );
             // We have to care for top-to-bottom layout, where right becomes 
top etc.
-            SwRectFnSet aRectFnSet(this);
+            SwRectFnSet aRectFnSet(*this);
             SwTwips nTop = aRectFnSet.GetTop(aRect);
             SwTwips nBottom = aRectFnSet.GetBottom(aRect);
             SwTwips nLeft = aRectFnSet.GetLeft(aRect);
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index eaa6eb6c3e17..8bcc6bf64959 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -599,7 +599,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf 
)
             // its size so that its ends on the grid
             const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame();
             const SwLayoutFrame* pBody = pPageFrame->FindBodyCont();
-            SwRectFnSet aRectFnSet(pPageFrame);
+            SwRectFnSet aRectFnSet(*pPageFrame);
 
             const tools::Long nGridOrigin = pBody ?
                                     aRectFnSet.GetPrtLeft(*pBody) :
@@ -2458,7 +2458,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
         if( IsRegisterOn() )
         {
             SwTwips nTmpY = Y() + m_pCurr->GetAscent() + nLineHeight - 
m_pCurr->Height();
-            SwRectFnSet aRectFnSet(m_pFrame);
+            SwRectFnSet aRectFnSet(*m_pFrame);
             if ( aRectFnSet.IsVert() )
                 nTmpY = m_pFrame->SwitchHorizontalToVertical( nTmpY );
             nTmpY = aRectFnSet.YDiff( nTmpY, RegStart() );
@@ -3137,7 +3137,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo 
&rInf )
     const SwPageFrame* pPageFrame = m_pFrame->FindPageFrame();
     const SwLayoutFrame* pBody = pPageFrame->FindBodyCont();
 
-    SwRectFnSet aRectFnSet(pPageFrame);
+    SwRectFnSet aRectFnSet(*pPageFrame);
 
     const tools::Long nGridOrigin = pBody ?
                             aRectFnSet.GetPrtLeft(*pBody) :
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 5d5146e2f8c1..a17d345eaf09 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -491,7 +491,7 @@ bool SwTextFrame::FormatEmpty()
             nHeight = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
     }
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
     SwTwips nChg = nHeight - aRectFnSet.GetHeight(getFramePrintArea());
     const SwBodyFrame* pBody = FindBodyFrame();
     if (pNonLastSplitFlyDrawObj && pBody)
@@ -549,7 +549,7 @@ bool SwTextFrame::FillRegister( SwTwips& rRegStart, 
sal_uInt16& rRegDiff )
         pFrame = pFrame->GetUpper();
     if( ( SwFrameType::Body| SwFrameType::Fly ) & pFrame->GetType() )
     {
-        SwRectFnSet aRectFnSet(pFrame);
+        SwRectFnSet aRectFnSet(*pFrame);
         rRegStart = aRectFnSet.GetPrtTop(*pFrame);
         pFrame = pFrame->FindPageFrame();
         if( pFrame->IsPageFrame() )
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 4e15eeab005f..b9e7229c5c76 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -269,7 +269,7 @@ SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
         mvItems.erase(mvItems.begin() + nPos);
         mvItems.insert(mvItems.begin(), std::move(item));
     }
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     tools::Long nTmpTop = aRectFnSet.GetTop(rLine);
     // fnGetBottom is top + height
     tools::Long nTmpBottom = aRectFnSet.GetBottom(rLine);
@@ -382,7 +382,7 @@ SwRect SwTextFly::GetFrame_( const SwRect &rRect ) const
     SwRect aRet;
     if( ForEach( rRect, &aRet, true ) )
     {
-        SwRectFnSet aRectFnSet(m_pCurrFrame);
+        SwRectFnSet aRectFnSet(*m_pCurrFrame);
         aRectFnSet.SetTop( aRet, aRectFnSet.GetTop(rRect) );
 
         // Do not always adapt the bottom
@@ -905,7 +905,7 @@ SwAnchoredObjList& SwTextFly::InitAnchoredObjList()
         SwRect const aRect(GetFrameArea());
         // Make ourselves a little smaller than we are,
         // so that 1-Twip-overlappings are ignored (#49532)
-        SwRectFnSet aRectFnSet(m_pCurrFrame);
+        SwRectFnSet aRectFnSet(*m_pCurrFrame);
         const tools::Long nRight = aRectFnSet.GetRight(aRect) - 1;
         const tools::Long nLeft = aRectFnSet.GetLeft(aRect) + 1;
         const bool bR2L = m_pCurrFrame->IsRightToLeft();
@@ -1099,7 +1099,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* 
pRect, bool bAvoid ) const
     SwSwapIfSwapped swap(const_cast<SwTextFrame *>(m_pCurrFrame));
 
     // Optimization
-    SwRectFnSet aRectFnSet(m_pCurrFrame);
+    SwRectFnSet aRectFnSet(*m_pCurrFrame);
 
     // tdf#127235 stop if the area is larger than the page
     if( aRectFnSet.GetHeight(m_pPage->getFrameArea()) < 
aRectFnSet.GetHeight(rRect))
@@ -1212,7 +1212,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly,
     // Usually the right margin is the right margin of the Printarea
     OSL_ENSURE( !m_pCurrFrame->IsVertical() || !m_pCurrFrame->IsSwapped(),
             "SwTextFly::CalcRightMargin with swapped frame" );
-    SwRectFnSet aRectFnSet(m_pCurrFrame);
+    SwRectFnSet aRectFnSet(*m_pCurrFrame);
     // #118796# - correct determination of right of printing area
     SwTwips nRight = aRectFnSet.GetPrtRight(*m_pCurrFrame);
     SwTwips nFlyRight = aRectFnSet.GetRight(rFly);
@@ -1300,7 +1300,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly,
 {
     OSL_ENSURE( !m_pCurrFrame->IsVertical() || !m_pCurrFrame->IsSwapped(),
             "SwTextFly::CalcLeftMargin with swapped frame" );
-    SwRectFnSet aRectFnSet(m_pCurrFrame);
+    SwRectFnSet aRectFnSet(*m_pCurrFrame);
     // #118796# - correct determination of left of printing area
     SwTwips nLeft = aRectFnSet.GetPrtLeft(*m_pCurrFrame);
     const SwTwips nFlyLeft = aRectFnSet.GetLeft(rFly);
@@ -1361,7 +1361,7 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly,
 SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
                             const SwRect &rLine ) const
 {
-    SwRectFnSet aRectFnSet(m_pCurrFrame);
+    SwRectFnSet aRectFnSet(*m_pCurrFrame);
 
     const tools::Long nXPos = m_pCurrFrame->IsRightToLeft() ?
                        rLine.Right() :
@@ -1453,7 +1453,7 @@ css::text::WrapTextMode 
SwTextFly::GetSurroundForTextWrap( const SwAnchoredObjec
     // "ideal page wrap":
     if ( css::text::WrapTextMode_DYNAMIC == eSurroundForTextWrap )
     {
-        SwRectFnSet aRectFnSet(m_pCurrFrame);
+        SwRectFnSet aRectFnSet(*m_pCurrFrame);
         const tools::Long nCurrLeft = aRectFnSet.GetPrtLeft(*m_pCurrFrame);
         const tools::Long nCurrRight = aRectFnSet.GetPrtRight(*m_pCurrFrame);
         const SwRect& aRect( pAnchoredObj->GetObjRectWithSpaces() );
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 30b49c04cdb2..5b50cb82b649 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1732,7 +1732,7 @@ bool sw_HideObj( const SwTextFrame& _rFrame,
                         {
                             bRet = false;
                             // set needed data structure values for object 
positioning
-                            SwRectFnSet aRectFnSet(&_rFrame);
+                            SwRectFnSet aRectFnSet(_rFrame);
                             SwRect aLastCharRect( _rFrame.getFrameArea() );
                             aRectFnSet.SetWidth( aLastCharRect, 1 );
                             _pAnchoredObj->maLastCharRect = aLastCharRect;
@@ -3402,7 +3402,7 @@ SwTestFormat::SwTestFormat( SwTextFrame* pTextFrame, 
const SwFrame* pPre, SwTwip
     aOldFrame = pFrame->getFrameArea();
     aOldPrt = pFrame->getFramePrintArea();
 
-    SwRectFnSet aRectFnSet(pFrame);
+    SwRectFnSet aRectFnSet(*pFrame);
     SwTwips nLower = aRectFnSet.GetBottomMargin(*pFrame);
 
     {
@@ -3501,7 +3501,7 @@ bool SwTextFrame::WouldFit(SwTwips &rMaxHeight, bool 
&bSplit, bool bTst, bool bM
 {
     OSL_ENSURE( ! IsVertical() || ! IsSwapped(),
             "SwTextFrame::WouldFit with swapped frame" );
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     if( IsLocked() )
         return false;
@@ -4213,7 +4213,7 @@ SwScriptInfo* SwTextFrame::GetScriptInfo()
 static SwTwips lcl_CalcFlyBasePos( const SwTextFrame& rFrame, SwRect aFlyRect,
                             SwTextFly const & rTextFly )
 {
-    SwRectFnSet aRectFnSet(&rFrame);
+    SwRectFnSet aRectFnSet(rFrame);
     SwTwips nRet = rFrame.IsRightToLeft() ?
                    aRectFnSet.GetRight(rFrame.getFrameArea()) :
                    aRectFnSet.GetLeft(rFrame.getFrameArea());
@@ -4264,7 +4264,7 @@ void SwTextFrame::CalcBaseOfstForFly()
     if 
(!GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::ADD_FLY_OFFSETS))
         return;
 
-    SwRectFnSet aRectFnSet(this);
+    SwRectFnSet aRectFnSet(*this);
 
     SwRect aFlyRect( getFrameArea().Pos() + getFramePrintArea().Pos(), 
getFramePrintArea().SSize() );
 
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index b1dbc84860fc..e599793f31fd 100644
--- a/sw/source/core/text/txtftn.cxx
-e 
... etc. - the rest is truncated

Reply via email to