[Libreoffice-commits] core.git: sw/inc sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 11 16:46:40 UTC 2019


 sw/inc/swtypes.hxx                           |   76 +++++++++++++--------------
 sw/source/core/doc/notxtfrm.cxx              |    2 
 sw/source/core/docnode/node.cxx              |    2 
 sw/source/core/draw/dcontact.cxx             |   14 ++--
 sw/source/core/frmedt/feshview.cxx           |    2 
 sw/source/core/inc/frame.hxx                 |    2 
 sw/source/core/inc/tabfrm.hxx                |    2 
 sw/source/core/inc/txtfrm.hxx                |    2 
 sw/source/core/layout/anchoreddrawobject.cxx |   10 +--
 sw/source/core/layout/anchoredobject.cxx     |    2 
 sw/source/core/layout/calcmove.cxx           |   24 ++++----
 sw/source/core/layout/flowfrm.cxx            |   10 +--
 sw/source/core/layout/fly.cxx                |   10 +--
 sw/source/core/layout/flycnt.cxx             |    4 -
 sw/source/core/layout/flyincnt.cxx           |   10 +--
 sw/source/core/layout/flylay.cxx             |    4 -
 sw/source/core/layout/frmtool.cxx            |   40 +++++++-------
 sw/source/core/layout/ftnfrm.cxx             |   12 ++--
 sw/source/core/layout/hffrm.cxx              |    4 -
 sw/source/core/layout/pagechg.cxx            |    2 
 sw/source/core/layout/sectfrm.cxx            |    6 +-
 sw/source/core/layout/tabfrm.cxx             |   12 ++--
 sw/source/core/layout/wsfrm.cxx              |   42 +++++++-------
 sw/source/core/text/frmform.cxx              |    4 -
 sw/source/core/text/porlay.hxx               |    6 +-
 sw/source/core/text/txtfrm.cxx               |   62 +++++++++++-----------
 sw/source/core/text/widorp.cxx               |   12 ++--
 sw/source/core/txtnode/ndtxt.cxx             |    2 
 28 files changed, 189 insertions(+), 191 deletions(-)

New commits:
commit 775a06361639ffc539fda20d44b9610c98005d9b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Dec 11 09:45:16 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 11 17:45:25 2019 +0100

    convert PrepareHint to scoped enum
    
    Change-Id: Ia7c987dc59f335d76ee874c1bb51707cb55ff41e
    Reviewed-on: https://gerrit.libreoffice.org/84922
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index e83406e8c5e5..1e1fc74d0645 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -201,46 +201,44 @@ SW_DLLPUBLIC const ::utl::TransliterationWrapper& GetAppCmpStrIgnore();
 
 // Official shortcut for Prepare() regarding notification of Content by the Layout.
 // Content provides for calculation of minimal requirements at the next call of ::Format().
-enum PrepareHint
+enum class PrepareHint
 {
-    PREP_BEGIN,             // BEGIN.
-    PREP_CLEAR = PREP_BEGIN,// Reformat completely.
-    PREP_WIDOWS_ORPHANS,    // Only check for widows and orphans and split in case of need.
-    PREP_FIXSIZE_CHG,       // FixSize has changed.
-    PREP_FOLLOW_FOLLOWS,    // Follow is now possibly adjacent.
-    PREP_ADJUST_FRM,        // Adjust size via grow/shrink without formatting.
-    PREP_FLY_CHGD,          // A FlyFrame has changed its size.
-    PREP_FLY_ATTR_CHG,      // A FlyFrame has changed its attributes
-                            // (e. g. wrap).
-    PREP_FLY_ARRIVE,        // A FlyFrame now overlaps range.
-    PREP_FLY_LEAVE,         // A FlyFrame has left range.
-    PREP_FTN,               // Invalidation of footnotes.
-    PREP_POS_CHGD,          // Position of Frame has changed.
-                            // (Check for Fly-break). In void* of Prepare()
-                            // a sal_Bool& is passed. If this is sal_True,
-                            // it indicates that a format has been executed.
-    PREP_UL_SPACE,          // UL-Space has changed, TextFrames have to
-                            // re-calculate line space.
-    PREP_MUST_FIT,          // Make frm fit (split) even if the attributes do
-                            // not allow that (e.g. "keep together").
-    PREP_WIDOWS,            // A follow realizes that the orphan rule will be applied
-                            // for it and sends a PREP_WIDOWS to its predecessor
-                            // (Master/Follow).
-    PREP_QUOVADIS,          // If a footnote has to be split between two paragraphs
-                            // the last on the page has to receive a QUOVADIS in
-                            // order to format the text into it.
-    PREP_BOSS_CHGD,         // If a Frame changes its column/page this additional
-                            // Prepare is sended to POS_CHGD in MoveFwd/Bwd
-                            // (join Footnote-numbers etc.)
-                            // Direction is communicated via pVoid:
-                            //     MoveFwd: pVoid == 0
-                            //     MoveBwd: pVoid == pOldPage
-    PREP_REGISTER,          // Invalidate frames with registers.
-    PREP_FTN_GONE,          // A Follow loses its footnote, possibly its first line can move up.
-    PREP_MOVEFTN,           // A footnote changes its page. Its contents receives at first a
-                            // height of zero in order to avoid too much noise. At formatting
-                            // it checks whether it fits and if necessary changes its page again.
-    PREP_ERGOSUM,           // Needed because of movement in FootnoteFrames. Check QuoVadis/ErgoSum.
+    Clear,                     // Reformat completely.
+    WidowsOrphans,             // Only check for widows and orphans and split in case of need.
+    FixSizeChanged,            // FixSize has changed.
+    FollowFollows,             // Follow is now possibly adjacent.
+    AdjustSizeWithoutFormatting,  // Adjust size via grow/shrink without formatting.
+    FlyFrameSizeChanged,       // A FlyFrame has changed its size.
+    FlyFrameAttributesChanged, // A FlyFrame has changed its attributes (e. g. wrap).
+    FlyFrameArrive,            // A FlyFrame now overlaps range.
+    FlyFrameLeave,             // A FlyFrame has left range.
+    FootnoteInvalidation,      // Invalidation of footnotes.
+    FramePositionChanged,      // Position of Frame has changed.
+                               // (Check for Fly-break). In void* of Prepare()
+                               // a sal_Bool& is passed. If this is sal_True,
+                               // it indicates that a format has been executed.
+    ULSpaceChanged,            // UL-Space has changed, TextFrames have to
+                               // re-calculate line space.
+    MustFit,                   // Make frm fit (split) even if the attributes do
+                               // not allow that (e.g. "keep together").
+    Widows,                    // A follow realizes that the orphan rule will be applied
+                               // for it and sends a Widows to its predecessor
+                               // (Master/Follow).
+    QuoVadis,                  // If a footnote has to be split between two paragraphs
+                               // the last on the page has to receive a QUOVADIS in
+                               // order to format the text into it.
+    BossChanged,               // If a Frame changes its column/page this additional
+                               // Prepare is sent to POS_CHGD in MoveFwd/Bwd
+                               // (join Footnote-numbers etc.)
+                               // Direction is communicated via pVoid:
+                               //     MoveFwd: pVoid == 0
+                               //     MoveBwd: pVoid == pOldPage
+    Register,                  // Invalidate frames with registers.
+    FootnoteInvalidationGone,  // A Follow loses its footnote, possibly its first line can move up.
+    FootnoteMove,              // A footnote changes its page. Its contents receives at first a
+                               // height of zero in order to avoid too much noise. At formatting
+                               // it checks whether it fits and if necessary changes its page again.
+    ErgoSum,                   // Needed because of movement in FootnoteFrames. Check QuoVadis/ErgoSum.
 };
 
 enum class FrameControlType
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 536d7f193747..c5823e3e3809 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -706,7 +706,7 @@ void SwNoTextFrame::ClearCache()
     if( pFly && pFly->GetFormat()->GetSurround().IsContour() )
     {
         ClrContourCache( pFly->GetVirtDrawObj() );
-        pFly->NotifyBackground( FindPageFrame(), getFramePrintArea(), PREP_FLY_ATTR_CHG );
+        pFly->NotifyBackground( FindPageFrame(), getFramePrintArea(), PrepareHint::FlyFrameAttributesChanged );
     }
 }
 
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 7ecaa5138b4c..7a4b5db8d506 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1439,7 +1439,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout)
                 nullptr != ( pCFrame = pFootnote->GetRefFromAttr()) && pCFrame->IsFollow() )
             {
                 OSL_ENSURE( pCFrame->IsTextFrame(), "NoTextFrame has Footnote?" );
-                pCFrame->FindMaster()->Prepare( PREP_FTN_GONE );
+                pCFrame->FindMaster()->Prepare( PrepareHint::FootnoteInvalidationGone );
             }
         }
         pFrame->Cut();
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 82548ced5a6f..1660dd8945d6 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -223,7 +223,7 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
         if ( pAnchoredObj->GetPageFrame() )
         {
             ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(),
-                                 pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, true );
+                                 pAnchoredObj->GetObjRect(), PrepareHint::FlyFrameArrive, true );
         }
 
         pAnchoredObj->InvalidateObjPos();
