summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-18 23:02:54 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-18 23:09:12 +0100
commitfc93c17a2e2186ff5e52cc2a3d8f65aadb26c44e (patch)
tree0f90b3fa93942a83c95261ace91ea330e9297ed8
parent8599b29b5c8cb5add80ca22f44e8e129b904fc2d (diff)
sw: prefix SwTabFrm members
Change-Id: If2de38d23c5753e703517b5ef82d0f00070c2f34
-rw-r--r--sw/source/core/inc/tabfrm.hxx80
-rw-r--r--sw/source/core/layout/fly.cxx6
-rw-r--r--sw/source/core/layout/tabfrm.cxx118
3 files changed, 108 insertions, 96 deletions
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 543317419453..54a5944e6780 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -36,43 +36,43 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
using SwFrm::GetLeaf;
SwLayoutFrm *GetLeaf( MakePageType eMakePage, bool bFwd );
- SwTable* pTable;
+ SwTable * m_pTable;
- bool bComplete :1; /// Set entries for Repaint without needing to
+ bool m_bComplete :1; /// Set entries for Repaint without needing to
/// set the base class' CompletePaint
/// With that we would want to avoid unnecessary
/// table repaints
- bool bCalcLowers :1; /// For stability of the content in MakeAll
- bool bLowersFormatted :1; /// Communication between MakeAll and Layact
- bool bLockBackMove :1; /// The Master took care of the BackMove test
- bool bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll
+ bool m_bCalcLowers :1; /// For stability of the content in MakeAll
+ bool m_bLowersFormatted :1; /// Communication between MakeAll and Layact
+ bool m_bLockBackMove :1; /// The Master took care of the BackMove test
+ bool m_bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll
/// This is an optimization, so that we don't have to call
/// it in CntntFrm::Grow; there it might be called for
/// _every_ Cell
- bool bONECalcLowers :1; /// Primarily for the StarONE SS
+ bool m_bONECalcLowers :1; /// Primarily for the StarONE SS
/// The Cntnts are formatted via Calc() on MakeAll in any
/// case. There are no further invalidations and that path can
/// hardly give any guarantees
- bool bHasFollowFlowLine :1; /// Means that the first line in the follow
+ bool m_bHasFollowFlowLine :1; /// Means that the first line in the follow
/// is indented to contain content from a broken
/// cell
- bool bIsRebuildLastLine :1; /// Means that currently the last line of the
+ bool m_bIsRebuildLastLine :1; /// Means that currently the last line of the
/// TabFrame is rebuilt. In this case we do not
// want any notification to the master table
- bool bRestrictTableGrowth :1; // Usually, the table may grow infinitely,
+ bool m_bRestrictTableGrowth :1; // Usually, the table may grow infinitely,
// as the table can be split in SwTabFrm::MakeAll
// In MakeAll, this flag is set to indicate that
// the table may only grow inside its upper. This
// is necessary, in order to let the text flow into
// the FollowFlowLine
- bool bRemoveFollowFlowLinePending :1;
+ bool m_bRemoveFollowFlowLinePending :1;
// #i26945#
- bool bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
+ bool m_bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
// are considered during the calculation
// for the minimal cell height.
// For the splitting table rows algorithm
@@ -81,10 +81,10 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
// of the re-calculation of the
// last table row.
// #i26945#
- bool bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
+ bool m_bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
// indicates, if the floating screen objects fits
- bool mbInRecalcLowerRow : 1;
+ bool m_bInRecalcLowerRow : 1;
/**
* Split() splits the Frm at the specified position: a Follow is
@@ -137,63 +137,63 @@ public:
SwCntntFrm *FindLastCntnt();
inline const SwCntntFrm *FindLastCntnt() const;
- const SwTable *GetTable() const { return pTable; }
- SwTable *GetTable() { return pTable; }
+ const SwTable *GetTable() const { return m_pTable; }
+ SwTable *GetTable() { return m_pTable; }
- bool IsComplete() { return bComplete; }
- void SetComplete() { bComplete = true; }
- void ResetComplete() { bComplete = false; }
+ bool IsComplete() { return m_bComplete; }
+ void SetComplete() { m_bComplete = true; }
+ void ResetComplete() { m_bComplete = false; }
- bool IsLowersFormatted() const { return bLowersFormatted; }
- void SetLowersFormatted( bool b ) { bLowersFormatted = b; }
+ bool IsLowersFormatted() const { return m_bLowersFormatted; }
+ void SetLowersFormatted(bool b) { m_bLowersFormatted = b; }
- void SetCalcLowers() { bCalcLowers = true; } // use rarely
- void SetResizeHTMLTable() { bResizeHTMLTable = true; } // same
- void SetONECalcLowers() { bONECalcLowers = true; }
+ void SetCalcLowers() { m_bCalcLowers = true; } // use rarely
+ void SetResizeHTMLTable() { m_bResizeHTMLTable = true; } // same
+ void SetONECalcLowers() { m_bONECalcLowers = true; }
// Start: New stuff for breaking table rows
- bool HasFollowFlowLine() const { return bHasFollowFlowLine; }
- void SetFollowFlowLine( bool bNew ) { bHasFollowFlowLine = bNew; }
+ bool HasFollowFlowLine() const { return m_bHasFollowFlowLine; }
+ void SetFollowFlowLine(bool bNew) { m_bHasFollowFlowLine = bNew; }
//return the SwTabFrm (if any) that this SwTabFrm is a follow flow line for
SwTabFrm* GetFollowFlowLineFor();
- bool IsRebuildLastLine() const { return bIsRebuildLastLine; }
- void SetRebuildLastLine( bool bNew ) { bIsRebuildLastLine = bNew; }
+ bool IsRebuildLastLine() const { return m_bIsRebuildLastLine; }
+ void SetRebuildLastLine(bool bNew) { m_bIsRebuildLastLine = bNew; }
- bool IsRestrictTableGrowth() const { return bRestrictTableGrowth; }
- void SetRestrictTableGrowth( bool bNew ) { bRestrictTableGrowth = bNew; }
+ bool IsRestrictTableGrowth() const { return m_bRestrictTableGrowth; }
+ void SetRestrictTableGrowth( bool bNew ) { m_bRestrictTableGrowth = bNew; }
- bool IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
- void SetRemoveFollowFlowLinePending( bool bNew ) { bRemoveFollowFlowLinePending = bNew; }
+ bool IsRemoveFollowFlowLinePending() const { return m_bRemoveFollowFlowLinePending; }
+ void SetRemoveFollowFlowLinePending(bool bNew) { m_bRemoveFollowFlowLinePending = bNew; }
bool IsInRecalcLowerRow() const
{
- return mbInRecalcLowerRow;
+ return m_bInRecalcLowerRow;
}
void SetInRecalcLowerRow( bool bNew )
{
- mbInRecalcLowerRow = bNew;
+ m_bInRecalcLowerRow = bNew;
}
// #i26945#
bool IsConsiderObjsForMinCellHeight() const
{
- return bConsiderObjsForMinCellHeight;
+ return m_bConsiderObjsForMinCellHeight;
}
- void SetConsiderObjsForMinCellHeight( bool _bNewConsiderObjsForMinCellHeight )
+ void SetConsiderObjsForMinCellHeight(bool const bConsiderObjsForMinCellHeight)
{
- bConsiderObjsForMinCellHeight = _bNewConsiderObjsForMinCellHeight;
+ m_bConsiderObjsForMinCellHeight = bConsiderObjsForMinCellHeight;
}
// #i26945#
bool DoesObjsFit() const
{
- return bObjsDoesFit;
+ return m_bObjsDoesFit;
}
- void SetDoesObjsFit( bool _bNewObjsDoesFit )
+ void SetDoesObjsFit(bool const bObjsDoesFit)
{
- bObjsDoesFit = _bNewObjsDoesFit;
+ m_bObjsDoesFit = bObjsDoesFit;
}
bool RemoveFollowFlowLine();
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 220061049631..05ed4c9d790b 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1439,14 +1439,14 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
- static_cast<SwTabFrm*>(pFrm)->bCalcLowers = true;
+ static_cast<SwTabFrm*>(pFrm)->m_bCalcLowers = true;
// OD 26.08.2003 #i18103# - lock move backward of follow table,
// if no section content is formatted or follow table belongs
// to the section, which content is formatted.
if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() &&
( !pSect || pSect == pFrm->FindSctFrm() ) )
{
- static_cast<SwTabFrm*>(pFrm)->bLockBackMove = true;
+ static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = true;
}
}
@@ -1613,7 +1613,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() )
- static_cast<SwTabFrm*>(pFrm)->bLockBackMove = false;
+ static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = false;
}
pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index dc33d93c2379..84a3de12fe9e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -58,18 +58,24 @@
using namespace ::com::sun::star;
-SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ):
- SwLayoutFrm( rTab.GetFrmFmt(), pSib ),
- SwFlowFrm( (SwFrm&)*this ),
- pTable( &rTab )
+SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib )
+ : SwLayoutFrm( rTab.GetFrmFmt(), pSib )
+ , SwFlowFrm( static_cast<SwFrm&>(*this) )
+ , m_pTable( &rTab )
+ , m_bComplete(false)
+ , m_bCalcLowers(false)
+ , m_bLowersFormatted(false)
+ , m_bLockBackMove(false)
+ , m_bResizeHTMLTable(false)
+ , m_bONECalcLowers(false)
+ , m_bHasFollowFlowLine(false)
+ , m_bIsRebuildLastLine(false)
+ , m_bRestrictTableGrowth(false)
+ , m_bRemoveFollowFlowLinePending(false)
+ , m_bConsiderObjsForMinCellHeight(true)
+ , m_bObjsDoesFit(true)
+ , m_bInRecalcLowerRow(false)
{
- bComplete = bCalcLowers = bONECalcLowers = bLowersFormatted = bLockBackMove =
- bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = false;
- // #i26945#
- bConsiderObjsForMinCellHeight = true;
- bObjsDoesFit = true;
- mbInRecalcLowerRow = false;
mbFixSize = false; //Don't fall for import filter again.
mnType = FRMC_TAB;
@@ -90,18 +96,24 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ):
OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "SwTabFrm::SwTabFrm: No rows." );
}
-SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
- SwLayoutFrm( rTab.GetFmt(), &rTab ),
- SwFlowFrm( (SwFrm&)*this ),
- pTable( rTab.GetTable() )
+SwTabFrm::SwTabFrm( SwTabFrm &rTab )
+ : SwLayoutFrm( rTab.GetFmt(), &rTab )
+ , SwFlowFrm( static_cast<SwFrm&>(*this) )
+ , m_pTable( rTab.GetTable() )
+ , m_bComplete(false)
+ , m_bCalcLowers(false)
+ , m_bLowersFormatted(false)
+ , m_bLockBackMove(false)
+ , m_bResizeHTMLTable(false)
+ , m_bONECalcLowers(false)
+ , m_bHasFollowFlowLine(false)
+ , m_bIsRebuildLastLine(false)
+ , m_bRestrictTableGrowth(false)
+ , m_bRemoveFollowFlowLinePending(false)
+ , m_bConsiderObjsForMinCellHeight(true)
+ , m_bObjsDoesFit(true)
+ , m_bInRecalcLowerRow(false)
{
- bComplete = bONECalcLowers = bCalcLowers = bLowersFormatted = bLockBackMove =
- bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = false;
- // #i26945#
- bConsiderObjsForMinCellHeight = true;
- bObjsDoesFit = true;
- mbInRecalcLowerRow = false;
mbFixSize = false; //Don't fall for import filter again.
mnType = FRMC_TAB;
@@ -1719,12 +1731,12 @@ void SwTabFrm::MakeAll()
SetRemoveFollowFlowLinePending( false );
}
- if ( bResizeHTMLTable ) //Optimized interplay with grow/shrink of the content
+ if (m_bResizeHTMLTable) //Optimized interplay with grow/shrink of the content
{
- bResizeHTMLTable = false;
+ m_bResizeHTMLTable = false;
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout )
- bCalcLowers = pLayout->Resize(
+ m_bCalcLowers = pLayout->Resize(
pLayout->GetBrowseWidthByTabFrm( *this ), false );
}
@@ -1828,7 +1840,7 @@ void SwTabFrm::MakeAll()
if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
{
bMovedFwd = true;
- bCalcLowers = true;
+ m_bCalcLowers = true;
// #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
@@ -1846,7 +1858,7 @@ void SwTabFrm::MakeAll()
if( pLayout )
{
delete pAccess;
- bCalcLowers |= pLayout->Resize(
+ m_bCalcLowers |= pLayout->Resize(
pLayout->GetBrowseWidthByTabFrm( *this ), false );
pAccess = new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
@@ -1859,7 +1871,7 @@ void SwTabFrm::MakeAll()
if ( bKeep || (0 != (pPre = FindPrev()) &&
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
- bCalcLowers = true;
+ m_bCalcLowers = true;
// #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
@@ -1890,7 +1902,7 @@ void SwTabFrm::MakeAll()
(Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
{
delete pAccess;
- bCalcLowers |= pLayout->Resize(
+ m_bCalcLowers |= pLayout->Resize(
pLayout->GetBrowseWidthByTabFrm( *this ), false );
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
@@ -1939,7 +1951,7 @@ void SwTabFrm::MakeAll()
if( pHTMLLayout )
{
delete pAccess;
- bCalcLowers |= pHTMLLayout->Resize(
+ m_bCalcLowers |= pHTMLLayout->Resize(
pHTMLLayout->GetBrowseWidthByTabFrm( *this ),
false );
@@ -1951,7 +1963,7 @@ void SwTabFrm::MakeAll()
Format( pAttrs );
}
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = true;
+ m_bLowersFormatted = true;
if ( bKeep && KEEPTAB )
{
@@ -2139,16 +2151,16 @@ void SwTabFrm::MakeAll()
if ( IsValid() )
{
- if ( bCalcLowers )
+ if (m_bCalcLowers)
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = true;
- bCalcLowers = false;
+ m_bLowersFormatted = true;
+ m_bCalcLowers = false;
}
- else if ( bONECalcLowers )
+ else if (m_bONECalcLowers)
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = false;
+ m_bONECalcLowers = false;
}
}
continue;
@@ -2162,16 +2174,16 @@ void SwTabFrm::MakeAll()
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable )
{
- if ( bCalcLowers && IsValid() )
+ if (m_bCalcLowers && IsValid())
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = true;
- bCalcLowers = false;
+ m_bLowersFormatted = true;
+ m_bCalcLowers = false;
}
- else if ( bONECalcLowers )
+ else if (m_bONECalcLowers)
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = false;
+ m_bONECalcLowers = false;
}
// It does not make sense to cut off the last line if we are
@@ -2181,11 +2193,11 @@ void SwTabFrm::MakeAll()
continue;
}
- if ( bCalcLowers && IsValid() )
+ if (m_bCalcLowers && IsValid())
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = true;
- bCalcLowers = false;
+ m_bLowersFormatted = true;
+ m_bCalcLowers = false;
if( !IsValid() )
continue;
}
@@ -2233,7 +2245,7 @@ void SwTabFrm::MakeAll()
::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
SetInRecalcLowerRow( false );
}
- bLowersFormatted = true;
+ m_bLowersFormatted = true;
aNotify.SetLowersComplete( true );
// One more check if its really necessary to split the table.
@@ -2437,7 +2449,7 @@ void SwTabFrm::MakeAll()
}
SWREFRESHFN( this )
- bCalcLowers = true;
+ m_bCalcLowers = true;
bMovedFwd = true;
aNotify.SetLowersComplete( false );
if ( IsFollow() )
@@ -2466,7 +2478,7 @@ void SwTabFrm::MakeAll()
GetUpper()->ResetCompletePaint();
}
- if ( bCalcLowers && IsValid() )
+ if (m_bCalcLowers && IsValid())
{
// #i44910# - format of lower frames unnecessary
// and can cause layout loops, if table doesn't fit and isn't
@@ -2476,8 +2488,8 @@ void SwTabFrm::MakeAll()
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = true;
- bCalcLowers = false;
+ m_bLowersFormatted = true;
+ m_bCalcLowers = false;
}
#if OSL_DEBUG_LEVEL > 0
else
@@ -2498,7 +2510,7 @@ void SwTabFrm::MakeAll()
pPre->InvalidatePos();
}
- bCalcLowers = bONECalcLowers = false;
+ m_bCalcLowers = m_bONECalcLowers = false;
delete pAccess;
UnlockJoin();
if ( bMovedFwd || bMovedBwd || !bOldValidPos )
@@ -3290,10 +3302,10 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
nSpace += pNewUpper->Grow( LONG_MAX, true );
}
}
- else if( !bLockBackMove )
+ else if (!m_bLockBackMove)
bMoveAnyway = true;
}
- else if( !bLockBackMove )
+ else if (!m_bLockBackMove)
bMoveAnyway = true;
if ( bMoveAnyway )
@@ -3301,7 +3313,7 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
rReformat = true;
return true;
}
- if ( !bLockBackMove && nSpace > 0 )
+ if (!m_bLockBackMove && nSpace > 0)
{
// #i26945# - check, if follow flow line
// contains frame, which are moved forward due to its object