summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swtable.hxx60
-rw-r--r--sw/source/core/doc/tblrwcl.cxx94
-rw-r--r--sw/source/core/fields/ddetbl.cxx14
-rw-r--r--sw/source/core/table/swnewtable.cxx64
-rw-r--r--sw/source/core/table/swtable.cxx60
5 files changed, 146 insertions, 146 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 86ebd8ce81cc..bf492ddb75b1 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -94,36 +94,36 @@ class SW_DLLPUBLIC SwTable: public SwClient //Client of FrameFormat.
{
protected:
- SwTableLines aLines;
+ SwTableLines m_aLines;
SwTableSortBoxes m_TabSortContentBoxes;
- tools::SvRef<SwServerObject> refObj; // In case DataServer -> pointer is set.
+ tools::SvRef<SwServerObject> m_xRefObj; // In case DataServer -> pointer is set.
- SwHTMLTableLayout *pHTMLLayout;
+ SwHTMLTableLayout *m_pHTMLLayout;
// Usually, the table node of a SwTable can be accessed by getting a box
// out of m_TabSortContentBoxes, which know their SwStartNode. But in some rare
// cases, we need to know the table node of a SwTable, before the table
// boxes have been build (SwTableNode::MakeCopy with tables in tables).
- SwTableNode* pTableNode;
+ SwTableNode* m_pTableNode;
// Should that be adjustable for every table?
- TableChgMode eTableChgMode;
+ TableChgMode m_eTableChgMode;
- sal_uInt16 nGrfsThatResize; // Count of Grfs that initiate a resize of table
+ sal_uInt16 m_nGraphicsThatResize; // Count of Grfs that initiate a resize of table
// at HTML-import.
- sal_uInt16 nRowsToRepeat; // Number of rows to repeat on every page.
+ sal_uInt16 m_nRowsToRepeat; // Number of rows to repeat on every page.
/// Name of the table style to be applied on this table.
OUString maTableStyleName;
- bool bModifyLocked :1;
- bool bNewModel :1; // false: old SubTableModel; true: new RowSpanModel
+ bool m_bModifyLocked :1;
+ bool m_bNewModel :1; // false: old SubTableModel; true: new RowSpanModel
#ifdef DBG_UTIL
/// This is set by functions (like Merge()) to forbid a late model change.
bool m_bDontChangeModel;
#endif
- bool IsModifyLocked(){ return bModifyLocked;}
+ bool IsModifyLocked(){ return m_bModifyLocked;}
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override;
@@ -164,18 +164,18 @@ private:
public:
- SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; }
- const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
+ SwHTMLTableLayout *GetHTMLTableLayout() { return m_pHTMLLayout; }
+ const SwHTMLTableLayout *GetHTMLTableLayout() const { return m_pHTMLLayout; }
void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Change of property!
- sal_uInt16 IncGrfsThatResize() { return ++nGrfsThatResize; }
- sal_uInt16 DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+ sal_uInt16 IncGrfsThatResize() { return ++m_nGraphicsThatResize; }
+ sal_uInt16 DecGrfsThatResize() { return m_nGraphicsThatResize ? --m_nGraphicsThatResize : 0; }
- void LockModify() { bModifyLocked = true; } // Must be used always
- void UnlockModify() { bModifyLocked = false;} // in pairs!
+ void LockModify() { m_bModifyLocked = true; } // Must be used always
+ void UnlockModify() { m_bModifyLocked = false;} // in pairs!
- void SetTableModel( bool bNew ){ bNewModel = bNew; }
- bool IsNewModel() const { return bNewModel; }
+ void SetTableModel( bool bNew ){ m_bNewModel = bNew; }
+ bool IsNewModel() const { return m_bNewModel; }
/// Return the table style name of this table.
OUString GetTableStyleName() const { return maTableStyleName; }
@@ -183,14 +183,14 @@ public:
/// Set the new table style name for this table.
void SetTableStyleName(const OUString& rName) { maTableStyleName = rName; }
- sal_uInt16 GetRowsToRepeat() const { return std::min( (sal_uInt16)GetTabLines().size(), nRowsToRepeat ); }
- sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; }
- void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+ sal_uInt16 GetRowsToRepeat() const { return std::min( (sal_uInt16)GetTabLines().size(), m_nRowsToRepeat ); }
+ sal_uInt16 _GetRowsToRepeat() const { return m_nRowsToRepeat; }
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { m_nRowsToRepeat = nNumOfRows; }
bool IsHeadline( const SwTableLine& rLine ) const;
- SwTableLines &GetTabLines() { return aLines; }
- const SwTableLines &GetTabLines() const { return aLines; }
+ SwTableLines &GetTabLines() { return m_aLines; }
+ const SwTableLines &GetTabLines() const { return m_aLines; }
SwTableFormat* GetFrameFormat() { return static_cast<SwTableFormat*>(GetRegisteredIn()); }
SwTableFormat* GetFrameFormat() const { return const_cast<SwTableFormat*>(static_cast<const SwTableFormat*>(GetRegisteredIn())); }
@@ -226,7 +226,7 @@ public:
#ifdef DBG_UTIL
m_bDontChangeModel = true;
#endif
- return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
+ return m_bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
}
bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
@@ -235,7 +235,7 @@ public:
#ifdef DBG_UTIL
m_bDontChangeModel = true;
#endif
- return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
+ return m_bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
}
bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
@@ -316,18 +316,18 @@ public:
// Returns the table node via m_TabSortContentBoxes or pTableNode.
SwTableNode* GetTableNode() const;
- void SetTableNode( SwTableNode* pNode ) { pTableNode = pNode; }
+ void SetTableNode( SwTableNode* pNode ) { m_pTableNode = pNode; }
// Data server methods.
void SetRefObject( SwServerObject* );
- const SwServerObject* GetObject() const { return &refObj; }
- SwServerObject* GetObject() { return &refObj; }
+ const SwServerObject* GetObject() const { return &m_xRefObj; }
+ SwServerObject* GetObject() { return &m_xRefObj; }
// Fill data for chart.
void UpdateCharts() const;
- TableChgMode GetTableChgMode() const { return eTableChgMode; }
- void SetTableChgMode( TableChgMode eMode ) { eTableChgMode = eMode; }
+ TableChgMode GetTableChgMode() const { return m_eTableChgMode; }
+ void SetTableChgMode( TableChgMode eMode ) { m_eTableChgMode = eMode; }
bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 6fa089dcce38..8be5172a4bf5 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -166,8 +166,8 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool
#define CHECKBOXWIDTH \
{ \
SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth(); \
- for (size_t nTmp = 0; nTmp < aLines.size(); ++nTmp) \
- ::_CheckBoxWidth( *aLines[ nTmp ], nSize ); \
+ for (size_t nTmp = 0; nTmp < m_aLines.size(); ++nTmp) \
+ ::_CheckBoxWidth( *m_aLines[ nTmp ], nSize ); \
}
#define CHECKTABLELAYOUT \
@@ -3438,7 +3438,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
{
case nsTableChgWidthHeightType::WH_COL_RIGHT:
case nsTableChgWidthHeightType::WH_COL_LEFT:
- if( TBLVAR_CHGABS == eTableChgMode )
+ if( TBLVAR_CHGABS == m_eTableChgMode )
{
if( bInsDel )
bBigger = !bBigger;
@@ -3469,22 +3469,22 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
if( !bRet )
{
// Then call itself recursively; only with another mode (proportional)
- TableChgMode eOld = eTableChgMode;
- eTableChgMode = TBLFIX_CHGPROP;
+ TableChgMode eOld = m_eTableChgMode;
+ m_eTableChgMode = TBLFIX_CHGPROP;
bRet = SetColWidth( rAktBox, eType, nAbsDiff, nRelDiff,
ppUndo );
- eTableChgMode = eOld;
+ m_eTableChgMode = eOld;
return bRet;
}
}
else
{
bRet = true;
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true ))
+ if( !(*fnSelBox)( m_aLines[ n ], aParam, nDistStt, true ))
{
bRet = false;
break;
@@ -3526,8 +3526,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
// Break down to USHRT_MAX / 2
CR_SetBoxWidth aTmpPara( 0, aSz.GetWidth() / 2,
0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTableNd );
- for( size_t nLn = 0; nLn < aLines.size(); ++nLn )
- ::lcl_AjustLines( aLines[ nLn ], aTmpPara );
+ for( size_t nLn = 0; nLn < m_aLines.size(); ++nLn )
+ ::lcl_AjustLines( m_aLines[ nLn ], aTmpPara );
aSz.SetWidth( aSz.GetWidth() / 2 );
aParam.nDiff = nRelDiff /= 2;
aParam.nSide /= 2;
@@ -3588,11 +3588,11 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
UnlockModify();
- for( n = aLines.size(); n; )
+ for( n = m_aLines.size(); n; )
{
--n;
aParam.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, false );
+ (*fnSelBox)( m_aLines[ n ], aParam, nDistStt, false );
}
// If the Table happens to contain relative values (USHORT_MAX),
@@ -3610,7 +3610,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
( bLeft ? nDist != 0 : std::abs( rSz.GetWidth() - nDist ) > COLFUZZY ) )
{
bRet = true;
- if( bLeft && TBLFIX_CHGABS == eTableChgMode && !bInsDel )
+ if( bLeft && TBLFIX_CHGABS == m_eTableChgMode && !bInsDel )
aParam.bBigger = !bBigger;
// First test if we have room at all
@@ -3618,10 +3618,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
{
if( aParam.bBigger )
{
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true ))
+ if( !(*fnSelBox)( m_aLines[ n ], aParam, nDistStt, true ))
{
bRet = false;
break;
@@ -3633,10 +3633,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
if( ( bRet = bLeft ? nDist != 0
: ( rSz.GetWidth() - nDist ) > COLFUZZY ) )
{
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, true ))
+ if( !(*fnOtherBox)( m_aLines[ n ], aParam, 0, true ))
{
bRet = false;
break;
@@ -3655,10 +3655,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
// We also need to test this!
bRet = true;
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true ))
+ if( !(*fnSelBox)( m_aLines[ n ], aParam, nDistStt, true ))
{
bRet = false;
break;
@@ -3669,10 +3669,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
}
else if( aParam.bBigger )
{
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, true ))
+ if( !(*fnOtherBox)( m_aLines[ n ], aParam, 0, true ))
{
bRet = false;
break;
@@ -3681,10 +3681,10 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
}
else
{
- for( n = 0; n < aLines.size(); ++n )
+ for( n = 0; n < m_aLines.size(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true ))
+ if( !(*fnSelBox)( m_aLines[ n ], aParam, nDistStt, true ))
{
bRet = false;
break;
@@ -3709,27 +3709,27 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
if( bInsDel
- ? ( TBLFIX_CHGABS == eTableChgMode ? (bBigger && bLeft) : bLeft )
- : ( TBLFIX_CHGABS != eTableChgMode && bLeft ) )
+ ? ( TBLFIX_CHGABS == m_eTableChgMode ? (bBigger && bLeft) : bLeft )
+ : ( TBLFIX_CHGABS != m_eTableChgMode && bLeft ) )
{
- for( n = aLines.size(); n; )
+ for( n = m_aLines.size(); n; )
{
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, false );
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, false );
+ (*fnSelBox)( m_aLines[ n ], aParam, nDistStt, false );
+ (*fnOtherBox)( m_aLines[ n ], aParam1, nDistStt, false );
}
}
else
{
- for( n = aLines.size(); n; )
+ for( n = m_aLines.size(); n; )
{
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, false );
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, false );
+ (*fnOtherBox)( m_aLines[ n ], aParam1, nDistStt, false );
+ (*fnSelBox)( m_aLines[ n ], aParam, nDistStt, false );
}
}
}
@@ -3738,21 +3738,21 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
case nsTableChgWidthHeightType::WH_CELL_RIGHT:
case nsTableChgWidthHeightType::WH_CELL_LEFT:
- if( TBLVAR_CHGABS == eTableChgMode )
+ if( TBLVAR_CHGABS == m_eTableChgMode )
{
// Then call itself recursively; only with another mode (proportional)
- TableChgMode eOld = eTableChgMode;
- eTableChgMode = TBLFIX_CHGABS;
+ TableChgMode eOld = m_eTableChgMode;
+ m_eTableChgMode = TBLFIX_CHGABS;
bRet = SetColWidth( rAktBox, eType, nAbsDiff, nRelDiff,
ppUndo );
- eTableChgMode = eOld;
+ m_eTableChgMode = eOld;
return bRet;
}
else if( bInsDel || ( bLeft ? nDist != 0
: (rSz.GetWidth() - nDist) > COLFUZZY ))
{
- if( bLeft && TBLFIX_CHGABS == eTableChgMode && !bInsDel )
+ if( bLeft && TBLFIX_CHGABS == m_eTableChgMode && !bInsDel )
aParam.bBigger = !bBigger;
// First, see if there is enough room at all
@@ -3824,8 +3824,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
if( bInsDel
- ? ( TBLFIX_CHGABS == eTableChgMode ? (bBigger && bLeft) : bLeft )
- : ( TBLFIX_CHGABS != eTableChgMode && bLeft ) )
+ ? ( TBLFIX_CHGABS == m_eTableChgMode ? (bBigger && bLeft) : bLeft )
+ : ( TBLFIX_CHGABS != m_eTableChgMode && bLeft ) )
{
(*fnSelBox)( pLine, aParam, nDistStt, false );
(*fnOtherBox)( pLine, aParam1, nDistStt, false );
@@ -3858,7 +3858,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
if (ppUndo && *ppUndo && aParam.pUndo)
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTableChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(m_eTableChgMode), eType,
nAbsDiff, nRelDiff );
if( !aParam.bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTableNd, aTmpLst );
@@ -4147,7 +4147,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
else
fnSelLine = lcl_SetSelLineHeight;
- SwTableLines* pLines = &aLines;
+ SwTableLines* pLines = &m_aLines;
// How do we get to the height?
switch( eType & 0xff )
@@ -4171,7 +4171,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
nAbsDiff = GetRowFrm( *pBaseLine )->Frm().Height();
}
- if( TBLVAR_CHGABS == eTableChgMode )
+ if( TBLVAR_CHGABS == m_eTableChgMode )
{
// First test if we have room at all
if( bBigger )
@@ -4223,7 +4223,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
nStt = nBaseLinePos + 1, nEnd = pLines->size();
// Get the current Lines' height
- if( TBLFIX_CHGPROP == eTableChgMode )
+ if( TBLFIX_CHGPROP == m_eTableChgMode )
{
for( auto n = nStt; n < nEnd; ++n )
{
@@ -4287,7 +4287,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
CR_SetLineHeight aParam1( aParam );
- if( TBLFIX_CHGPROP == eTableChgMode && !bBigger &&
+ if( TBLFIX_CHGPROP == m_eTableChgMode && !bBigger &&
!aParam.nMaxSpace )
{
// We need to distribute the space evenly among all the Lines.
@@ -4315,13 +4315,13 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
else
{
// Then call itself recursively; only with another mode (proportional)
- TableChgMode eOld = eTableChgMode;
- eTableChgMode = TBLVAR_CHGABS;
+ TableChgMode eOld = m_eTableChgMode;
+ m_eTableChgMode = TBLVAR_CHGABS;
bRet = SetRowHeight( rAktBox, eType, nAbsDiff,
nRelDiff, ppUndo );
- eTableChgMode = eOld;
+ m_eTableChgMode = eOld;
xFndBox.reset();
}
}
@@ -4344,7 +4344,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
if (ppUndo && *ppUndo && aParam.pUndo)
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTableChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(m_eTableChgMode), eType,
nAbsDiff, nRelDiff );
if( bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTableNd, aTmpLst );
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 2edec00f8169..e1d674a7573c 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -44,11 +44,11 @@ SwDDETable::SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType, bool bUpdate
m_TabSortContentBoxes.insert(rTable.GetTabSortBoxes());
rTable.GetTabSortBoxes().clear();
- aLines.insert( aLines.begin(),
+ m_aLines.insert( m_aLines.begin(),
rTable.GetTabLines().begin(), rTable.GetTabLines().end() ); // move lines
rTable.GetTabLines().clear();
- if( !aLines.empty() )
+ if( !m_aLines.empty() )
{
const SwNode& rNd = *GetTabSortBoxes()[0]->GetSttNd();
if( rNd.GetNodes().IsDocNodes() )
@@ -66,7 +66,7 @@ SwDDETable::~SwDDETable()
{
SwDDEFieldType* pFieldTyp = static_cast<SwDDEFieldType*>(aDepend.GetRegisteredIn());
SwDoc* pDoc = GetFrameFormat()->GetDoc();
- if( !pDoc->IsInDtor() && !aLines.empty() &&
+ if( !pDoc->IsInDtor() && !m_aLines.empty() &&
GetTabSortBoxes()[0]->GetSttNd()->GetNodes().IsDocNodes() )
pFieldTyp->DecRefCnt();
@@ -100,7 +100,7 @@ void SwDDETable::ChangeContent()
OSL_ENSURE( GetFrameFormat(), "No FrameFormat" );
// Is this the correct NodesArray? (because of UNDO)
- if( aLines.empty() )
+ if( m_aLines.empty() )
return;
OSL_ENSURE( !GetTabSortBoxes().empty(), "Table without content?" );
if( !GetTabSortBoxes()[0]->GetSttNd()->GetNodes().IsDocNodes() )
@@ -112,11 +112,11 @@ void SwDDETable::ChangeContent()
OUString aExpand = comphelper::string::remove(pDDEType->GetExpansion(), '\r');
sal_Int32 nExpandTokenPos = 0;
- for( size_t n = 0; n < aLines.size(); ++n )
+ for( size_t n = 0; n < m_aLines.size(); ++n )
{
OUString aLine = aExpand.getToken( 0, '\n', nExpandTokenPos );
sal_Int32 nLineTokenPos = 0;
- SwTableLine* pLine = aLines[ n ];
+ SwTableLine* pLine = m_aLines[ n ];
for( size_t i = 0; i < pLine->GetTabBoxes().size(); ++i )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ i ];
@@ -153,7 +153,7 @@ bool SwDDETable::NoDDETable()
SwDoc* pDoc = GetFrameFormat()->GetDoc();
// Is this the correct NodesArray? (because of UNDO)
- if( aLines.empty() )
+ if( m_aLines.empty() )
return false;
OSL_ENSURE( !GetTabSortBoxes().empty(), "Table without content?" );
SwNode* pNd = const_cast<SwNode*>(static_cast<SwNode const *>(GetTabSortBoxes()[0]->GetSttNd()));
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 924546c61bdc..c06a42f041ca 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -323,22 +323,22 @@ static void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
- OSL_ENSURE( bNewModel, "Don't call me for old tables" );
- if( aLines.empty() )
+ OSL_ENSURE( m_bNewModel, "Don't call me for old tables" );
+ if( m_aLines.empty() )
return 0;
const SwNode* pStartNd = rPam.Start()->nNode.GetNode().FindTableBoxStartNode();
const SwNode* pEndNd = rPam.End()->nNode.GetNode().FindTableBoxStartNode();
if( !pStartNd || !pEndNd || pStartNd == pEndNd )
return 0;
- const size_t nLines = aLines.size();
+ const size_t nLines = m_aLines.size();
size_t nTop = 0;
size_t nBottom = 0;
long nMin = 0, nMax = 0;
int nFound = 0;
for( size_t nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
const size_t nCols = pLine->GetTabBoxes().size();
for( size_t nCol = 0; nCol < nCols; ++nCol )
@@ -378,7 +378,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nRightSpanCnt = 0;
for( size_t nRow = nTop; nRow <= nBottom && bOkay && nRow < nLines; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
SwSelBoxes *pBoxes = new SwSelBoxes();
long nRight = 0;
@@ -653,16 +653,16 @@ insertion behind (true) or before (false) the selected boxes
bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
sal_uInt16 nCnt, bool bBehind )
{
- if( aLines.empty() || !nCnt )
+ if( m_aLines.empty() || !nCnt )
return false;
CHECK_TABLE( *this )
long nNewBoxWidth = 0;
- std::vector< sal_uInt16 > aInsPos( aLines.size(), USHRT_MAX );
+ std::vector< sal_uInt16 > aInsPos( m_aLines.size(), USHRT_MAX );
{ // Calculation of the insert positions and the width of the new boxes
sal_uInt64 nTableWidth = 0;
- for( size_t i = 0; i < aLines[0]->GetTabBoxes().size(); ++i )
- nTableWidth += aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrmSize().GetWidth();
+ for( size_t i = 0; i < m_aLines[0]->GetTabBoxes().size(); ++i )
+ nTableWidth += m_aLines[0]->GetTabBoxes()[i]->GetFrameFormat()->GetFrmSize().GetWidth();
// Fill the vector of insert positions and the (average) width to insert
sal_uInt64 nAddWidth = lcl_InsertPosition( *this, aInsPos, rBoxes, bBehind );
@@ -694,9 +694,9 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
size_t nLastLine = SAL_MAX_SIZE;
long nLastRowSpan = 1;
- for( size_t i = 0; i < aLines.size(); ++i )
+ for( size_t i = 0; i < m_aLines.size(); ++i )
{
- SwTableLine* pLine = aLines[ i ];
+ SwTableLine* pLine = m_aLines[ i ];
sal_uInt16 nInsPos = aInsPos[i];
assert(nInsPos != USHRT_MAX); // didn't find insert position
SwTableBox* pBox = pLine->GetTabBoxes()[ nInsPos ];
@@ -713,7 +713,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
bNewSpan = true;
while( nLastLine < i )
{
- SwTableLine* pTmpLine = aLines[ nLastLine ];
+ SwTableLine* pTmpLine = m_aLines[ nLastLine ];
sal_uInt16 nTmpPos = aInsPos[nLastLine];
if( bBehind )
++nTmpPos;
@@ -770,7 +770,7 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
aFndBox.MakeFrms( *this );
#if OSL_DEBUG_LEVEL > 0
{
- const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
+ const SwTableBoxes &rTabBoxes = m_aLines[0]->GetTabBoxes();
long nNewWidth = 0;
for( size_t i = 0; i < rTabBoxes.size(); ++i )
nNewWidth += rTabBoxes[i]->GetFrameFormat()->GetFrmSize().GetWidth();
@@ -810,7 +810,7 @@ can be Null, e.g. when called by Redo(..)
bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTableMerge* pUndo )
{
- if( !bNewModel )
+ if( !m_bNewModel )
{
::GetMergeSel( rPam, rBoxes, ppMergeBox, pUndo );
return rBoxes.size() > 1;
@@ -979,7 +979,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
sal_uInt16 nLastLn = GetTabLines().GetPos( pLastLn );
for( sal_uInt16 nRow = nFirstLn; nRow <= nLastLn; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
const size_t nCols = pLine->GetTabBoxes().size();
bool bSuperfl = true;
@@ -1650,8 +1650,8 @@ static void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nM
void SwTable::CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
const SearchType eSearch, bool bChkProtected ) const
{
- OSL_ENSURE( bNewModel, "Don't call me for old tables" );
- if( aLines.empty() )
+ OSL_ENSURE( m_bNewModel, "Don't call me for old tables" );
+ if( m_aLines.empty() )
return;
const SwNode* pStartNd = rPam.GetPoint()->nNode.GetNode().FindTableBoxStartNode();
const SwNode* pEndNd = rPam.GetMark()->nNode.GetNode().FindTableBoxStartNode();
@@ -1668,7 +1668,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
rBoxes.clear();
// Looking for start and end of the selection given by SwNode-pointer
- const size_t nLines = aLines.size();
+ const size_t nLines = m_aLines.size();
// nTop becomes the line number of the upper box
// nBottom becomes the line number of the lower box
size_t nTop = 0;
@@ -1683,7 +1683,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
int nFound = 0;
for( size_t nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
const size_t nCols = pLine->GetTabBoxes().size();
for( size_t nCol = 0; nCol < nCols; ++nCol )
@@ -1728,7 +1728,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
// with a positive row span will be collected
for( size_t nRow = nTop; nRow <= nBottom; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
const size_t nCount = pLine->GetTabBoxes().size();
for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
@@ -1772,20 +1772,20 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
for( size_t i = 0; i < nTop; ++i )
lcl_SearchSelBox( *this, rBoxes, nUpperMin, nUpperMax,
- *aLines[i], bChkProtected, bColumn );
+ *m_aLines[i], bChkProtected, bColumn );
}
{
long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
for( size_t i = nTop; i <= nBottom; ++i )
- lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *aLines[i],
+ lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *m_aLines[i],
bChkProtected, bColumn );
}
if( bColumn )
{
for( size_t i = nBottom + 1; i < nLines; ++i )
- lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *aLines[i],
+ lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *m_aLines[i],
bChkProtected, true );
}
}
@@ -1796,18 +1796,18 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const
{
- OSL_ENSURE( bNewModel, "Don't call me for old tables" );
+ OSL_ENSURE( m_bNewModel, "Don't call me for old tables" );
rMin = 0;
rMax = 0;
- if( aLines.empty() || rBoxes.empty() )
+ if( m_aLines.empty() || rBoxes.empty() )
return;
- const size_t nLineCnt = aLines.size();
+ const size_t nLineCnt = m_aLines.size();
const size_t nBoxCnt = rBoxes.size();
size_t nBox = 0;
for( size_t nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
const size_t nCols = pLine->GetTabBoxes().size();
for( size_t nCol = 0; nCol < nCols; ++nCol )
@@ -1824,7 +1824,7 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
}
for( size_t nRow = 0; nRow < nLineCnt; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
const size_t nCols = pLine->GetTabBoxes().size();
long nRight = 0;
for( size_t nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
@@ -1843,17 +1843,17 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
*/
void SwTable::PrepareDeleteCol( long nMin, long nMax )
{
- OSL_ENSURE( bNewModel, "Don't call me for old tables" );
- if( aLines.empty() || nMax < nMin )
+ OSL_ENSURE( m_bNewModel, "Don't call me for old tables" );
+ if( m_aLines.empty() || nMax < nMin )
return;
long nMid = nMin ? ( nMin + nMax ) / 2 : 0;
const SwTwips nTabSize = GetFrameFormat()->GetFrmSize().GetWidth();
if( nTabSize == nMax )
nMid = nMax;
- const size_t nLineCnt = aLines.size();
+ const size_t nLineCnt = m_aLines.size();
for( size_t nRow = 0; nRow < nLineCnt; ++nRow )
{
- SwTableLine* pLine = aLines[nRow];
+ SwTableLine* pLine = m_aLines[nRow];
const size_t nCols = pLine->GetTabBoxes().size();
long nRight = 0;
for( size_t nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 700446659e18..76043c66abf6 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -212,27 +212,27 @@ void _InsTableBox( SwDoc* pDoc, SwTableNode* pTableNd,
SwTable::SwTable( SwTableFormat* pFormat )
: SwClient( pFormat ),
- pHTMLLayout( 0 ),
- pTableNode( 0 ),
- nGrfsThatResize( 0 ),
- nRowsToRepeat( 1 ),
- bModifyLocked( false ),
- bNewModel( true )
+ m_pHTMLLayout( 0 ),
+ m_pTableNode( 0 ),
+ m_nGraphicsThatResize( 0 ),
+ m_nRowsToRepeat( 1 ),
+ m_bModifyLocked( false ),
+ m_bNewModel( true )
{
// default value set in the options
- eTableChgMode = (TableChgMode)GetTableChgDefaultMode();
+ m_eTableChgMode = (TableChgMode)GetTableChgDefaultMode();
}
SwTable::SwTable( const SwTable& rTable )
: SwClient( rTable.GetFrameFormat() ),
- pHTMLLayout( 0 ),
- pTableNode( 0 ),
- eTableChgMode( rTable.eTableChgMode ),
- nGrfsThatResize( 0 ),
- nRowsToRepeat( rTable.GetRowsToRepeat() ),
+ m_pHTMLLayout( 0 ),
+ m_pTableNode( 0 ),
+ m_eTableChgMode( rTable.m_eTableChgMode ),
+ m_nGraphicsThatResize( 0 ),
+ m_nRowsToRepeat( rTable.GetRowsToRepeat() ),
maTableStyleName(rTable.maTableStyleName),
- bModifyLocked( false ),
- bNewModel( rTable.bNewModel )
+ m_bModifyLocked( false ),
+ m_bNewModel( rTable.m_bNewModel )
{
}
@@ -246,13 +246,13 @@ void DelBoxNode( SwTableSortBoxes& rSortCntBoxes )
SwTable::~SwTable()
{
- if( refObj.Is() )
+ if( m_xRefObj.Is() )
{
SwDoc* pDoc = GetFrameFormat()->GetDoc();
if( !pDoc->IsInDtor() ) // then remove from the list
- pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( &refObj );
+ pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( &m_xRefObj );
- refObj->Closed();
+ m_xRefObj->Closed();
}
// the table can be deleted if it's the last client of the FrameFormat
@@ -268,7 +268,7 @@ SwTable::~SwTable()
// section need deletion.
DelBoxNode(m_TabSortContentBoxes);
m_TabSortContentBoxes.clear();
- delete pHTMLLayout;
+ delete m_pHTMLLayout;
}
namespace
@@ -381,8 +381,8 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
void SwTable::AdjustWidths( const long nOld, const long nNew )
{
std::vector<SwFormat*> aFormatArr;
- aFormatArr.reserve( aLines[0]->GetTabBoxes().size() );
- ::lcl_ModifyLines( aLines, nOld, nNew, aFormatArr, true );
+ aFormatArr.reserve( m_aLines[0]->GetTabBoxes().size() );
+ ::lcl_ModifyLines( m_aLines, nOld, nNew, aFormatArr, true );
}
static void lcl_RefreshHidden( SwTabCols &rToFill, size_t nPos )
@@ -600,8 +600,8 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
// 4.
if ( !bCurRowOnly )
{
- for ( size_t i = 0; i < aLines.size(); ++i )
- ::lcl_ProcessLineGet( aLines[i], rToFill, pTabFormat );
+ for ( size_t i = 0; i < m_aLines.size(); ++i )
+ ::lcl_ProcessLineGet( m_aLines[i], rToFill, pTabFormat );
}
rToFill.Remove( 0 );
@@ -991,9 +991,9 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
{
// do some checking for correct table widths
SwTwips nSize = GetFrameFormat()->GetFrmSize().GetWidth();
- for (size_t n = 0; n < aLines.size(); ++n)
+ for (size_t n = 0; n < m_aLines.size(); ++n)
{
- _CheckBoxWidth( *aLines[ n ], nSize );
+ _CheckBoxWidth( *m_aLines[ n ], nSize );
}
}
#endif
@@ -1950,21 +1950,21 @@ SwTableNode* SwTable::GetTableNode() const
{
return !GetTabSortBoxes().empty() ?
const_cast<SwTableNode*>(GetTabSortBoxes()[ 0 ]->GetSttNd()->FindTableNode()) :
- pTableNode;
+ m_pTableNode;
}
void SwTable::SetRefObject( SwServerObject* pObj )
{
- if( refObj.Is() )
- refObj->Closed();
+ if( m_xRefObj.Is() )
+ m_xRefObj->Closed();
- refObj = pObj;
+ m_xRefObj = pObj;
}
void SwTable::SetHTMLTableLayout( SwHTMLTableLayout *p )
{
- delete pHTMLLayout;
- pHTMLLayout = p;
+ delete m_pHTMLLayout;
+ m_pHTMLLayout = p;
}
void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,