@@ -248,7 +248,7 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
         if (pAnchoredObj->GetPageFrame())
         {
             ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(),
-                                 pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, true );
+                                 pAnchoredObj->GetObjRect(), PrepareHint::FlyFrameLeave, true );
         }
     }
 }
@@ -889,7 +889,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const tools::Rectangle* pOldBound
                 aOldRect.Pos() += pDrawVirtObj->GetOffset();
                 if( aOldRect.HasArea() )
                     ::Notify_Background( pDrawVirtObj, pPage,
-                                         aOldRect, PREP_FLY_LEAVE,true);
+                                         aOldRect, PrepareHint::FlyFrameLeave,true);
             }
             // #i34640# - include spacing for wrapping
             SwRect aRect( pDrawVirtObj->GetAnchoredObj().GetObjRectWithSpaces() );
@@ -898,7 +898,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const tools::Rectangle* pOldBound
                 SwPageFrame* pPg = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aRect, pPage )));
                 if ( pPg )
                     ::Notify_Background( pDrawVirtObj, pPg, aRect,
-                                         PREP_FLY_ARRIVE, true );
+                                         PrepareHint::FlyFrameArrive, true );
             }
             ::ClrContourCache( pDrawVirtObj );
         }
@@ -925,7 +925,7 @@ static void lcl_NotifyBackgroundOfObj( SwDrawContact const & _rDrawContact,
                 // #i34640# - determine correct page frame
                 SwPageFrame* pOldPageFrame = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aOldRect, pPageFrame )));
                 ::Notify_Background( &_rObj, pOldPageFrame, aOldRect,
-                                     PREP_FLY_LEAVE, true);
+                                     PrepareHint::FlyFrameLeave, true);
             }
         }
         // #i34640# - include spacing for wrapping
@@ -934,7 +934,7 @@ static void lcl_NotifyBackgroundOfObj( SwDrawContact const & _rDrawContact,
         {
             pPageFrame = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aNewRect, pPageFrame )));
             ::Notify_Background( &_rObj, pPageFrame, aNewRect,
-                                 PREP_FLY_ARRIVE, true );
+                                 PrepareHint::FlyFrameArrive, true );
         }
         ClrContourCache( &_rObj );
     }
@@ -1301,7 +1301,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
                         SwFrame* pAnchorFrame = const_cast<SwAnchoredDrawObject*>(pAnchoredDrawObj)->AnchorFrame();
                         if(pAnchorFrame)
                         {
-                            pAnchorFrame->Prepare( PREP_FLY_ATTR_CHG, GetFormat() );
+                            pAnchorFrame->Prepare( PrepareHint::FlyFrameAttributesChanged, GetFormat() );
                         }
                     }
 
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 1e2e08a78c5b..9c14c9372362 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -887,7 +887,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
                     aTmpCalcPnt = pCnt->getFramePrintArea();
                     aTmpCalcPnt += pCnt->getFrameArea().Pos();
                     if ( aRect.IsOver( aTmpCalcPnt ) )
-                        static_cast<SwFrame*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG );
+                        static_cast<SwFrame*>(pCnt)->Prepare( PrepareHint::FlyFrameAttributesChanged );
                     pCnt = pCnt->GetNextContentFrame();
                 }
             }
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index a16deaf02094..b997fd29712b 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -821,7 +821,7 @@ public:
     // HACK: shortcut between frame and formatting
     // It's your own fault if you cast void* incorrectly! In any case check
     // the void* for 0.
-    virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
+    virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
                           const void *pVoid = nullptr, bool bNotify = true );
 
     // true if it is the correct class, false otherwise
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 95da935cd079..325515755fe8 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -133,7 +133,7 @@ public:
     virtual void Cut() override;
     virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override;
 
-    virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
+    virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
                           const void *pVoid = nullptr, bool bNotify = true ) override;
 
                  SwFrame *FindLastContentOrTable();
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index f4c288001b1e..21297f872d35 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -461,7 +461,7 @@ public:
      * return true if the Portion associated with this SwTextFrame was
      * potentially destroyed and replaced by Prepare
      */
