[Libreoffice-commits] core.git: 6 commits - sw/source
Michael Stahl
mstahl at redhat.com
Thu Dec 18 14:14:58 PST 2014
sw/source/core/access/accmap.cxx | 4
sw/source/core/inc/cellfrm.hxx | 4
sw/source/core/inc/frame.hxx | 2
sw/source/core/inc/layfrm.hxx | 11 +-
sw/source/core/inc/rowfrm.hxx | 28 +++---
sw/source/core/inc/tabfrm.hxx | 80 +++++++++---------
sw/source/core/layout/calcmove.cxx | 4
sw/source/core/layout/fly.cxx | 8 -
sw/source/core/layout/frmtool.cxx | 4
sw/source/core/layout/ftnfrm.cxx | 2
sw/source/core/layout/laycache.cxx | 4
sw/source/core/layout/pagechg.cxx | 2
sw/source/core/layout/sectfrm.cxx | 4
sw/source/core/layout/ssfrm.cxx | 14 ---
sw/source/core/layout/tabfrm.cxx | 160 +++++++++++++++++++------------------
sw/source/core/layout/wsfrm.cxx | 10 +-
16 files changed, 175 insertions(+), 166 deletions(-)
New commits:
commit fc93c17a2e2186ff5e52cc2a3d8f65aadb26c44e
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 18 23:02:54 2014 +0100
sw: prefix SwTabFrm members
Change-Id: If2de38d23c5753e703517b5ef82d0f00070c2f34
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 5433174..54a5944 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 2200610..05ed4c9 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 dc33d93..84a3de1 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
commit 8599b29b5c8cb5add80ca22f44e8e129b904fc2d
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 18 22:33:07 2014 +0100
sw: prefix SwRowFrm members
Change-Id: I262efe47d8a28d1462cf35314a99c4404ffa2200
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 071a46c..93526e9 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -34,16 +34,16 @@ class SwRowFrm: public SwLayoutFrm
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
- const SwTableLine *pTabLine;
- SwRowFrm* pFollowRow;
+ const SwTableLine * m_pTabLine;
+ SwRowFrm * m_pFollowRow;
// #i29550#
sal_uInt16 mnTopMarginForLowers;
sal_uInt16 mnBottomMarginForLowers;
sal_uInt16 mnBottomLineSize;
// <-- collapsing
- bool bIsFollowFlowRow;
- bool bIsRepeatedHeadline;
- bool mbIsRowSpanLine;
+ bool m_bIsFollowFlowRow;
+ bool m_bIsRepeatedHeadline;
+ bool m_bIsRowSpanLine;
protected:
virtual void MakeAll() SAL_OVERRIDE;
@@ -63,7 +63,7 @@ public:
*/
void RegistFlys( SwPageFrm *pPage = 0 );
- const SwTableLine *GetTabLine() const { return pTabLine; }
+ const SwTableLine *GetTabLine() const { return m_pTabLine; }
/**
* Adapts the Cells to the current height; invalidates the Cells if
@@ -71,8 +71,8 @@ public:
*/
void AdjustCells( const SwTwips nHeight, const bool bHeight );
- SwRowFrm* GetFollowRow() const { return pFollowRow; }
- void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
+ SwRowFrm* GetFollowRow() const { return m_pFollowRow; }
+ void SetFollowRow( SwRowFrm* pNew ) { m_pFollowRow = pNew; }
// #i29550#
sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
@@ -83,21 +83,21 @@ public:
void SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
// <-- collapsing
- bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
- void SetRepeatedHeadline( bool bNew ) { bIsRepeatedHeadline = bNew; }
+ bool IsRepeatedHeadline() const { return m_bIsRepeatedHeadline; }
+ void SetRepeatedHeadline( bool bNew ) { m_bIsRepeatedHeadline = bNew; }
// --> split table rows
bool IsRowSplitAllowed() const;
- bool IsFollowFlowRow() const { return bIsFollowFlowRow; }
- void SetFollowFlowRow( bool bNew ) { bIsFollowFlowRow = bNew; }
+ bool IsFollowFlowRow() const { return m_bIsFollowFlowRow; }
+ void SetFollowFlowRow( bool bNew ) { m_bIsFollowFlowRow = bNew; }
// <-- split table rows
// #131283# Table row keep feature
bool ShouldRowKeepWithNext() const;
// #i4032# NEW TABLES
- bool IsRowSpanLine() const { return mbIsRowSpanLine; }
- void SetRowSpanLine( bool bNew ) { mbIsRowSpanLine = bNew; }
+ bool IsRowSpanLine() const { return m_bIsRowSpanLine; }
+ void SetRowSpanLine( bool bNew ) { m_bIsRowSpanLine = bNew; }
DECL_FIXEDMEMPOOL_NEWDEL(SwRowFrm)
};
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index e3d12b3..dc33d93 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3480,19 +3480,19 @@ void SwTabFrm::Prepare( const PrepareHint eHint, const void *, bool )
CheckDirChange();
}
-SwRowFrm::SwRowFrm( const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent ):
- SwLayoutFrm( rLine.GetFrmFmt(), pSib ),
- pTabLine( &rLine ),
- pFollowRow( 0 ),
+SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent)
+ : SwLayoutFrm( rLine.GetFrmFmt(), pSib )
+ , m_pTabLine( &rLine )
+ , m_pFollowRow( 0 )
// #i29550#
- mnTopMarginForLowers( 0 ),
- mnBottomMarginForLowers( 0 ),
- mnBottomLineSize( 0 ),
+ , mnTopMarginForLowers( 0 )
+ , mnBottomMarginForLowers( 0 )
+ , mnBottomLineSize( 0 )
// --> split table rows
- bIsFollowFlowRow( false ),
+ , m_bIsFollowFlowRow( false )
// <-- split table rows
- bIsRepeatedHeadline( false ),
- mbIsRowSpanLine( false )
+ , m_bIsRepeatedHeadline( false )
+ , m_bIsRowSpanLine( false )
{
mnType = FRMC_ROW;
commit 217c09adcc3a73ee2c9e49e00af240195da63bc6
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 18 22:29:23 2014 +0100
sw: prefix SwCellFrm members
Change-Id: Ia38bdf402595dc0b7e6dabd80a4e93e53142b719
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 38f39bd..5be134c 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -30,7 +30,7 @@ class SwBorderAttrs;
/// SwCellFrm is one table cell in the document layout.
class SwCellFrm: public SwLayoutFrm
{
- const SwTableBox* pTabBox;
+ const SwTableBox* m_pTabBox;
protected:
virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
@@ -48,7 +48,7 @@ public:
// #i103961#
virtual void Cut() SAL_OVERRIDE;
- const SwTableBox *GetTabBox() const { return pTabBox; }
+ const SwTableBox *GetTabBox() const { return m_pTabBox; }
// used for breaking table rows:
SwCellFrm* GetFollowCell() const;
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index dffb178..e3d12b3 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4368,9 +4368,9 @@ bool SwRowFrm::ShouldRowKeepWithNext() const
return bRet;
}
-SwCellFrm::SwCellFrm( const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent ) :
- SwLayoutFrm( rBox.GetFrmFmt(), pSib ),
- pTabBox( &rBox )
+SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent)
+ : SwLayoutFrm( rBox.GetFrmFmt(), pSib )
+ , m_pTabBox( &rBox )
{
mnType = FRMC_CELL;
commit ef342691ebb130c0615282d7b88d724e85c6011f
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 18 22:25:35 2014 +0100
sw: prefix SwLayoutFrm members
Change-Id: If961ecfe27c6f478f030bab746278b885482b229
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index e47fbda..fa16b14 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -54,7 +54,7 @@ protected:
virtual void MakeAll() SAL_OVERRIDE;
SwFrm * m_pLower;
- std::vector<SwAnchoredObject*> aVertPosOrientFrmsFor;
+ std::vector<SwAnchoredObject*> m_VertPosOrientFrmsFor;
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
@@ -178,14 +178,15 @@ public:
void SetVertPosOrientFrmFor(SwAnchoredObject *pObj)
{
- aVertPosOrientFrmsFor.push_back(pObj);
+ m_VertPosOrientFrmsFor.push_back(pObj);
}
void ClearVertPosOrientFrmFor(SwAnchoredObject *pObj)
{
- aVertPosOrientFrmsFor.erase(
- std::remove(aVertPosOrientFrmsFor.begin(),
- aVertPosOrientFrmsFor.end(), pObj), aVertPosOrientFrmsFor.end());
+ m_VertPosOrientFrmsFor.erase(
+ std::remove(m_VertPosOrientFrmsFor.begin(),
+ m_VertPosOrientFrmsFor.end(), pObj),
+ m_VertPosOrientFrmsFor.end());
}
};
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 10ca392..a4aa372 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -432,13 +432,13 @@ void SwCntntFrm::RegisterToNode( SwCntntNode& rNode )
void SwLayoutFrm::Destroy()
{
- while (!aVertPosOrientFrmsFor.empty())
+ while (!m_VertPosOrientFrmsFor.empty())
{
- SwAnchoredObject *pObj = *aVertPosOrientFrmsFor.begin();
+ SwAnchoredObject *pObj = *m_VertPosOrientFrmsFor.begin();
pObj->ClearVertPosOrientFrm();
}
- assert(aVertPosOrientFrmsFor.empty());
+ assert(m_VertPosOrientFrmsFor.empty());
SwFrm *pFrm = m_pLower;
commit 296e8b597c141b6b54cbf943871d6a6820c1779d
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 18 21:52:51 2014 +0100
fdo#87199: sw: fix root cause of a11y crash when merging cells
Commit f9eff2a402a4cd28d7dbfb6ce27cbf96b31e576f is not quite right
because it will leave the mpNext chain unreachable; that could perhaps
be imporoved by calling RemoveFromLayout(), but...
Actually the problem is basically that one of the deleted SwCellFrms
points to a SwTableBox with getRowSpan() -1 (because it has been merged)
and thus IsInCoveredCell() returns true and that causes ~SwCellFrm() to
skip disposing the SwAccessible stuff, so the SwCellFrm is still
contained in the SwAccessibleMap.
Because it's rather hard to prevent this sort of thing in general,
better change SwAccessibleMap::Dispose() to assume that if it found its
way into the SwAccessibleMap it should be disposed and removed.
Change-Id: Ib4cec6924cb026ae30bdac6857957adf237b4d70
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index b3f2c54..2d3cf83 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2263,7 +2263,9 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm,
OSL_ENSURE( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
"non accessible frame should be disposed" );
- if( aFrmOrObj.IsAccessible( GetShell()->IsPreview() ) )
+ if (aFrmOrObj.IsAccessible( GetShell()->IsPreview() )
+ // fdo#87199 dispose the darn thing if it ever was accessible
+ || (pFrm && mpFrmMap && mpFrmMap->find(pFrm) != mpFrmMap->end()))
{
::rtl::Reference< SwAccessibleContext > xAccImpl;
::rtl::Reference< SwAccessibleContext > xParentAccImpl;
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index a4a90c0..10ca392 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -367,12 +367,6 @@ void SwFrm::Destroy()
delete mpDrawObjs;
mpDrawObjs = 0;
}
-
- SwLayoutFrm *pFrm = GetUpper();
- if (pFrm && pFrm->m_pLower == this)
- {
- pFrm->m_pLower = nullptr;
- }
}
SwFrm::~SwFrm()
commit 59c92736ab064c0bba628e680a5c444f9f1dcc1b
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Dec 17 16:57:55 2014 +0100
sw: rename SwFrm::Remove to something unique
Change-Id: I4daf01450a4aa8f1d2bc6eae731a735d0d38a074
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 95f99c4..a8bae4a 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -464,7 +464,7 @@ public:
// insert before pBehind or at the end of the chain while considering
// the siblings of pSct
void InsertGroupBefore( SwFrm* pParent, SwFrm* pWhere, SwFrm* pSct );
- void Remove();
+ void RemoveFromLayout();
// For internal use only - who ignores this will be put in a sack and has
// to stay there for two days
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b7ea898..d7bb1d3 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1798,7 +1798,7 @@ bool SwCntntFrm::_WouldFit( SwTwips nSpace,
(SwFrm*)pFrm->FindFtnFrm() : pFrm;
SwLayoutFrm *pUp = pTmpFrm->GetUpper();
SwFrm *pOldNext = pTmpFrm->GetNext();
- pTmpFrm->Remove();
+ pTmpFrm->RemoveFromLayout();
pTmpFrm->InsertBefore( pNewUpper, 0 );
if ( pFrm->IsTxtFrm() &&
( bTstMove ||
@@ -1815,7 +1815,7 @@ bool SwCntntFrm::_WouldFit( SwTwips nSpace,
else
bRet = pFrm->WouldFit( nSpace, bSplit, false );
- pTmpFrm->Remove();
+ pTmpFrm->RemoveFromLayout();
pTmpFrm->InsertBefore( pUp, pOldNext );
}
else
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 9c618e6..2200610 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -321,7 +321,7 @@ void SwFlyFrm::DeleteCnt()
}
}
- pFrm->Remove();
+ pFrm->RemoveFromLayout();
delete pFrm;
pFrm = m_pLower;
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index c6ba7c8..352dadd 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1505,7 +1505,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
SwFrm *pTmpFrm = pLay;
pLay = pTmpFrm->GetUpper();
pPrv = pTmpFrm->GetPrev();
- pTmpFrm->Remove();
+ pTmpFrm->RemoveFromLayout();
delete pTmpFrm;
}
else
@@ -1583,7 +1583,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
// Might happen that an empty (Follow-)Section is left over.
if ( !(pLay = pActualSection->GetSectionFrm())->ContainsCntnt() )
{
- pLay->Remove();
+ pLay->RemoveFromLayout();
delete pLay;
}
delete pActualSection;
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a69534b..8f9f8c8 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -504,7 +504,7 @@ void SwFtnFrm::Cut()
pFtn->SetMaster( 0 );
// cut all connections
- Remove();
+ RemoveFromLayout();
if ( pUp )
{
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 40ea820..c9374ba 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -818,7 +818,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
while ( pRow )
{
SwFrm* pNxt = pRow->GetNext();
- pRow->Remove();
+ pRow->RemoveFromLayout();
pRow->InsertBehind( pFoll, pPrv );
pPrv = pRow;
pRow = pNxt;
@@ -859,7 +859,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
if ( !rpActualSection->GetSectionFrm()->ContainsCntnt())
{
pSct = rpActualSection->GetSectionFrm();
- pSct->Remove();
+ pSct->RemoveFromLayout();
}
else
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 02c523b..cd1314b 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -838,7 +838,7 @@ void SwPageFrm::Cut()
SwFrm* pRootFrm = GetUpper();
// cut all connections
- Remove();
+ RemoveFromLayout();
if ( pRootFrm )
static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( 0, 0 );
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index dc14823..53a50b8 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -257,7 +257,7 @@ void SwSectionFrm::_Cut( bool bRemove )
SwLayoutFrm *pUp = GetUpper();
if( bRemove )
{
- Remove();
+ RemoveFromLayout();
if( pUp && !pUp->Lower() && pUp->IsFtnFrm() && !pUp->IsColLocked() &&
pUp->GetUpper() )
{
@@ -2563,7 +2563,7 @@ void SwRootFrm::_DeleteEmptySct()
if( !pSect->Frm().HasArea() && !pSect->ContainsCntnt() )
{
SwLayoutFrm* pUp = pSect->GetUpper();
- pSect->Remove();
+ pSect->RemoveFromLayout();
delete pSect;
if( pUp && !pUp->Lower() )
{
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 06f6ee2..a4a90c0 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -486,7 +486,7 @@ void SwLayoutFrm::Destroy()
}
}
}
- pFrm->Remove();
+ pFrm->RemoveFromLayout();
delete pFrm;
pFrm = m_pLower;
}
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index e3c4102..dffb178 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -401,13 +401,13 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine )
lcl_MoveRowContent( *pTmpSourceRow, *pTmpDestRow );
pTmpDestRow->SetFollowRow( pTmpSourceRow->GetFollowRow() );
- pTmpSourceRow->Remove();
+ pTmpSourceRow->RemoveFromLayout();
delete pTmpSourceRow;
}
else
{
// move complete row:
- pTmpSourceRow->Remove();
+ pTmpSourceRow->RemoveFromLayout();
pTmpSourceRow->InsertBefore( pCurrDestCell, 0 );
}
@@ -538,7 +538,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
{
SwRowFrm* pTmp = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pTmpLastLineRow );
- pTmpLastLineRow->Remove();
+ pTmpLastLineRow->RemoveFromLayout();
pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, 0 );
pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
@@ -822,7 +822,7 @@ bool SwTabFrm::RemoveFollowFlowLine()
// The footnotes have to be moved:
lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrm&>(*pRow) );
- pRow->Remove();
+ pRow->RemoveFromLayout();
pRow->InsertBehind( this, pInsertBehind );
pRow->_InvalidateAll();
pRow->CheckDirChange();
@@ -1156,7 +1156,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
nRet += (pRow->Frm().*fnRect->fnGetHeight)();
// The footnotes do not have to be moved, this is done in the
// MoveFwd of the follow table!!!
- pRow->Remove();
+ pRow->RemoveFromLayout();
pRow->InsertBehind( pFoll, pInsertBehind );
pRow->_InvalidateAll();
pInsertBehind = pRow;
@@ -1178,7 +1178,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// The footnotes have to be moved:
lcl_MoveFootnotes( *this, *GetFollow(), *pRow );
- pRow->Remove();
+ pRow->RemoveFromLayout();
pRow->Paste( pFoll, pPasteBefore );
pRow->CheckDirChange();
@@ -1231,7 +1231,7 @@ bool SwTabFrm::Join()
{
pNxt = pRow->GetNext();
nHeight += (pRow->Frm().*fnRect->fnGetHeight)();
- pRow->Remove();
+ pRow->RemoveFromLayout();
pRow->_InvalidateAll();
pRow->InsertBehind( this, pPrv );
pRow->CheckDirChange();
@@ -3384,7 +3384,7 @@ void SwTabFrm::Cut()
//First remove, then shrink the upper.
SwLayoutFrm *pUp = GetUpper();
SWRECTFN( this )
- Remove();
+ RemoveFromLayout();
if ( pUp )
{
OSL_ENSURE( !pUp->IsFtnFrm(), "Table in Footnote." );
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index bc98ddf..a6e3cbf 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -695,7 +695,7 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
}
}
-void SwFrm::Remove()
+void SwFrm::RemoveFromLayout()
{
OSL_ENSURE( mpUpper, "Remove without upper?" );
@@ -932,7 +932,7 @@ void SwCntntFrm::Cut()
}
//Remove first, then shrink the upper.
SwLayoutFrm *pUp = GetUpper();
- Remove();
+ RemoveFromLayout();
if ( pUp )
{
SwSectionFrm *pSct = 0;
@@ -1130,16 +1130,16 @@ void SwLayoutFrm::Cut()
if( NA_GROW_ADJUST == nAdjust && nReal < nShrink )
AdjustNeighbourhood( nReal - nShrink );
}
- Remove();
+ RemoveFromLayout();
}
else
{
- Remove();
+ RemoveFromLayout();
pUp->Shrink( nShrink );
}
}
else
- Remove();
+ RemoveFromLayout();
if( pUp && !pUp->Lower() )
{
More information about the Libreoffice-commits
mailing list