summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-12 15:41:34 +0200
committerNoel Grandin <noel@peralex.com>2016-05-13 08:34:18 +0200
commita01a492d1089799ee721dc34e421a36c10270215 (patch)
tree9c5583ef637ff6bc8280703696b623a15ed06c11 /sw
parent383e00bde033981eacdfc45ee6d1a9e0c4b030ef (diff)
convert PROT to scoped enum
Change-Id: I7aaa5c45a224d2f97861864bed00eaddb9b7f317
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/dbg_lay.hxx63
-rw-r--r--sw/source/core/layout/calcmove.cxx6
-rw-r--r--sw/source/core/layout/dbg_lay.cxx116
-rw-r--r--sw/source/core/layout/flowfrm.cxx4
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/layout/sectfrm.cxx20
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx6
-rw-r--r--sw/source/core/text/txtfrm.cxx2
10 files changed, 116 insertions, 107 deletions
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index 04bf1e6f3ee9..a431bd49a99f 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -20,26 +20,33 @@
#ifndef INCLUDED_SW_SOURCE_CORE_INC_DBG_LAY_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_DBG_LAY_HXX
-#define PROT_FILE_INIT 0x00000000
-#define PROT_INIT 0x00000001
-#define PROT_MAKEALL 0x00000002
-#define PROT_MOVE_FWD 0x00000004
-#define PROT_MOVE_BWD 0x00000008
-#define PROT_GROW 0x00000010
-#define PROT_SHRINK 0x00000020
-#define PROT_GROW_TST 0x00000040
-#define PROT_SHRINK_TST 0x00000080
-#define PROT_SIZE 0x00000100
-#define PROT_PRTAREA 0x00000200
-#define PROT_POS 0x00000400
-#define PROT_ADJUSTN 0x00000800
-#define PROT_SECTION 0x00001000
-#define PROT_CUT 0x00002000
-#define PROT_PASTE 0x00004000
-#define PROT_LEAF 0x00008000
-#define PROT_TESTFORMAT 0x00010000
-#define PROT_FRMCHANGES 0x00020000
-#define PROT_SNAPSHOT 0x00040000
+#include <o3tl/typed_flags_set.hxx>
+
+enum class PROT {
+ FileInit = 0x00000000,
+ Init = 0x00000001,
+ MakeAll = 0x00000002,
+ MoveFwd = 0x00000004,
+ MoveBack = 0x00000008,
+ Grow = 0x00000010,
+ Shrink = 0x00000020,
+ GrowTest = 0x00000040,
+ ShrinkTest = 0x00000080,
+ Size = 0x00000100,
+ PrintArea = 0x00000200,
+ Pos = 0x00000400,
+ AdjustN = 0x00000800,
+ Section = 0x00001000,
+ Cut = 0x00002000,
+ Paste = 0x00004000,
+ Leaf = 0x00008000,
+ TestFormat = 0x00010000,
+ FrmChanges = 0x00020000,
+ Snapshot = 0x00040000
+};
+namespace o3tl {
+ template<> struct typed_flags<PROT> : is_typed_flags<PROT, 0x0007ffff> {};
+}
#define ACT_START 1
#define ACT_END 2
@@ -63,15 +70,15 @@ class SwImplEnterLeave;
class SwProtocol
{
- static sal_uLong nRecord;
+ static PROT nRecord;
static SwImplProtocol* pImpl;
- static bool Start() { return 0 != ( PROT_INIT & nRecord ); }
+ static bool Start() { return bool( PROT::Init & nRecord ); }
public:
- static sal_uLong Record() { return nRecord; }
- static void SetRecord( sal_uLong nNew ) { nRecord = nNew; }
- static bool Record( sal_uLong nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); }
- static void Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAction, void* pParam );
+ static PROT Record() { return nRecord; }
+ static void SetRecord( PROT nNew ) { nRecord = nNew; }
+ static bool Record( PROT nFunc ) { return bool(( nFunc | PROT::Init ) & nRecord); }
+ static void Record( const SwFrame* pFrame, PROT nFunction, sal_uLong nAction, void* pParam );
static void Init();
static void Stop();
};
@@ -79,11 +86,11 @@ public:
class SwEnterLeave
{
SwImplEnterLeave* pImpl;
- void Ctor( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar );
+ void Ctor( const SwFrame* pFrame, PROT nFunc, sal_uLong nAct, void* pPar );
void Dtor();
public:
- SwEnterLeave( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar )
+ SwEnterLeave( const SwFrame* pFrame, PROT nFunc, sal_uLong nAct, void* pPar )
{
if( SwProtocol::Record( nFunc ) )
Ctor( pFrame, nFunc, nAct, pPar );
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index c54c7efb7bb8..969290f47af1 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -707,7 +707,7 @@ size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::MakeAll, 0, nullptr )
const SwRect aOldRect( Frame() ); // Adjust root size
const SwLayNotify aNotify( this ); // takes care of the notification in the dtor
@@ -835,7 +835,7 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::MakeAll, 0, nullptr )
// takes care of the notification in the dtor
const SwLayNotify aNotify( this );
@@ -1107,7 +1107,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
long nFormatCount = 0;
// - loop prevention
int nConsecutiveFormatsWithoutChange = 0;
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::MakeAll, 0, nullptr )
#ifdef DBG_UTIL
const SwDoc *pDoc = GetAttrSet()->GetDoc();
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 00eaf234d19f..18e0c67c0594 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -28,14 +28,14 @@
*
* The PROTOCOL macros accept the following parameters:
* 1. A pointer to an SwFrame (usually "this" or "rThis")
- * 2. The function group i.e. PROT_MAKEALL. This is used to decide (inline)
+ * 2. The function group i.e. PROT::MakeAll. This is used to decide (inline)
* whether this event shall be logged at the current time.
* 3. The action, usually 0. For example ACT_START indents output in the log
* file and ACT_END stops the indentation. This allows for example
* PROTOCOL_ENTER to indent at the beginning of a method and stop indenting
* when leaving the method.
* 4. The fourth parameter is a void pointer which allows to pass anything
- * which can be used in the log. A good example is PROT_GROW: this requires
+ * which can be used in the log. A good example is PROT::Grow: this requires
* a pointer to the value which defines how much to grow.
*
* The log file is called "dbg_lay.out", which is saved in the current (BIN-)
@@ -45,8 +45,8 @@
* What exactly is going to be logged, can be defined as follows:
* 1. The static variable SwProtocol::nRecord contains the function groups
* which shall be logged.
- * A value of i.e. PROT_GROW causes calls to SwFrame::Grow to be
- * logged; PROT_MAKEALL logs the calls to xxx::MakeAll.
+ * A value of i.e. PROT::Grow causes calls to SwFrame::Grow to be
+ * logged; PROT::MakeAll logs the calls to xxx::MakeAll.
* The PROT_XY values can be combined using binary OR, the default value
* is null - no method calls are logged.
* 2. The SwImplProtocol class contains a filter for frame types, only method
@@ -64,7 +64,7 @@
* 1. Set a breakpoint in SwProtocol::Init() and manipulate nRecord there, set
* FrameIds accordingly then start logging during program start.
* 2. Set a breakpoint before any PROTOCOL or PROTOCOL_ENTER macro during
- * program execution, then set the lowest bit (PROT_INIT) of
+ * program execution, then set the lowest bit (PROT::Init) of
* SwProtocol::nRecord. This activates the function group of the following
* macro and causes it to be logged in the future.
* 3. There's a special case for 2: If one uses 2. in SwRootFrame::Paint(..),
@@ -103,7 +103,7 @@
#include <comphelper/string.hxx>
-sal_uLong SwProtocol::nRecord = 0;
+PROT SwProtocol::nRecord = PROT::FileInit;
SwImplProtocol* SwProtocol::pImpl = nullptr;
static sal_uLong lcl_GetFrameId( const SwFrame* pFrame )
@@ -129,7 +129,7 @@ class SwImplProtocol
sal_uInt16 nMaxLines; // max lines to be printed
sal_uInt8 nInitFile; // range (FrameId,FrameType,Record) during reading of the INI file
sal_uInt8 nTestMode; // special for test formatting, logging may only be done in test formatting.
- void Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam );
+ void Record_( const SwFrame* pFrame, PROT nFunction, sal_uLong nAct, void* pParam );
bool NewStream();
void CheckLine( OString& rLine );
static void SectFunc( OStringBuffer& rOut, const SwFrame* pFrame, sal_uLong nAct, void* pParam );
@@ -137,7 +137,7 @@ public:
SwImplProtocol();
~SwImplProtocol();
// logging
- void Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+ void Record( const SwFrame* pFrame, PROT nFunction, sal_uLong nAct, void* pParam )
{ if( pStream ) Record_( pFrame, nFunction, nAct, pParam ); }
bool InsertFrame( sal_uInt16 nFrameId ); // take FrameId for logging
bool DeleteFrame( sal_uInt16 nFrameId ); // remove FrameId; don't log him anymore
@@ -159,11 +159,12 @@ public:
class SwImplEnterLeave
{
protected:
- const SwFrame* pFrame; // the frame
- sal_uLong nFunction, nAction; // the function, the action if needed
- void* pParam; // further parameter
+ const SwFrame* pFrame; // the frame
+ PROT nFunction; // the function
+ sal_uLong nAction; // the action if needed
+ void* pParam; // further parameter
public:
- SwImplEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ SwImplEnterLeave( const SwFrame* pF, PROT nFunct, sal_uLong nAct, void* pPar )
: pFrame( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual ~SwImplEnterLeave() {}
virtual void Enter(); // message when entering
@@ -174,7 +175,7 @@ class SwSizeEnterLeave : public SwImplEnterLeave
{
long nFrameHeight;
public:
- SwSizeEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ SwSizeEnterLeave( const SwFrame* pF, PROT nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->Frame().Height() ) {}
virtual ~SwSizeEnterLeave() {}
virtual void Leave() override; // resize message
@@ -184,7 +185,7 @@ class SwUpperEnterLeave : public SwImplEnterLeave
{
sal_uInt16 nFrameId;
public:
- SwUpperEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ SwUpperEnterLeave( const SwFrame* pF, PROT nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameId( 0 ) {}
virtual ~SwUpperEnterLeave() {}
virtual void Enter() override; // message
@@ -195,26 +196,26 @@ class SwFrameChangesLeave : public SwImplEnterLeave
{
SwRect aFrame;
public:
- SwFrameChangesLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ SwFrameChangesLeave( const SwFrame* pF, PROT nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->Frame() ) {}
virtual ~SwFrameChangesLeave() {}
virtual void Enter() override; // no message
virtual void Leave() override; // message when resizing the Frame area
};
-void SwProtocol::Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+void SwProtocol::Record( const SwFrame* pFrame, PROT nFunction, sal_uLong nAct, void* pParam )
{
if( Start() )
- { // We reach this point if SwProtocol::nRecord is binary OR'd with PROT_INIT(0x1) using the debugger
+ { // We reach this point if SwProtocol::nRecord is binary OR'd with PROT::Init(0x1) using the debugger
bool bFinit = false; // This gives the possibility to stop logging of this action in the debugger
if( bFinit )
{
nRecord &= ~nFunction; // Don't log this function any longer
- nRecord &= ~PROT_INIT; // Always reset PROT_INIT
+ nRecord &= ~PROT::Init; // Always reset PROT::Init
return;
}
nRecord |= nFunction; // Activate logging of this function
- nRecord &= ~PROT_INIT; // Always reset PROT_INIT
+ nRecord &= ~PROT::Init; // Always reset PROT::Init
if( pImpl )
pImpl->ChkStream();
}
@@ -229,7 +230,7 @@ void SwProtocol::Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong n
void SwProtocol::Init()
{
- nRecord = 0;
+ nRecord = PROT::FileInit;
OUString aName("dbg_lay.go");
SvFileStream aStream( aName, StreamMode::READ );
if( aStream.IsOpen() )
@@ -251,7 +252,7 @@ void SwProtocol::Stop()
if( pFntCache )
pFntCache->Flush();
}
- nRecord = 0;
+ nRecord = PROT::FileInit;
}
SwImplProtocol::SwImplProtocol()
@@ -311,7 +312,7 @@ void SwImplProtocol::CheckLine( OString& rLine )
else if (aTmp == "[record")// section functions
{
nInitFile = 3;
- SwProtocol::SetRecord( 0 );// default: don't log any function
+ SwProtocol::SetRecord( PROT::FileInit );// default: don't log any function
}
else if (aTmp == "[test")// section functions
{
@@ -360,11 +361,11 @@ void SwImplProtocol::CheckLine( OString& rLine )
}
break;
case 3: {
- sal_uLong nOld = SwProtocol::Record();
+ PROT nOld = SwProtocol::Record();
if( bNo )
- nOld &= ~sal_uLong(nVal); // remove function
+ nOld &= ~PROT(nVal); // remove function
else
- nOld |= sal_uLong(nVal); // remove function
+ nOld |= PROT(nVal); // remove function
SwProtocol::SetRecord( nOld );
}
break;
@@ -498,7 +499,7 @@ static void lcl_FrameType( OStringBuffer& rOut, const SwFrame* pFrame )
*
* In this method we also check if FrameId and frame type should be logged.
*/
-void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, sal_uLong nAct, void* pParam )
{
sal_uInt16 nSpecial = 0;
if( nSpecial ) // the possible debugger manipulations
@@ -522,7 +523,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
if( !(pFrame->GetType() & nTypes) )
return; // the type is unwanted
- if( 1 == nTestMode && nFunction != PROT_TESTFORMAT )
+ if( 1 == nTestMode && nFunction != PROT::TestFormat )
return; // we may only log inside a test formatting
bool bTmp = false;
OStringBuffer aOut(aLayer);
@@ -531,17 +532,17 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
lcl_FrameType( aOut, pFrame ); // then the frame type
switch ( nFunction ) // and the function
{
- case PROT_SNAPSHOT: lcl_Flags( aOut, pFrame );
+ case PROT::Snapshot: lcl_Flags( aOut, pFrame );
break;
- case PROT_MAKEALL: aOut.append("MakeAll");
+ case PROT::MakeAll: aOut.append("MakeAll");
lcl_Start( aOut, aLayer, nAct );
if( nAct == ACT_START )
lcl_Flags( aOut, pFrame );
break;
- case PROT_MOVE_FWD: bTmp = true;
+ case PROT::MoveFwd: bTmp = true;
SAL_FALLTHROUGH;
- case PROT_MOVE_BWD:
- if (nFunction == (bTmp ? 1U : 0U))
+ case PROT::MoveBack:
+ if (nFunction == (bTmp ? PROT::Init : PROT::FileInit))
aOut.append("Fwd");
else
aOut.append("Bwd");
@@ -552,23 +553,23 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
aOut.append(static_cast<sal_Int32>(*static_cast<sal_uInt16*>(pParam)));
}
break;
- case PROT_GROW_TST: if( ACT_START != nAct )
+ case PROT::GrowTest: if( ACT_START != nAct )
return;
aOut.append("TestGrow");
break;
- case PROT_SHRINK_TST: if( ACT_START != nAct )
+ case PROT::ShrinkTest: if( ACT_START != nAct )
return;
aOut.append("TestShrink");
break;
- case PROT_ADJUSTN :
- case PROT_SHRINK: bTmp = true;
+ case PROT::AdjustN :
+ case PROT::Shrink: bTmp = true;
SAL_FALLTHROUGH;
- case PROT_GROW:
+ case PROT::Grow:
if (!bTmp)
aOut.append("Grow");
else
{
- if (nFunction == PROT_SHRINK)
+ if (nFunction == PROT::Shrink)
aOut.append("Shrink");
else
aOut.append("AdjustNgbhd");
@@ -580,16 +581,16 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
aOut.append(static_cast<sal_Int64>(*static_cast<long*>(pParam)));
}
break;
- case PROT_POS: break;
- case PROT_PRTAREA: aOut.append("PrtArea");
+ case PROT::Pos: break;
+ case PROT::PrintArea: aOut.append("PrtArea");
lcl_Start( aOut, aLayer, nAct );
break;
- case PROT_SIZE: aOut.append("Size");
+ case PROT::Size: aOut.append("Size");
lcl_Start( aOut, aLayer, nAct );
aOut.append(' ');
aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height()));
break;
- case PROT_LEAF: aOut.append("Prev/NextLeaf");
+ case PROT::Leaf: aOut.append("Prev/NextLeaf");
lcl_Start( aOut, aLayer, nAct );
aOut.append(' ');
if( pParam )
@@ -598,21 +599,21 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
}
break;
- case PROT_FILE_INIT: FileInit();
+ case PROT::FileInit: FileInit();
aOut.append("Initialize");
break;
- case PROT_SECTION: SectFunc(aOut, pFrame, nAct, pParam);
+ case PROT::Section: SectFunc(aOut, pFrame, nAct, pParam);
break;
- case PROT_CUT: bTmp = true;
+ case PROT::Cut: bTmp = true;
SAL_FALLTHROUGH;
- case PROT_PASTE:
+ case PROT::Paste:
if (bTmp)
aOut.append("Cut from ");
else
aOut.append("Paste to ");
aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
break;
- case PROT_TESTFORMAT:
+ case PROT::TestFormat:
aOut.append("Test");
lcl_Start( aOut, aLayer, nAct );
if( ACT_START == nAct )
@@ -620,7 +621,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
else
nTestMode &= ~2;
break;
- case PROT_FRMCHANGES:
+ case PROT::FrmChanges:
{
SwRect& rFrame = *static_cast<SwRect*>(pParam);
if( pFrame->Frame().Pos() != rFrame.Pos() )
@@ -653,12 +654,13 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, sal_uLong nFunction, sal_uL
}
break;
}
+ default: break;
}
pStream->WriteCharPtr( aOut.getStr() );
(*pStream) << endl; // output
pStream->Flush(); // to the disk, so we can read it immediately
if( ++nLineCount >= nMaxLines ) // max number of lines reached?
- SwProtocol::SetRecord( 0 ); // => end f logging
+ SwProtocol::SetRecord( PROT::FileInit ); // => end f logging
}
/// Handle the output of the SectionFrames.
@@ -723,16 +725,16 @@ bool SwImplProtocol::DeleteFrame( sal_uInt16 nId )
* The task here is to find the right SwImplEnterLeave object based on the
* function; everything else is then done in his Ctor/Dtor.
*/
-void SwEnterLeave::Ctor( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar )
+void SwEnterLeave::Ctor( const SwFrame* pFrame, PROT nFunc, sal_uLong nAct, void* pPar )
{
switch( nFunc )
{
- case PROT_ADJUSTN :
- case PROT_GROW:
- case PROT_SHRINK : pImpl = new SwSizeEnterLeave( pFrame, nFunc, nAct, pPar ); break;
- case PROT_MOVE_FWD:
- case PROT_MOVE_BWD : pImpl = new SwUpperEnterLeave( pFrame, nFunc, nAct, pPar ); break;
- case PROT_FRMCHANGES : pImpl = new SwFrameChangesLeave( pFrame, nFunc, nAct, pPar ); break;
+ case PROT::AdjustN :
+ case PROT::Grow:
+ case PROT::Shrink : pImpl = new SwSizeEnterLeave( pFrame, nFunc, nAct, pPar ); break;
+ case PROT::MoveFwd:
+ case PROT::MoveBack : pImpl = new SwUpperEnterLeave( pFrame, nFunc, nAct, pPar ); break;
+ case PROT::FrmChanges : pImpl = new SwFrameChangesLeave( pFrame, nFunc, nAct, pPar ); break;
default: pImpl = new SwImplEnterLeave( pFrame, nFunc, nAct, pPar ); break;
}
pImpl->Enter();
@@ -786,7 +788,7 @@ void SwFrameChangesLeave::Enter()
void SwFrameChangesLeave::Leave()
{
if( pFrame->Frame() != aFrame )
- SwProtocol::Record( pFrame, PROT_FRMCHANGES, 0, &aFrame );
+ SwProtocol::Record( pFrame, PROT::FrmChanges, 0, &aFrame );
}
#endif // DBG_UTIL
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 39a9113a61bd..f2db8868f5ca 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1841,7 +1841,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
if ( pNewUpper )
{
- PROTOCOL_ENTER( &m_rThis, PROT_MOVE_FWD, 0, nullptr );
+ PROTOCOL_ENTER( &m_rThis, PROT::MoveFwd, 0, nullptr );
SwPageFrame *pOldPage = pOldBoss->FindPageFrame();
// We move ourself and all the direct successors before the
// first ContentFrame below the new Upper.
@@ -2399,7 +2399,7 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
"<SwFlowFrame::MoveBwd(..)> - moving backward to the current upper frame!?" );
if ( pNewUpper )
{
- PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, nullptr );
+ PROTOCOL_ENTER( &m_rThis, PROT::MoveBack, 0, nullptr );
if ( pNewUpper->IsFootnoteContFrame() )
{
// I may have gotten a Container
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index de3b7d8f1826..0a119a6ed0b6 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -540,7 +540,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
( pPage->IsInvalid() ||
(IS_FLYS && IS_INVAFLY) ) )
{
- PROTOCOL( pPage, PROT_FILE_INIT, 0, nullptr)
+ PROTOCOL( pPage, PROT::FileInit, 0, nullptr)
XCHECKPAGE;
// #i81146# new loop control
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 66966758119d..6979e22263a4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3186,7 +3186,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
{
OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "Lower of root is no page." );
- PROTOCOL( this, PROT_FILE_INIT, 0, nullptr)
+ PROTOCOL( this, PROT::FileInit, 0, nullptr)
bool bResetRootPaint = false;
SwViewShell *pSh = mpCurrShell;
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 833536864eb0..e7a1c7b64aad 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -68,7 +68,7 @@ SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool bMaster ) :
{
mnFrameType = SwFrameType::Section;
- PROTOCOL( this, PROT_SECTION, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect )
+ PROTOCOL( this, PROT::Section, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect )
if( bMaster )
{
@@ -129,7 +129,7 @@ void SwSectionFrame::DestroyImpl()
SwSectionFrame *pMaster = FindMaster();
if( pMaster )
{
- PROTOCOL( this, PROT_SECTION, ACT_DEL_FOLLOW, pMaster )
+ PROTOCOL( this, PROT::Section, ACT_DEL_FOLLOW, pMaster )
pMaster->SetFollow( GetFollow() );
// A Master always grabs the space until the lower edge of his
// Upper. If he doesn't have a Follow anymore, he can
@@ -141,7 +141,7 @@ void SwSectionFrame::DestroyImpl()
}
else if( HasFollow() )
{
- PROTOCOL( this, PROT_SECTION, ACT_DEL_MASTER, GetFollow() )
+ PROTOCOL( this, PROT::Section, ACT_DEL_MASTER, GetFollow() )
}
}
@@ -218,7 +218,7 @@ void SwSectionFrame::Cut_( bool bRemove )
{
OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
- PROTOCOL( this, PROT_CUT, 0, GetUpper() )
+ PROTOCOL( this, PROT::Cut, 0, GetUpper() )
SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
@@ -299,7 +299,7 @@ void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
OSL_ENSURE( !GetPrev() && !GetUpper(),
"I am still registered somewhere." );
- PROTOCOL( this, PROT_PASTE, 0, GetUpper() )
+ PROTOCOL( this, PROT::Paste, 0, GetUpper() )
// Add to the tree
SwSectionFrame* pSect = pParent->FindSctFrame();
@@ -429,7 +429,7 @@ void SwSectionFrame::MergeNext( SwSectionFrame* pNxt )
if (!pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection())
{
- PROTOCOL( this, PROT_SECTION, ACT_MERGE, pNxt )
+ PROTOCOL( this, PROT::Section, ACT_MERGE, pNxt )
SwFrame* pTmp = ::SaveContent( pNxt );
if( pTmp )
@@ -1223,7 +1223,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
SWRECTFN( this )
if ( !mbValidPrtArea )
{
- PROTOCOL( this, PROT_PRTAREA, 0, nullptr )
+ PROTOCOL( this, PROT::PrintArea, 0, nullptr )
mbValidPrtArea = true;
SwTwips nUpper = CalcUpperSpace();
@@ -1243,7 +1243,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
if ( !mbValidSize )
{
- PROTOCOL_ENTER( this, PROT_SIZE, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::Size, 0, nullptr )
const long nOldHeight = (Frame().*fnRect->fnGetHeight)();
bool bOldLock = IsColLocked();
ColLock();
@@ -1431,7 +1431,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
{
// Attention: Nested sections are currently not supported
- PROTOCOL_ENTER( this, PROT_LEAF, ACT_NEXT_SECT, GetUpper()->FindSctFrame() )
+ PROTOCOL_ENTER( this, PROT::Leaf, ACT_NEXT_SECT, GetUpper()->FindSctFrame() )
// Shortcuts for "columned" sections, if we're not in the last column
// Can we slide to the next column of the section?
@@ -1649,7 +1649,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
/// Returns the preceding layout sheet where the frame can be moved into
SwLayoutFrame *SwFrame::GetPrevSctLeaf( MakePageType )
{
- PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrame() )
+ PROTOCOL_ENTER( this, PROT::Leaf, ACT_PREV_SECT, GetUpper()->FindSctFrame() )
SwLayoutFrame* pCol;
// ColumnFrame always contain a BodyFrame now
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index e87418fc6a6e..21b5bc881050 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1745,7 +1745,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
return;
}
- PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::MakeAll, 0, nullptr )
LockJoin(); //I don't want to be destroyed on the way.
SwLayNotify aNotify( this ); //does the notification in the DTor
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 52042e9d0f93..1c9dbd3f94d2 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1156,7 +1156,7 @@ SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negative growth?" );
- PROTOCOL_ENTER( this, bTst ? PROT_GROW_TST : PROT_GROW, 0, &nDist )
+ PROTOCOL_ENTER( this, bTst ? PROT::GrowTest : PROT::Grow, 0, &nDist )
if ( nDist )
{
@@ -1200,7 +1200,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negative reduction?" );
- PROTOCOL_ENTER( this, bTst ? PROT_SHRINK_TST : PROT_SHRINK, 0, &nDist )
+ PROTOCOL_ENTER( this, bTst ? PROT::ShrinkTest : PROT::Shrink, 0, &nDist )
if ( nDist )
{
@@ -1259,7 +1259,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
*/
SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
{
- PROTOCOL_ENTER( this, PROT_ADJUSTN, 0, &nDiff );
+ PROTOCOL_ENTER( this, PROT::AdjustN, 0, &nDiff );
if ( !nDiff || !GetUpper()->IsFootnoteBossFrame() ) // only inside pages/columns
return 0L;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index acb8831c4ac9..a1cb4549e264 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1909,7 +1909,7 @@ SwTestFormat::~SwTestFormat()
bool SwTextFrame::TestFormat( const SwFrame* pPrv, SwTwips &rMaxHeight, bool &bSplit )
{
- PROTOCOL_ENTER( this, PROT_TESTFORMAT, 0, nullptr )
+ PROTOCOL_ENTER( this, PROT::TestFormat, 0, nullptr )
if( IsLocked() && GetUpper()->Prt().Width() <= 0 )
return false;