-    virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
+    virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
                           const void *pVoid = nullptr, bool bNotify = true ) override;
 
     /**
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index b28c9ebf317a..5f60d769a44a 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -72,7 +72,7 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE
         if( maOldObjRect.HasArea() && mpOldPageFrame )
         {
             mpAnchoredDrawObj->NotifyBackground( mpOldPageFrame, maOldObjRect,
-                                                 PREP_FLY_LEAVE );
+                                                 PrepareHint::FlyFrameLeave );
         }
         SwRect aNewObjRect( mpAnchoredDrawObj->GetObjRect() );
         if( aNewObjRect.HasArea() )
@@ -81,7 +81,7 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE
             SwPageFrame* pNewPageFrame = mpAnchoredDrawObj->GetPageFrame();
             if( pNewPageFrame )
                 mpAnchoredDrawObj->NotifyBackground( pNewPageFrame, aNewObjRect,
-                                                     PREP_FLY_ARRIVE );
+                                                     PrepareHint::FlyFrameArrive );
         }
 
         ::ClrContourCache( mpAnchoredDrawObj->GetDrawObj() );
@@ -94,7 +94,7 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE
         if ( mpAnchoredDrawObj->GetAnchorFrame()->IsTextFrame() &&
              mpOldPageFrame == mpAnchoredDrawObj->GetAnchorFrame()->FindPageFrame() )
         {
-            mpAnchoredDrawObj->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
+            mpAnchoredDrawObj->AnchorFrame()->Prepare( PrepareHint::FlyFrameLeave );
         }
 
         // indicate a restart of the layout process
@@ -113,7 +113,7 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE
             // to wrap around it.
             mpAnchoredDrawObj->NotifyBackground( mpAnchoredDrawObj->GetPageFrame(),
                                     mpAnchoredDrawObj->GetObjRectWithSpaces(),
-                                    PREP_FLY_ARRIVE );
+                                    PrepareHint::FlyFrameArrive );
             // invalidate position of anchor frame in order to force
             // a re-format of the anchor frame, which also causes a
             // re-format of the invalid previous frames of the anchor frame.
@@ -573,7 +573,7 @@ void SwAnchoredDrawObject::InvalidateObjPos()
                 SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );
                 if (pAnchorTextFrame->CalcFlyPos(&GetFrameFormat()) != TextFrameIndex(COMPLETE_STRING))
                 {
-                    AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
+                    AnchorFrame()->Prepare( PrepareHint::FlyFrameAttributesChanged, &GetFrameFormat() );
                 }
             }
 
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index c7bc0cd08e8b..871a6abc0085 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -397,7 +397,7 @@ void SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence()
         // invalidate position
         InvalidateObjPos();
         // invalidate 'background'
-        NotifyBackground( GetPageFrame(), GetObjRectWithSpaces(), PREP_FLY_LEAVE );
+        NotifyBackground( GetPageFrame(), GetObjRectWithSpaces(), PrepareHint::FlyFrameLeave );
     }
 }
 
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 4c7a88543827..ce5d753524f6 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1451,16 +1451,16 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
             const SwTwips nOldH = aRectFnSet.GetHeight(getFrameArea());
             MakePrtArea( rAttrs );
             if ( nOldW != aRectFnSet.GetWidth(getFramePrintArea()) )
-                Prepare( PREP_FIXSIZE_CHG );
+                Prepare( PrepareHint::FixSizeChanged );
             // #i34730# - check, if frame height has changed.
-            // If yes, send a PREP_ADJUST_FRM and invalidate the size flag to
+            // If yes, send a PrepareHint::AdjustSizeWithoutFormatting and invalidate the size flag to
             // force a format. The format will check in its method
             // <SwTextFrame::CalcPreps()>, if the already formatted lines still
             // fit and if not, performs necessary actions.
             // #i40150# - no check, if frame is undersized.
             if ( isFrameAreaSizeValid() && !IsUndersized() && nOldH != aRectFnSet.GetHeight(getFrameArea()) )
             {
-                // #115759# - no PREP_ADJUST_FRM and size
+                // #115759# - no PrepareHint::AdjustSizeWithoutFormatting and size
                 // invalidation, if height decreases only by the additional
                 // lower space as last content of a table cell and an existing
                 // follow containing one line exists.
@@ -1472,7 +1472,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
                     GetFollow()->CalcAddLowerSpaceAsLastInTableCell() == nHDiff;
                 if ( !bNoPrepAdjustFrame )
                 {
-                    Prepare( PREP_ADJUST_FRM );
+                    Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                     setFrameAreaSizeValid(false);
                 }
             }
@@ -1489,7 +1489,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
             if( bMoveable && !bFormatted &&
                 ( GetFollow() || aRectFnSet.OverStep( getFrameArea(), nDeadLine ) ) )
             {
-                Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
+                Prepare( PrepareHint::WidowsOrphans, nullptr, false );
                 setFrameAreaSizeValid(false);
                 bWidow = false;
             }
@@ -1498,10 +1498,10 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
             {
                 // In this Prepare, an InvalidateSize_() might happen.
                 // isFrameAreaSizeValid() becomes false and Format() gets called.
-                Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
+                Prepare( PrepareHint::FramePositionChanged, static_cast<const void*>(&bFormatted), false );
                 if ( bWidow && GetFollow() )
                 {
-                    Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
+                    Prepare( PrepareHint::WidowsOrphans, nullptr, false );
                     setFrameAreaSizeValid(false);
                 }
             }
@@ -1559,7 +1559,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
                 MakePos();
                 if( aOldPos != aRectFnSet.GetPos(getFrameArea()) )
                 {
-                    Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
+                    Prepare( PrepareHint::FramePositionChanged, static_cast<const void*>(&bFormatted), false );
                     if ( !isFrameAreaSizeValid() )
                     {
                         {
@@ -1572,11 +1572,11 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
                             const long nOldW = aRectFnSet.GetWidth(getFramePrintArea());
                             MakePrtArea( rAttrs );
                             if( nOldW != aRectFnSet.GetWidth(getFramePrintArea()) )
-                                Prepare( PREP_FIXSIZE_CHG, nullptr, false );
+                                Prepare( PrepareHint::FixSizeChanged, nullptr, false );
                         }
                         if( GetFollow() )
                         {
-                            Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
+                            Prepare( PrepareHint::WidowsOrphans, nullptr, false );
                         }
 
                         setFrameAreaSizeValid(true);
@@ -1776,7 +1776,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
                 bool bSplit = !IsFwdMoveAllowed();
                 if ( nTmp > 0 && WouldFit( nTmp, bSplit, false ) )
                 {
-                    Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
+                    Prepare( PrepareHint::WidowsOrphans, nullptr, false );
                     setFrameAreaSizeValid(false);
                     bFitPromise = true;
                     continue;
@@ -1864,7 +1864,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
             // FME 2007-08-30 #i81146# new loop control
             if ( nConsecutiveFormatsWithoutChange <= cnStopFormat )
             {
-                Prepare( PREP_MUST_FIT, nullptr, false );
+                Prepare( PrepareHint::MustFit, nullptr, false );
                 setFrameAreaSizeValid(false);
                 bMustFit = true;
                 continue;
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index af97485088e8..587c96d7e809 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -396,12 +396,12 @@ SwLayoutFrame *SwFlowFrame::CutTree( SwFrame *pStart )
         pLay = pLay->FindFootnoteFrame();
 
     // #i58846#
-    // <pPrepare( PREP_QUOVADIS )> only for frames in footnotes
+    // <pPrepare( PrepareHint::QuoVadis )> only for frames in footnotes
     if( pStart->IsInFootnote() )
     {
         SwFrame* pTmp = pStart->GetIndPrev();
         if( pTmp )
-            pTmp->Prepare( PREP_QUOVADIS );
+            pTmp->Prepare( PrepareHint::QuoVadis );
     }
 
     // Just cut quickly and take care that we don't cause problems with the
@@ -559,7 +559,7 @@ bool SwFlowFrame::PasteTree( SwFrame *pStart, SwLayoutFrame *pParent, SwFrame *p
             if( pSibling->IsSctFrame() )
                 pSibling = static_cast<SwSectionFrame*>(pSibling)->ContainsAny();
             if( pSibling )
-                pSibling->Prepare( PREP_ERGOSUM );
+                pSibling->Prepare( PrepareHint::ErgoSum );
         }
     }
     if ( nGrowVal )
@@ -1999,7 +1999,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
 
             if( bBossChg )
             {
-                m_rThis.Prepare( PREP_BOSS_CHGD, nullptr, false );
+                m_rThis.Prepare( PrepareHint::BossChanged, nullptr, false );
                 if( !bSamePage )
                 {
                     SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
@@ -2587,7 +2587,7 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
         SwPageFrame *pNewPage = m_rThis.FindPageFrame();
         if( pNewPage != pOldPage )
         {
-            m_rThis.Prepare( PREP_BOSS_CHGD, static_cast<const void*>(pOldPage), false );
+            m_rThis.Prepare( PrepareHint::BossChanged, static_cast<const void*>(pOldPage), false );
             SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
             if ( pSh && !pSh->Imp()->IsUpdateExpFields() )
                 pSh->GetDoc()->getIDocumentFieldsAccess().SetNewFieldLst(true);  // Will be done by CalcLayout() later on
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 57b09946966b..4ee38db68523 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -726,7 +726,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
             rInvFlags |= 0x41;
             // The background needs to be messaged and invalidated
             const SwRect aTmp( GetObjRectWithSpaces() );
-            NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_ATTR_CHG );
+            NotifyBackground( FindPageFrame(), aTmp, PrepareHint::FlyFrameAttributesChanged );
 
             // By changing the flow of frame-bound Frames, a vertical alignment
             // can be activated/deactivated => MakeFlyPos
@@ -790,7 +790,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                 aOld.Left  ( std::max( aOld.Left() - rLR.GetLeft(), 0L ) );
                 aOld.SSize().AdjustWidth(rLR.GetRight() );
                 aNew.Union( aOld );
-                NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
+                NotifyBackground( FindPageFrame(), aNew, PrepareHint::Clear );
 
                 // Special case:
                 // When assigning a template we cannot rely on the old column
@@ -863,7 +863,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                 {
                     SwFrame* pFrame = GetLastLower();
                     if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
-                        pFrame->Prepare( PREP_ADJUST_FRM );
+                        pFrame->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                 }
             }
 
@@ -897,7 +897,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                 }
             }
             aNew.Union( aOld );
-            NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
+            NotifyBackground( FindPageFrame(), aNew, PrepareHint::Clear );
         }
         break;
 
@@ -1424,7 +1424,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
                 ( pFrame->GetUpper()->getFramePrintArea().Height() != pFrame->getFrameArea().Height() )
                 : ( pFrame->GetUpper()->getFramePrintArea().Width() != pFrame->getFrameArea().Width() ) )
             {
-                pFrame->Prepare( PREP_FIXSIZE_CHG );
+                pFrame->Prepare( PrepareHint::FixSizeChanged );
                 pFrame->InvalidateSize_();
             }
 
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index cee06bf16a3e..bb5db884e4fd 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -184,7 +184,7 @@ void SwFlyAtContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN
         //and *puff* it's attached...
         pContent->AppendFly( this );
         if ( pOldPage && pOldPage != FindPageFrame() )
-            NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
+            NotifyBackground( pOldPage, aOld, PrepareHint::FlyFrameLeave );
 
         //Fix(3495)
         InvalidatePos_();
@@ -1386,7 +1386,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
     GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
 
     if ( pOldPage != FindPageFrame() )
-        ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, false );
+        ::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PrepareHint::FlyFrameLeave, false );
 }
 
 /** method to assure that anchored object is registered at the correct
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 9e1aa984212d..4823aab29230 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -46,7 +46,7 @@ void SwFlyInContentFrame::DestroyImpl()
     if ( !GetFormat()->GetDoc()->IsInDtor() && GetAnchorFrame() )
     {
         SwRect aTmp( GetObjRectWithSpaces() );
-        SwFlyInContentFrame::NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_LEAVE );
+        SwFlyInContentFrame::NotifyBackground( FindPageFrame(), aTmp, PrepareHint::FlyFrameLeave );
     }
 
     SwFlyFrame::DestroyImpl();
@@ -128,7 +128,7 @@ void SwFlyInContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pN
     }
 
     if ( bCallPrepare && GetAnchorFrame() )
-        AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, GetFormat() );
+        AnchorFrame()->Prepare( PrepareHint::FlyFrameAttributesChanged, GetFormat() );
 }
 
 /// Here the content gets formatted initially.
@@ -178,14 +178,14 @@ void SwFlyInContentFrame::MakeObjPos()
 void SwFlyInContentFrame::ActionOnInvalidation( const InvalidationType _nInvalid )
 {
     if ( INVALID_POS == _nInvalid || INVALID_ALL == _nInvalid )
-        AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
+        AnchorFrame()->Prepare( PrepareHint::FlyFrameAttributesChanged, &GetFrameFormat() );
 }
 
 void SwFlyInContentFrame::NotifyBackground( SwPageFrame *, const SwRect& rRect,
                                        PrepareHint eHint)
 {
-    if ( eHint == PREP_FLY_ATTR_CHG )
-        AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG );
+    if ( eHint == PrepareHint::FlyFrameAttributesChanged )
+        AnchorFrame()->Prepare( PrepareHint::FlyFrameAttributesChanged );
     else
         AnchorFrame()->Prepare( eHint, static_cast<void const *>(&rRect) );
 }
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index f64c5d3a21ab..15719ce4b9fc 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -83,7 +83,7 @@ void SwFlyFreeFrame::DestroyImpl()
         else
         {
             SwRect aTmp( GetObjRectWithSpaces() );
-            SwFlyFreeFrame::NotifyBackground( GetPageFrame(), aTmp, PREP_FLY_LEAVE );
+            SwFlyFreeFrame::NotifyBackground( GetPageFrame(), aTmp, PrepareHint::FlyFrameLeave );
         }
     }
 
@@ -792,7 +792,7 @@ void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
         }
         // #i28701# - use new method <GetPageFrame()>
         if ( pOldPage && pOldPage != GetPageFrame() )
-            NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
+            NotifyBackground( pOldPage, aOld, PrepareHint::FlyFrameLeave );
         SetCompletePaint();
         InvalidateAll();
         SetNotifyBack();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index df90b17b0f11..862db2c8a211 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -434,7 +434,7 @@ static void lcl_InvalidatePosOfLowers( SwLayoutFrame& _rLayoutFrame )
         pLowerFrame->InvalidatePos();
         if ( pLowerFrame->IsTextFrame() )
         {
-            static_cast<SwTextFrame*>(pLowerFrame)->Prepare( PREP_POS_CHGD );
+            static_cast<SwTextFrame*>(pLowerFrame)->Prepare( PrepareHint::FramePositionChanged );
         }
         else if ( pLowerFrame->IsTabFrame() )
         {
@@ -650,7 +650,7 @@ SwFlyNotify::~SwFlyNotify()
             if ( pFly->GetAnchorFrame()->IsTextFrame() &&
                  pFly->GetPageFrame() != pOldPage )
             {
-                pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
+                pFly->AnchorFrame()->Prepare( PrepareHint::FlyFrameLeave );
             }
         }
         pFly->ResetNotifyBack();
@@ -687,7 +687,7 @@ SwFlyNotify::~SwFlyNotify()
         // Needed for negative positioned Writer fly frames
         if ( pFly->GetAnchorFrame()->IsTextFrame() )
         {
-            pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
+            pFly->AnchorFrame()->Prepare( PrepareHint::FlyFrameLeave );
         }
     }
 
@@ -719,7 +719,7 @@ SwFlyNotify::~SwFlyNotify()
                 // to wrap around it.
                 pFly->NotifyBackground( pFly->GetPageFrame(),
                                         pFly->GetObjRectWithSpaces(),
-                                        PREP_FLY_ARRIVE );
+                                        PrepareHint::FlyFrameArrive );
                 // invalidate position of anchor frame in order to force
                 // a re-format of the anchor frame, which also causes a
                 // re-format of the invalid previous frames of the anchor frame.
@@ -1642,7 +1642,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
                         if( pPrv->IsSctFrame() )
                             pPrv = static_cast<SwSectionFrame*>(pPrv)->ContainsContent();
                         if( pPrv && pPrv->IsTextFrame() )
-                            static_cast<SwTextFrame*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false );
+                            static_cast<SwTextFrame*>(pPrv)->Prepare( PrepareHint::QuoVadis, nullptr, false );
                     }
                 }
                 // #i27138#
@@ -2820,7 +2820,7 @@ void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling )
         pSibling->InvalidatePage( pPage );
         SwFlowFrame *pFlowFrame = dynamic_cast<SwFlowFrame*>(pSibling);
         if (pFlowFrame && pFlowFrame->GetFollow())
-            pSibling->Prepare( PREP_CLEAR, nullptr, false );
+            pSibling->Prepare( PrepareHint::Clear, nullptr, false );
     }
     else
     {   pNxt = pParent->m_pLower;
@@ -3009,9 +3009,9 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
         if ( rOld.HasArea() &&
              rOld.Left()+pFly->GetFormat()->GetLRSpace().GetLeft() < FAR_AWAY )
         {
-            pFly->NotifyBackground( pOld, rOld, PREP_FLY_LEAVE );
+            pFly->NotifyBackground( pOld, rOld, PrepareHint::FlyFrameLeave );
         }
-        pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE );
+        pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PrepareHint::FlyFrameArrive );
     }
     else if ( rOld.SSize() != aFrame.SSize() )
     {   // changed size, invalidate the area that was left or is now overlapped
@@ -3026,7 +3026,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
         SwPageFrame* pPageFrame = pFly->FindPageFrame();
         if ( pOld != pPageFrame )
         {
-            pFly->NotifyBackground( pPageFrame, aFrame, PREP_FLY_ARRIVE );
+            pFly->NotifyBackground( pPageFrame, aFrame, PrepareHint::FlyFrameArrive );
         }
 
         if ( rOld.Left() != aFrame.Left() )
@@ -3035,7 +3035,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
             aTmp.Union( aFrame );
             aTmp.Left(  std::min(aFrame.Left(), rOld.Left()) );
             aTmp.Right( std::max(aFrame.Left(), rOld.Left()) );
-            pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
+            pFly->NotifyBackground( pOld, aTmp, PrepareHint::FlyFrameSizeChanged );
         }
         SwTwips nOld = rOld.Right();
         SwTwips nNew = aFrame.Right();
@@ -3045,7 +3045,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
             aTmp.Union( aFrame );
             aTmp.Left(  std::min(nNew, nOld) );
             aTmp.Right( std::max(nNew, nOld) );
-            pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
+            pFly->NotifyBackground( pOld, aTmp, PrepareHint::FlyFrameSizeChanged );
         }
         if ( rOld.Top() != aFrame.Top() )
         {
@@ -3053,7 +3053,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
             aTmp.Union( aFrame );
             aTmp.Top(    std::min(aFrame.Top(), rOld.Top()) );
             aTmp.Bottom( std::max(aFrame.Top(), rOld.Top()) );
-            pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
+            pFly->NotifyBackground( pOld, aTmp, PrepareHint::FlyFrameSizeChanged );
         }
         nOld = rOld.Bottom();
         nNew = aFrame.Bottom();
@@ -3063,7 +3063,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
             aTmp.Union( aFrame );
             aTmp.Top(    std::min(nNew, nOld) );
             aTmp.Bottom( std::max(nNew, nOld) );
-            pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
+            pFly->NotifyBackground( pOld, aTmp, PrepareHint::FlyFrameSizeChanged );
         }
     }
     else if(pOldPrt && *pOldPrt != pFly->getFramePrintArea())
@@ -3081,7 +3081,7 @@ void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
         if(bNotifyBackground)
         {
             // #i24097#
-            pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE );
+            pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PrepareHint::FlyFrameArrive );
         }
     }
 }
@@ -3114,12 +3114,12 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt,
     {
         SwRect aCntPrt( pCnt->getFramePrintArea() );
         aCntPrt.Pos() += pCnt->getFrameArea().Pos();
-        if ( eHint == PREP_FLY_ATTR_CHG )
+        if ( eHint == PrepareHint::FlyFrameAttributesChanged )
         {
             // #i35640# - use given rectangle <rRect> instead
             // of current bound rectangle
             if ( aCntPrt.IsOver( rRect ) )
-                pCnt->Prepare( PREP_FLY_ATTR_CHG );
+                pCnt->Prepare( PrepareHint::FlyFrameAttributesChanged );
         }
         // #i23129# - only invalidate, if the text frame
         // printing area overlaps with the given rectangle.
@@ -3155,7 +3155,7 @@ void Notify_Background( const SdrObject* pObj,
                         const bool bInva )
 {
     // If the frame was positioned correctly for the first time, do not inform the old area
-    if ( eHint == PREP_FLY_LEAVE && rRect.Top() == FAR_AWAY )
+    if ( eHint == PrepareHint::FlyFrameLeave && rRect.Top() == FAR_AWAY )
          return;
 
     SwLayoutFrame* pArea;
@@ -3172,14 +3172,14 @@ void Notify_Background( const SdrObject* pObj,
         pAnchor = const_cast<SwFrame*>(
                     GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrame() );
     }
-    if( PREP_FLY_LEAVE != eHint && pAnchor->IsInFly() )
+    if( PrepareHint::FlyFrameLeave != eHint && pAnchor->IsInFly() )
         pArea = pAnchor->FindFlyFrame();
     else
         pArea = pPage;
     SwContentFrame *pCnt = nullptr;
     if ( pArea )
     {
-        if( PREP_FLY_ARRIVE != eHint )
+        if( PrepareHint::FlyFrameArrive != eHint )
             lcl_CheckFlowBack( pArea, rRect );
 
         // Only the Flys following this anchor are reacting. Thus, those do not
@@ -3210,7 +3210,7 @@ void Notify_Background( const SdrObject* pObj,
             {
                 pLastTab = pTab;
                 isValidTableBeforeAnchor = false;
-                if (PREP_FLY_ARRIVE == eHint
+                if (PrepareHint::FlyFrameArrive == eHint
                     && pFlyFrame // TODO: do it for draw objects too?
                     && pTab->IsFollow() // table starts on previous page?
                     // "through" means they will actually overlap anyway
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index da0cf0334de5..b9c6c428784f 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -862,7 +862,7 @@ void sw_RemoveFootnotes( SwFootnoteBossFrame* pBoss, bool bPageOnly, bool bEndNo
                 if ( !pFootnote->GetAttr()->GetFootnote().IsEndNote() ||
                         bEndNotes )
                 {
-                    pFootnote->GetRef()->Prepare( PREP_FTN, static_cast<void*>(pFootnote->GetAttr()) );
+                    pFootnote->GetRef()->Prepare( PrepareHint::FootnoteInvalidation, static_cast<void*>(pFootnote->GetAttr()) );
                     if ( bPageOnly && !pNxt )
                         pNxt = pFootnote->GetFollow();
                     pFootnote->Cut();
@@ -1699,7 +1699,7 @@ bool SwFootnoteBossFrame::RemoveFootnote(
             OSL_ENSURE( pRef->IsTextFrame(), "NoTextFrame has Footnote?" );
             SwTextFrame* pMaster = pRef->FindMaster();
             if( !pMaster->IsLocked() )
-                pMaster->Prepare( PREP_FTN_GONE );
+                pMaster->Prepare( PrepareHint::FootnoteInvalidationGone );
         }
     }
     FindPageFrame()->UpdateFootnoteNum();
@@ -1966,7 +1966,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
                     SwFrame* pTmp = static_cast<SwLayoutFrame*>(pCnt)->ContainsAny();
                     while( pTmp && static_cast<SwLayoutFrame*>(pCnt)->IsAnLower( pTmp ) )
                     {
-                        pTmp->Prepare( PREP_MOVEFTN );
+                        pTmp->Prepare( PrepareHint::FootnoteMove );
 
                         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pTmp);
                         aRectFnSet.SetHeight(aFrm, 0);
@@ -1979,7 +1979,7 @@ void SwFootnoteBossFrame::MoveFootnotes_( SwFootnoteFrames &rFootnoteArr, bool b
                 }
                 else
                 {
-                    pCnt->Prepare( PREP_MOVEFTN );
+                    pCnt->Prepare( PrepareHint::FootnoteMove );
                 }
 
                 SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pCnt);
@@ -2224,7 +2224,7 @@ void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const boo
             {
                 pCnt->InvalidatePos_();
                 pCnt->InvalidateSize_();
-                pCnt->Prepare( PREP_ADJUST_FRM );
+                pCnt->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                 SwFootnoteFrame* pFootnoteFrame = pCnt->FindFootnoteFrame();
                 // #i49383#
                 if ( pFootnoteFrame != pLastFootnoteFrame )
@@ -2846,7 +2846,7 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
         MoveSubTree( pNewUp, pNewUp->Lower() );
 
         if( !bSameBoss )
-            Prepare( PREP_BOSS_CHGD );
+            Prepare( PrepareHint::BossChanged );
     }
     return bSamePage;
 }
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index fa5e1044fcad..56eb1f733307 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -345,7 +345,7 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
                                     if (pTmpFrame->IsUndersized() )
                                     {
                                         pTmpFrame->InvalidateSize();
-                                        pTmpFrame->Prepare(PREP_ADJUST_FRM);
+                                        pTmpFrame->Prepare(PrepareHint::AdjustSizeWithoutFormatting);
                                     }
                                 }
                                 /* #i3568# Undersized sections need to be
@@ -357,7 +357,7 @@ void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
                                     if (pTmpFrame->IsUndersized() )
                                     {
                                         pTmpFrame->InvalidateSize();
-                                        pTmpFrame->Prepare(PREP_ADJUST_FRM);
+                                        pTmpFrame->Prepare(PrepareHint::AdjustSizeWithoutFormatting);
                                     }
                                 }
                                 pFrame = pFrame->GetNext();
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8a9333188ad0..cd97be4205a0 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -941,7 +941,7 @@ void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
 
 static void lcl_PrepFlyInCntRegister( SwContentFrame *pFrame )
 {
-    pFrame->Prepare( PREP_REGISTER );
+    pFrame->Prepare( PrepareHint::Register );
     if( pFrame->GetDrawObjs() )
     {
         for(SwAnchoredObject* pAnchoredObj : *pFrame->GetDrawObjs())
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index ef1fa6a39ab2..2ad9d79e5d1d 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -283,7 +283,7 @@ void SwSectionFrame::Cut_( bool bRemove )
         // Someone has to take over the retouching: predecessor or Upper
         if ( nullptr != (pFrame = GetPrev()) )
         {   pFrame->SetRetouche();
-            pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+            pFrame->Prepare( PrepareHint::WidowsOrphans );
             if ( pFrame->IsContentFrame() )
                 pFrame->InvalidatePage( pPage );
         }
@@ -310,7 +310,7 @@ void SwSectionFrame::Cut_( bool bRemove )
         }
     }
     if( pPrepFrame )
-        pPrepFrame->Prepare( PREP_FTN );
+        pPrepFrame->Prepare( PrepareHint::FootnoteInvalidation );
     if ( pUp )
     {
         SwRectFnSet aRectFnSet(this);
@@ -1529,7 +1529,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
                 {
                     if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
                     {
-                        pFrame->Prepare( PREP_ADJUST_FRM );
+                        pFrame->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                         bUnderSz = true;
                     }
                     pFrame = pFrame->GetNext();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index ef0d2727fed2..0fcbd1e77a42 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -275,7 +275,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame,
                             == RndStdIds::FLY_AS_CHAR )
                     {
                         pAnchoredObj->AnchorFrame()
-                                ->Prepare( PREP_FLY_ATTR_CHG,
+                                ->Prepare( PrepareHint::FlyFrameAttributesChanged,
                                            &(pAnchoredObj->GetFrameFormat()) );
                     }
                     if ( pFly != nullptr )
@@ -1399,7 +1399,7 @@ static void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
             }
         }
         else
-            pFrame->Prepare( PREP_ADJUST_FRM );
+            pFrame->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
         pFrame = pFrame->GetNext();
     } while ( pFrame &&
               ( bAll ||
@@ -3552,7 +3552,7 @@ void SwTabFrame::Cut()
         //Someone has to do the retouch: predecessor or upper
         if ( nullptr != (pFrame = GetPrev()) )
         {   pFrame->SetRetouche();
-            pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+            pFrame->Prepare( PrepareHint::WidowsOrphans );
             pFrame->InvalidatePos_();
             if ( pFrame->IsContentFrame() )
                 pFrame->InvalidatePage( pPage );
@@ -3653,7 +3653,7 @@ void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
         pParent->Grow( aRectFnSet.GetHeight(getFrameArea()) );
 
     if( aRectFnSet.GetWidth(getFrameArea()) != aRectFnSet.GetWidth(pParent->getFramePrintArea()) )
-        Prepare( PREP_FIXSIZE_CHG );
+        Prepare( PrepareHint::FixSizeChanged );
     if ( GetPrev() )
     {
         if ( !IsFollow() )
@@ -3687,7 +3687,7 @@ void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
 
 bool SwTabFrame::Prepare( const PrepareHint eHint, const void *, bool )
 {
-    if( PREP_BOSS_CHGD == eHint )
+    if( PrepareHint::BossChanged == eHint )
         CheckDirChange();
     return false;
 }
@@ -4751,7 +4751,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
             if ( !pFrame->GetNext() )
                 pFrame->SetRetouche();
             if( bInva )
-                pFrame->Prepare( PREP_POS_CHGD );
+                pFrame->Prepare( PrepareHint::FramePositionChanged );
             if ( pFrame->IsLayoutFrame() && static_cast<SwLayoutFrame*>(pFrame)->Lower() )
                 lcl_ArrangeLowers( static_cast<SwLayoutFrame*>(pFrame),
                     aRectFnSet.GetTop(static_cast<SwLayoutFrame*>(pFrame)->Lower()->getFrameArea())
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 272306df1ba3..39d2f20fd33e 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -527,7 +527,7 @@ void SwFrame::UpdateAttrFrame( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
     {
         case RES_BOX:
         case RES_SHADOW:
-            Prepare( PREP_FIXSIZE_CHG );
+            Prepare( PrepareHint::FixSizeChanged );
             [[fallthrough]];
         case RES_LR_SPACE:
         case RES_UL_SPACE:
@@ -1046,20 +1046,20 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
         if( pNxt->IsSctFrame() )
             pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsContent();
         if( pNxt && pNxt->IsTextFrame() && pNxt->IsInFootnote() )
-            pNxt->Prepare( PREP_FTN, nullptr, false );
+            pNxt->Prepare( PrepareHint::FootnoteInvalidation, nullptr, false );
     }
 
     if ( getFrameArea().Height() )
         pParent->Grow( getFrameArea().Height() );
 
     if ( getFrameArea().Width() != pParent->getFramePrintArea().Width() )
-        Prepare( PREP_FIXSIZE_CHG );
+        Prepare( PrepareHint::FixSizeChanged );
 
     if ( GetPrev() )
     {
         if ( IsFollow() )
             //I'm a direct follower of my master now
-            static_cast<SwContentFrame*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS );
+            static_cast<SwContentFrame*>(GetPrev())->Prepare( PrepareHint::FollowFollows );
         else
         {
             if ( GetPrev()->getFrameArea().Height() !=
@@ -1086,7 +1086,7 @@ void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
         if( pFrame && pFrame->IsSctFrame() )
             pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
         if( pFrame )
-            pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
+            pFrame->Prepare( PrepareHint::QuoVadis, nullptr, false );
         if( !GetNext() )
         {
             pFrame = FindFootnoteFrame()->GetNext();
@@ -1128,7 +1128,7 @@ void SwContentFrame::Cut()
         {
             pFrame->InvalidatePrt_();
             if( IsInFootnote() )
-                pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
+                pFrame->Prepare( PrepareHint::QuoVadis, nullptr, false );
         }
         // #i26250# - invalidate printing area of previous
         // table frame.
@@ -1172,7 +1172,7 @@ void SwContentFrame::Cut()
             }
         }
         if( pFrame && IsInFootnote() )
-            pFrame->Prepare( PREP_ERGOSUM, nullptr, false );
+            pFrame->Prepare( PrepareHint::ErgoSum, nullptr, false );
         if( IsInSct() && !GetPrev() )
         {
             SwSectionFrame* pSct = FindSctFrame();
@@ -1189,7 +1189,7 @@ void SwContentFrame::Cut()
         //Someone needs to do the retouching: predecessor or upper
         if ( nullptr != (pFrame = GetPrev()) )
         {   pFrame->SetRetouche();
-            pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+            pFrame->Prepare( PrepareHint::WidowsOrphans );
             pFrame->InvalidatePos_();
             pFrame->InvalidatePage( pPage );
         }
@@ -1355,7 +1355,7 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
                 if( pFrame->IsSctFrame() )
                     pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
                 if( pFrame )
-                    pFrame->Prepare( PREP_ERGOSUM, nullptr, false );
+                    pFrame->Prepare( PrepareHint::ErgoSum, nullptr, false );
             }
         }
         if ( IsInFootnote() && nullptr != ( pFrame = GetIndPrev() ) )
@@ -1363,7 +1363,7 @@ void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
             if( pFrame->IsSctFrame() )
                 pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
             if( pFrame )
-                pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
+                pFrame->Prepare( PrepareHint::QuoVadis, nullptr, false );
         }
     }
 
@@ -1997,7 +1997,7 @@ void SwFrame::ReinitializeFrameSizeAttrFlags()
                 pCnt->InvalidatePage();
                 do
                 {
-                    pCnt->Prepare( PREP_ADJUST_FRM );
+                    pCnt->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                     pCnt->InvalidateSize_();
                     pCnt = pCnt->GetNextContentFrame();
                 } while ( static_cast<SwLayoutFrame*>(this)->IsAnLower( pCnt ) );
@@ -2429,14 +2429,14 @@ void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pN
                     // OD 2004-07-01 #i28701# - use new method <InvalidateObjs(..)>
                     GetIndNext()->InvalidateObjs();
                 }
-                Prepare( PREP_UL_SPACE );   //TextFrame has to correct line spacing.
+                Prepare( PrepareHint::ULSpaceChanged );   //TextFrame has to correct line spacing.
                 rInvFlags |= 0x80;
                 [[fallthrough]];
             }
         case RES_LR_SPACE:
         case RES_BOX:
         case RES_SHADOW:
-            Prepare( PREP_FIXSIZE_CHG );
+            Prepare( PrepareHint::FixSizeChanged );
             SwFrame::Modify( pOld, pNew );
             rInvFlags |= 0x30;
             break;
@@ -2935,7 +2935,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
                 // reference, we don't need to invalidate its master.
                 SwFrame *pTmp = pCnt->FindFootnoteBossFrame(true) == FindFootnoteBossFrame(true)
                               ?  &pCnt->FindMaster()->GetFrame() : pCnt;
-                pTmp->Prepare( PREP_ADJUST_FRM );
+                pTmp->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                 pTmp->InvalidateSize();
             }
             else
@@ -3039,7 +3039,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
                     !SwFlowFrame::CastFlowFrame( pLowerFrame )->HasFollow() )
                     pLowerFrame->InvalidateNextPos( true );
                 if ( pLowerFrame->IsTextFrame() )
-                    static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
+                    static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
             }
             else
             {
@@ -3071,7 +3071,7 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
                     pLowerFrame->InvalidateSize_();
                     pLowerFrame->InvalidatePage( pPage );
                     if ( pLowerFrame->IsTextFrame() )
-                        static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
+                        static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                 }
             }
             // #i41694# - improvement by removing duplicates
@@ -3133,9 +3133,9 @@ void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
         {
             // Text frames will only be invalidated - prepare invalidation
             if ( bFixChgd )
-                static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_FIXSIZE_CHG );
+                static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PrepareHint::FixSizeChanged );
             if ( bVarChgd )
-                static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
+                static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
         }
         else
         {
@@ -4061,7 +4061,7 @@ static void lcl_InvalidateContent( SwContentFrame *pCnt, SwInvalidateFlags nInv
         }
 
         if( nInv & SwInvalidateFlags::Size )
-            pCnt->Prepare( PREP_CLEAR, nullptr, false );
+            pCnt->Prepare( PrepareHint::Clear, nullptr, false );
         if( nInv & SwInvalidateFlags::Pos )
             pCnt->InvalidatePos_();
         if( nInv & SwInvalidateFlags::PrtArea )
@@ -4317,7 +4317,7 @@ static void UnHideRedlines(SwRootFrame & rLayout,
                         if (pMerged)
                         {
                             // invalidate SwInvalidateFlags::Size
-                            pFrame->Prepare(PREP_CLEAR, nullptr, false);
+                            pFrame->Prepare(PrepareHint::Clear, nullptr, false);
                             pFrame->InvalidatePage();
                             if (auto const pObjs = pFrame->GetDrawObjs())
                             {   // also invalidate position of existing flys
@@ -4338,7 +4338,7 @@ static void UnHideRedlines(SwRootFrame & rLayout,
                     if (auto const& pMergedPara = pFrame->GetMergedPara())
                     {
                         // invalidate SwInvalidateFlags::Size
-                        pFrame->Prepare(PREP_CLEAR, nullptr, false);
+                        pFrame->Prepare(PrepareHint::Clear, nullptr, false);
                         pFrame->InvalidatePage();
                         if (auto const pObjs = pFrame->GetDrawObjs())
                         {   // also invalidate position of existing flys
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 3eb0558791b4..a1e3d6c5c2fd 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -790,7 +790,7 @@ bool SwTextFrame::CalcPreps()
     bool bRet = false;
     if( bPrep && !pPara->GetReformat().Len() )
     {
-        // PREP_WIDOWS means that the orphans rule got activated in the Follow.
+        // PrepareHint::Widows means that the orphans rule got activated in the Follow.
         // In unfortunate cases we could also have a PrepAdjust!
         if( bPrepWidows )
         {
@@ -1872,7 +1872,7 @@ void SwTextFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttr
             SwTextFrame *pMaster = FindMaster();
             OSL_ENSURE( pMaster, "SwTextFrame::Format: homeless follow" );
             if( pMaster )
-                pMaster->Prepare( PREP_FOLLOW_FOLLOWS );
+                pMaster->Prepare( PrepareHint::FollowFollows );
             SwTwips nMaxY = aRectFnSet.GetPrtBottom(*GetUpper());
 
             if( aRectFnSet.OverStep( getFrameArea(), nMaxY  ) )
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 2cbcd06c4824..a1427da86d15 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -241,9 +241,9 @@ class SwParaPortion : public SwLineLayout
     // pLine) (compare with Orphans)
     bool m_bFlys          : 1; // Overlapping Flys?
     bool m_bPrep          : 1; // PREP_*
-    bool m_bPrepWidows    : 1; // PREP_WIDOWS
-    bool m_bPrepAdjust    : 1; // PREP_ADJUST_FRM
-    bool m_bPrepMustFit   : 1; // PREP_MUST_FIT
+    bool m_bPrepWidows    : 1; // PrepareHint::Widows
+    bool m_bPrepAdjust    : 1; // PrepareHint::AdjustSizeWithoutFormatting
+    bool m_bPrepMustFit   : 1; // PrepareHint::MustFit
     bool m_bFollowField   : 1; // We have a bit of field left for the Follow
 
     bool m_bFixLineHeight : 1; // Fixed line height
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index c249569e0b00..5100ae8eecca 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2309,7 +2309,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
             else nPos = TextFrameIndex(42); // shut up MSVC 2017 spurious warning C4701
 #endif
             if (IsInFootnote() || IsIdxInside(nPos, TextFrameIndex(1)))
-                Prepare( PREP_FTN, static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote() );
+                Prepare( PrepareHint::FootnoteInvalidation, static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote() );
             break;
         }
 
@@ -2327,7 +2327,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
                 nPos = MapModelToView(&rNode,
                     static_cast<const SwFormatFootnote*>(pItem)->GetTextFootnote()->GetStart());
                 if (IsIdxInside(nPos, TextFrameIndex(1)))
-                    Prepare( PREP_FTN, pNew );
+                    Prepare( PrepareHint::FootnoteInvalidation, pNew );
                 nClear = 0x01;
                 --nCount;
             }
@@ -2359,7 +2359,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
             {
                 if (!m_pMergedPara || m_pMergedPara->pParaPropsNode == &rModify)
                 {
-                    Prepare( bRegister ? PREP_REGISTER : PREP_ADJUST_FRM );
+                    Prepare( bRegister ? PrepareHint::Register : PrepareHint::AdjustSizeWithoutFormatting );
                     CalcLineSpace();
                     InvalidateSize();
                     InvalidatePrt_();
@@ -2682,7 +2682,7 @@ void SwTextFrame::PrepWidows( const sal_uInt16 nNeed, bool bNotify )
 static bool lcl_ErgoVadis(SwTextFrame* pFrame, TextFrameIndex & rPos, const PrepareHint ePrep)
 {
     const SwFootnoteInfo &rFootnoteInfo = pFrame->GetDoc().GetFootnoteInfo();
-    if( ePrep == PREP_ERGOSUM )
+    if( ePrep == PrepareHint::ErgoSum )
     {
         if( rFootnoteInfo.aErgoSum.isEmpty() )
             return false;
@@ -2718,14 +2718,14 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
     {
         switch ( ePrep )
         {
-            case PREP_BOSS_CHGD:
+            case PrepareHint::BossChanged:
                 SetInvalidVert( true ); // Test
                 [[fallthrough]];
-            case PREP_WIDOWS_ORPHANS:
-            case PREP_WIDOWS:
-            case PREP_FTN_GONE :    return bParaPossiblyInvalid;
+            case PrepareHint::WidowsOrphans:
+            case PrepareHint::Widows:
+            case PrepareHint::FootnoteInvalidationGone :    return bParaPossiblyInvalid;
 
-            case PREP_POS_CHGD :
+            case PrepareHint::FramePositionChanged :
             {
                 // We also need an InvalidateSize for Areas (with and without columns),
                 // so that we format and bUndersized is set (if needed)
@@ -2762,7 +2762,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
         }
     }
 
-    if( !HasPara() && PREP_MUST_FIT != ePrep )
+    if( !HasPara() && PrepareHint::MustFit != ePrep )
     {
         SetInvalidVert( true ); // Test
         OSL_ENSURE( !IsLocked(), "SwTextFrame::Prepare: three of a perfect pair" );
@@ -2779,7 +2779,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
 
     switch( ePrep )
     {
-        case PREP_MOVEFTN :
+        case PrepareHint::FootnoteMove :
             {
                 SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
                 aFrm.Height(0);
@@ -2793,7 +2793,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             InvalidatePrt_();
             InvalidateSize_();
             [[fallthrough]];
-        case PREP_ADJUST_FRM :
+        case PrepareHint::AdjustSizeWithoutFormatting :
             pPara->SetPrepAdjust();
             if( IsFootnoteNumFrame() != pPara->IsFootnoteNum() ||
                 IsUndersized() )
@@ -2803,13 +2803,13 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
                     SetOfst_(TextFrameIndex(0));
             }
             break;
-        case PREP_MUST_FIT :
+        case PrepareHint::MustFit :
             pPara->SetPrepMustFit(true);
             [[fallthrough]];
-        case PREP_WIDOWS_ORPHANS :
+        case PrepareHint::WidowsOrphans :
             pPara->SetPrepAdjust();
             break;
-        case PREP_WIDOWS :
+        case PrepareHint::Widows :
             // MustFit is stronger than anything else
             if( pPara->IsPrepMustFit() )
                 return bParaPossiblyInvalid;
@@ -2817,7 +2817,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             PrepWidows( *static_cast<const sal_uInt16 *>(pVoid), bNotify );
             break;
 
-        case PREP_FTN :
+        case PrepareHint::FootnoteInvalidation :
         {
             SwTextFootnote const *pFootnote = static_cast<SwTextFootnote const *>(pVoid);
             if( IsInFootnote() )
@@ -2851,7 +2851,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             }
             break;
         }
-        case PREP_BOSS_CHGD :
+        case PrepareHint::BossChanged :
         {
             // Test
             {
@@ -2872,9 +2872,9 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             if( IsInFootnote() )
             {
                 TextFrameIndex nPos;
-                if( lcl_ErgoVadis( this, nPos, PREP_QUOVADIS ) )
+                if( lcl_ErgoVadis( this, nPos, PrepareHint::QuoVadis ) )
                     InvalidateRange( SwCharRange( nPos, TextFrameIndex(1)) );
-                if( lcl_ErgoVadis( this, nPos, PREP_ERGOSUM ) )
+                if( lcl_ErgoVadis( this, nPos, PrepareHint::ErgoSum ) )
                     InvalidateRange( SwCharRange( nPos, TextFrameIndex(1)) );
             }
             // If we have a page number field, we must invalidate those spots
@@ -2909,7 +2909,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             break;
         }
 
-        case PREP_POS_CHGD :
+        case PrepareHint::FramePositionChanged :
         {
             if ( isFramePrintAreaValid() )
             {
@@ -2975,12 +2975,12 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             else
             {
                 if (GetTextNodeForParaProps()->GetSwAttrSet().GetRegister().GetValue())
-                    bParaPossiblyInvalid = Prepare( PREP_REGISTER, nullptr, bNotify );
+                    bParaPossiblyInvalid = Prepare( PrepareHint::Register, nullptr, bNotify );
                 // The Frames need to be readjusted, which caused by changes
                 // in position
                 else if( HasFootnote() )
                 {
-                    bParaPossiblyInvalid = Prepare( PREP_ADJUST_FRM, nullptr, bNotify );
+                    bParaPossiblyInvalid = Prepare( PrepareHint::AdjustSizeWithoutFormatting, nullptr, bNotify );
                     InvalidateSize_();
                 }
                 else
@@ -2995,7 +2995,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             }
             break;
         }
-        case PREP_REGISTER:
+        case PrepareHint::Register:
             if (GetTextNodeForParaProps()->GetSwAttrSet().GetRegister().GetValue())
             {
                 pPara->SetPrepAdjust();
@@ -3017,30 +3017,30 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
                 SetCompletePaint();
             }
             break;
-        case PREP_FTN_GONE :
+        case PrepareHint::FootnoteInvalidationGone :
             {
                 // If a Follow is calling us, because a footnote is being deleted, our last
                 // line has to be formatted, so that the first line of the Follow can flow up.
                 // Which had flowed to the next page to be together with the footnote (this is
                 // especially true for areas with columns)
-                OSL_ENSURE( GetFollow(), "PREP_FTN_GONE may only be called by Follow" );
+                OSL_ENSURE( GetFollow(), "PrepareHint::FootnoteInvalidationGone may only be called by Follow" );
                 TextFrameIndex nPos = GetFollow()->GetOfst();
                 if( IsFollow() && GetOfst() == nPos )       // If we don't have a mass of text, we call our
-                    FindMaster()->Prepare( PREP_FTN_GONE ); // Master's Prepare
+                    FindMaster()->Prepare( PrepareHint::FootnoteInvalidationGone ); // Master's Prepare
                 if( nPos )
                     --nPos; // The char preceding our Follow
                 InvalidateRange(SwCharRange(nPos, TextFrameIndex(1)));
                 return bParaPossiblyInvalid;
             }
-        case PREP_ERGOSUM:
-        case PREP_QUOVADIS:
+        case PrepareHint::ErgoSum:
+        case PrepareHint::QuoVadis:
             {
                 TextFrameIndex nPos;
                 if( lcl_ErgoVadis( this, nPos, ePrep ) )
                     InvalidateRange(SwCharRange(nPos, TextFrameIndex(1)));
             }
             break;
-        case PREP_FLY_ATTR_CHG:
+        case PrepareHint::FlyFrameAttributesChanged:
         {
             if( pVoid )
             {
@@ -3051,12 +3051,12 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
             }
             [[fallthrough]]; // else: continue with default case block
         }
-        case PREP_CLEAR:
+        case PrepareHint::Clear:
         default:
         {
             if( IsLocked() )
             {
-                if( PREP_FLY_ARRIVE == ePrep || PREP_FLY_LEAVE == ePrep )
+                if( PrepareHint::FlyFrameArrive == ePrep || PrepareHint::FlyFrameLeave == ePrep )
                 {
                     TextFrameIndex const nLen = (GetFollow()
                                 ? GetFollow()->GetOfst()
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 74d085c319f0..f45b3d59f64e 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -366,7 +366,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine )
         return false;
 
     // If the first line of the Follow does not fit, the master
-    // probably is full of Dummies. In this case a PREP_WIDOWS would be fatal.
+    // probably is full of Dummies. In this case a PrepareHint::Widows would be fatal.
     if( pMaster->GetOfst() == pFrame->GetOfst() )
         return false;
 
@@ -407,7 +407,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine )
                 if ( nTmpRstHeight >=
                      SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) )
                 {
-                    pMaster->Prepare( PREP_ADJUST_FRM );
+                    pMaster->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
                     pMaster->InvalidateSize_();
                     pMaster->InvalidatePage();
                 }
@@ -420,8 +420,8 @@ bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine )
 
     // Follow to Master II
     // If the Follow *shrinks*, maybe the Master can absorb the whole Orphan.
-    // (0W, 2O, 2M, 1F) - 1F = 3M, 0F     -> PREP_ADJUST_FRM
-    // (0W, 2O, 3M, 2F) - 1F = 2M, 2F     -> PREP_WIDOWS
+    // (0W, 2O, 2M, 1F) - 1F = 3M, 0F     -> PrepareHint::AdjustSizeWithoutFormatting
+    // (0W, 2O, 3M, 2F) - 1F = 2M, 2F     -> PrepareHint::Widows
 
     if( 0 > nChg && !pMaster->IsLocked() && pMaster->GetUpper() )
     {
@@ -429,7 +429,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine )
             aRectFnSet.GetPrtBottom(*pMaster->GetUpper()) );
         if( nTmpRstHeight >= SwTwips(rLine.GetInfo().GetParaPortion()->Height() ) )
         {
-            pMaster->Prepare( PREP_ADJUST_FRM );
+            pMaster->Prepare( PrepareHint::AdjustSizeWithoutFormatting );
             pMaster->InvalidateSize_();
             pMaster->InvalidatePage();
             pFrame->SetJustWidow( false );
@@ -469,7 +469,7 @@ bool WidowsAndOrphans::FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine )
             return false;
     }
 
-    pMaster->Prepare( PREP_WIDOWS, static_cast<void*>(&nNeed) );
+    pMaster->Prepare( PrepareHint::Widows, static_cast<void*>(&nNeed) );
     return true;
 }
 
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d71378ebeff4..3a682cdcb857 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -684,7 +684,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
                     // turns out it's empty - in this case, it was not
                     // invalidated because Cut didn't sent it any hints,
                     // so we have to invalidate it here!
-                    pFrame->Prepare(PREP_CLEAR, nullptr, false);
+                    pFrame->Prepare(PrepareHint::Clear, nullptr, false);
                 }
                 if (!pFrame->GetMergedPara() ||
                     !pFrame->GetMergedPara()->listener.IsListeningTo(this))


More information about the Libreoffice-commits mailing list