summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-29 08:38:06 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-29 08:38:38 +0100
commitb0f7efe83096655348d32782636bf0f54d837834 (patch)
treee9d0e3dee6f0e76e0cdcfeece1f3c367b2b5183d
parentdbcc527e14f5c45694dac3e6751b00b89be9bd58 (diff)
sw: prefix members of SwNodes
Change-Id: I51a8161eeaa781ccace08605b97a0092f972b3bf
-rw-r--r--sw/inc/ndarr.hxx36
-rw-r--r--sw/inc/ndindex.hxx14
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/docnode/ndnum.cxx14
-rw-r--r--sw/source/core/docnode/nodes.cxx94
5 files changed, 81 insertions, 81 deletions
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 732fdc203af7..c3c1f5030b7a 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -95,7 +95,7 @@ class SW_DLLPUBLIC SwNodes
friend class SwStartNode;
friend class ::sw::DocumentContentOperationsManager;
- SwNodeIndex* vIndices; ///< ring of all indices on nodes.
+ SwNodeIndex* m_vIndices; ///< ring of all indices on nodes.
void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, bool bDel );
void InsertNode( const SwNodePtr pNode,
@@ -103,18 +103,18 @@ class SW_DLLPUBLIC SwNodes
void InsertNode( const SwNodePtr pNode,
sal_uLong nPos );
- SwDoc* pMyDoc; ///< This Doc contains the nodes-array.
+ SwDoc* m_pMyDoc; ///< This Doc contains the nodes-array.
- SwNode *pEndOfPostIts, *pEndOfInserts, ///< These are the fixed ranges.
- *pEndOfAutotext, *pEndOfRedlines,
- *pEndOfContent;
+ SwNode *m_pEndOfPostIts, *m_pEndOfInserts, ///< These are the fixed ranges.
+ *m_pEndOfAutotext, *m_pEndOfRedlines,
+ *m_pEndOfContent;
- mutable SwOutlineNodes* pOutlineNds; ///< Array of all outline nodes.
+ mutable SwOutlineNodes* m_pOutlineNodes; ///< Array of all outline nodes.
- bool bInNodesDel : 1; /**< In Case of recursive calling.
+ bool m_bInNodesDel : 1; /**< In Case of recursive calling.
Do not update Num/Outline. */
- bool bInDelUpdOutl : 1; ///< Flag for updating of Outline.
- bool bInDelUpdNum : 1; ///< Flag for updating of Outline.
+ bool m_bInDelUpdOutline : 1; ///< Flag for updating of Outline.
+ bool m_bInDelUpdNum : 1; ///< Flag for updating of Outline.
// Actions on the nodes.
static void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
@@ -150,18 +150,18 @@ public:
FnForEach_SwNodes fnForEach, void* pArgs = 0 );
/// A still empty section.
- SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; }
+ SwNode& GetEndOfPostIts() const { return *m_pEndOfPostIts; }
/// Section fpr all footnotes.
- SwNode& GetEndOfInserts() const { return *pEndOfInserts; }
+ SwNode& GetEndOfInserts() const { return *m_pEndOfInserts; }
/// Section for all Flys/Header/Footers.
- SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; }
+ SwNode& GetEndOfAutotext() const { return *m_pEndOfAutotext; }
/// Section for all Redlines.
- SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; }
+ SwNode& GetEndOfRedlines() const { return *m_pEndOfRedlines; }
/** This is the last EndNode of a special section. After it
there is only the regular ContentSection (i.e. the BodyText). */
- SwNode& GetEndOfExtras() const { return *pEndOfRedlines; }
+ SwNode& GetEndOfExtras() const { return *m_pEndOfRedlines; }
/// Regular ContentSection (i.e. the BodyText).
- SwNode& GetEndOfContent() const { return *pEndOfContent; }
+ SwNode& GetEndOfContent() const { return *m_pEndOfContent; }
/** Is the NodesArray the regular one of Doc? (and not the UndoNds, ...)
Implementation in doc.hxx (because one needs to know Doc for it) ! */
@@ -235,7 +235,7 @@ public:
SwAttrSet* pAutoAttr ); ///< in ndole.cxx
/// Array of all OutlineNodes.
- const SwOutlineNodes& GetOutLineNds() const { return *pOutlineNds;}
+ const SwOutlineNodes& GetOutLineNds() const { return *m_pOutlineNodes;}
/// Update all Nodes - Rule/Format-Change.
void UpdateOutlineNode(SwNode & rNd);
@@ -308,8 +308,8 @@ public:
bool const bCreateFrms = true);
/// Which Doc contains the nodes-array?
- SwDoc* GetDoc() { return pMyDoc; }
- const SwDoc* GetDoc() const { return pMyDoc; }
+ SwDoc* GetDoc() { return m_pMyDoc; }
+ const SwDoc* GetDoc() const { return m_pMyDoc; }
/** Search previous / next content node or table node with frames.
If no end is given begin with the FrameIndex, else start search
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index 5d40d86b8445..9f658b4c9c46 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -41,17 +41,17 @@ class SW_DLLPUBLIC SwNodeIndex final : public sw::Ring<SwNodeIndex>
SwNodeIndex( SwNodes& rNds, int nIdx ) = delete;
void RegisterIndex( SwNodes& rNodes )
{
- if(!rNodes.vIndices)
- rNodes.vIndices = this;
- MoveTo(rNodes.vIndices);
+ if(!rNodes.m_vIndices)
+ rNodes.m_vIndices = this;
+ MoveTo(rNodes.m_vIndices);
}
void DeRegisterIndex( SwNodes& rNodes )
{
- if(rNodes.vIndices == this)
- rNodes.vIndices = GetNextInRing();
+ if(rNodes.m_vIndices == this)
+ rNodes.m_vIndices = GetNextInRing();
MoveTo(nullptr);
- if(rNodes.vIndices == this)
- rNodes.vIndices = nullptr;
+ if(rNodes.m_vIndices == this)
+ rNodes.m_vIndices = nullptr;
}
public:
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 93820dc8e622..9fcbde5c0247 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -447,9 +447,9 @@ SwDoc::~SwDoc()
// The ChapterNumbers/Numbers need to be deleted before the styles
// or we update all the time!
- m_pNodes->pOutlineNds->clear();
+ m_pNodes->m_pOutlineNodes->clear();
SwNodes & rUndoNodes( GetUndoManager().GetUndoNodes() );
- rUndoNodes.pOutlineNds->clear();
+ rUndoNodes.m_pOutlineNodes->clear();
mpFootnoteIdxs->clear();
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index 7a5afbdf3619..78d0b98e4139 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -43,7 +43,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
if (pTextNd && pTextNd->IsOutlineStateChanged())
{
- bool bFound = pOutlineNds->find(pTextNd) != pOutlineNds->end();
+ bool bFound = m_pOutlineNodes->find(pTextNd) != m_pOutlineNodes->end();
if (pTextNd->IsOutline())
{
@@ -52,7 +52,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
// assure that text is in the correct nodes array
if ( &(pTextNd->GetNodes()) == this )
{
- pOutlineNds->insert(pTextNd);
+ m_pOutlineNodes->insert(pTextNd);
}
else
{
@@ -63,7 +63,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
else
{
if (bFound)
- pOutlineNds->erase(pTextNd);
+ m_pOutlineNodes->erase(pTextNd);
}
pTextNd->UpdateOutlineState();
@@ -75,22 +75,22 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
void SwNodes::UpdateOutlineIdx( const SwNode& rNd )
{
- if( pOutlineNds->empty() ) // no OutlineNodes present ?
+ if( m_pOutlineNodes->empty() ) // no OutlineNodes present ?
return;
const SwNodePtr pSrch = const_cast<SwNodePtr>(&rNd);
sal_uInt16 nPos;
- if (!pOutlineNds->Seek_Entry(pSrch, &nPos))
+ if (!m_pOutlineNodes->Seek_Entry(pSrch, &nPos))
return;
- if( nPos == pOutlineNds->size() ) // none present for updating ?
+ if( nPos == m_pOutlineNodes->size() ) // none present for updating ?
return;
if( nPos )
--nPos;
if( !GetDoc()->IsInDtor() && IsDocNodes() )
- UpdateOutlineNode( *(*pOutlineNds)[ nPos ]);
+ UpdateOutlineNode( *(*m_pOutlineNodes)[ nPos ]);
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index b82a3c221631..92150288f966 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -59,32 +59,32 @@ sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
* @param pDocument TODO: provide documentation
*/
SwNodes::SwNodes( SwDoc* pDocument )
- : vIndices(nullptr), pMyDoc( pDocument )
+ : m_vIndices(nullptr), m_pMyDoc( pDocument )
{
- bInNodesDel = bInDelUpdOutl = bInDelUpdNum = false;
+ m_bInNodesDel = m_bInDelUpdOutline = m_bInDelUpdNum = false;
- OSL_ENSURE( pMyDoc, "in which Doc am I?" );
+ OSL_ENSURE( m_pMyDoc, "in which Doc am I?" );
sal_uLong nPos = 0;
SwStartNode* pSttNd = new SwStartNode( *this, nPos++ );
- pEndOfPostIts = new SwEndNode( *this, nPos++, *pSttNd );
+ m_pEndOfPostIts = new SwEndNode( *this, nPos++, *pSttNd );
SwStartNode* pTmp = new SwStartNode( *this, nPos++ );
- pEndOfInserts = new SwEndNode( *this, nPos++, *pTmp );
+ m_pEndOfInserts = new SwEndNode( *this, nPos++, *pTmp );
pTmp = new SwStartNode( *this, nPos++ );
pTmp->pStartOfSection = pSttNd;
- pEndOfAutotext = new SwEndNode( *this, nPos++, *pTmp );
+ m_pEndOfAutotext = new SwEndNode( *this, nPos++, *pTmp );
pTmp = new SwStartNode( *this, nPos++ );
pTmp->pStartOfSection = pSttNd;
- pEndOfRedlines = new SwEndNode( *this, nPos++, *pTmp );
+ m_pEndOfRedlines = new SwEndNode( *this, nPos++, *pTmp );
pTmp = new SwStartNode( *this, nPos++ );
pTmp->pStartOfSection = pSttNd;
- pEndOfContent = new SwEndNode( *this, nPos++, *pTmp );
+ m_pEndOfContent = new SwEndNode( *this, nPos++, *pTmp );
- pOutlineNds = new SwOutlineNodes;
+ m_pOutlineNodes = new SwOutlineNodes;
}
/** Destructor
@@ -95,14 +95,14 @@ SwNodes::SwNodes( SwDoc* pDocument )
*/
SwNodes::~SwNodes()
{
- delete pOutlineNds;
+ delete m_pOutlineNodes;
{
SwNodeIndex aNdIdx( *this );
while( true )
{
SwNode *pNode = &aNdIdx.GetNode();
- if( pNode == pEndOfContent )
+ if( pNode == m_pEndOfContent )
break;
++aNdIdx;
@@ -111,7 +111,7 @@ SwNodes::~SwNodes()
}
// here, all SwNodeIndices must be unregistered
- delete pEndOfContent;
+ delete m_pEndOfContent;
}
void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
@@ -157,7 +157,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if (pTextNode->IsOutline())
{
const SwNodePtr pSrch = &rNd;
- pOutlineNds->erase( pSrch );
+ m_pOutlineNodes->erase( pSrch );
}
}
@@ -172,7 +172,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
if (bInsOutlineIdx && rTextNd.IsOutline())
{
const SwNodePtr pSrch = &rNd;
- pOutlineNds->insert( pSrch );
+ m_pOutlineNodes->insert( pSrch );
}
rTextNd.InvalidateNumRule();
@@ -215,7 +215,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// remove outline index from old nodes array
if (pTextNd->IsOutline())
{
- pOutlineNds->erase( pNd );
+ m_pOutlineNodes->erase( pNd );
}
// copy rules if needed
@@ -252,7 +252,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
// OultineNodes set the new nodes in the array
if (bInsOutlineIdx && pTextNd->IsOutline())
{
- rNds.pOutlineNds->insert( pTextNd );
+ rNds.m_pOutlineNodes->insert( pTextNd );
}
pTextNd->AddToList();
@@ -515,7 +515,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// remove outline index from old nodes array
if (pCNd->IsTextNode() && pCNd->GetTextNode()->IsOutline())
{
- pOutlineNds->erase( pCNd );
+ m_pOutlineNodes->erase( pCNd );
}
else
pCNd = 0;
@@ -524,7 +524,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
BigPtrArray::Move( aMvIdx.GetIndex(), aIdx.GetIndex() );
if( bInsOutlineIdx && pCNd )
- pOutlineNds->insert( pCNd );
+ m_pOutlineNodes->insert( pCNd );
if( pTmpNd->IsTextNode() )
static_cast<SwTextNode*>(pTmpNd)->AddToList();
}
@@ -548,7 +548,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
const bool bOutlNd = pNd->IsTextNode() && pNd->GetTextNode()->IsOutline();
// delete outline indices from old node array
if( bOutlNd )
- pOutlineNds->erase( pNd );
+ m_pOutlineNodes->erase( pNd );
RemoveNode( aMvIdx.GetIndex(), 1, false );
pNd->pStartOfSection = pSttNode;
@@ -557,7 +557,7 @@ bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// set correct indices in Start/EndNodes
if( bInsOutlineIdx && bOutlNd )
// and put them into the new node array
- rNodes.pOutlineNds->insert( pNd );
+ rNodes.m_pOutlineNodes->insert( pNd );
else if( pNd->IsStartNode() )
pSttNode = static_cast<SwStartNode*>(pNd);
else if( pNd->IsEndNode() )
@@ -1100,8 +1100,8 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
// problems if aEnd == aStart and aEnd is deleted, so aEnd <= aStart)
--aRg.aStart;
- bool bSaveInNodesDel = bInNodesDel;
- bInNodesDel = true;
+ bool bSaveInNodesDel = m_bInNodesDel;
+ m_bInNodesDel = true;
bool bUpdateOutline = false;
// loop until everything is deleted
@@ -1127,10 +1127,10 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
{
SwTextNode *const pTextNode(pNd->GetTextNode());
if (pTextNode->IsOutline() &&
- pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
+ m_pOutlineNodes->Seek_Entry( pNd, &nIdxPos ))
{
// remove outline indices
- pOutlineNds->erase(nIdxPos);
+ m_pOutlineNodes->erase(nIdxPos);
bUpdateOutline = true;
}
pTextNode->InvalidateNumRule();
@@ -1193,7 +1193,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
if( pTextNd->IsOutline())
{
// delete outline indices
- pOutlineNds->erase( pTextNd );
+ m_pOutlineNodes->erase( pTextNd );
bUpdateOutline = true;
}
pTextNd->InvalidateNumRule();
@@ -1220,22 +1220,22 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
--aRg.aStart;
}
- bInNodesDel = bSaveInNodesDel;
+ m_bInNodesDel = bSaveInNodesDel;
- if( !bInNodesDel )
+ if( !m_bInNodesDel )
{
// update numbering
- if( bUpdateOutline || bInDelUpdOutl )
+ if( bUpdateOutline || m_bInDelUpdOutline )
{
UpdateOutlineIdx( aRg.aEnd.GetNode() );
- bInDelUpdOutl = false;
+ m_bInDelUpdOutline = false;
}
}
else
{
if( bUpdateOutline )
- bInDelUpdOutl = true;
+ m_bInDelUpdOutline = true;
}
}
@@ -1331,16 +1331,16 @@ inline bool TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uL
bool SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const
{
sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
- if( TstIdx( nStt, nEnd, pEndOfContent->StartOfSectionIndex(),
- pEndOfContent->GetIndex() )) return true;
- if( TstIdx( nStt, nEnd, pEndOfAutotext->StartOfSectionIndex(),
- pEndOfAutotext->GetIndex() )) return true;
- if( TstIdx( nStt, nEnd, pEndOfPostIts->StartOfSectionIndex(),
- pEndOfPostIts->GetIndex() )) return true;
- if( TstIdx( nStt, nEnd, pEndOfInserts->StartOfSectionIndex(),
- pEndOfInserts->GetIndex() )) return true;
- if( TstIdx( nStt, nEnd, pEndOfRedlines->StartOfSectionIndex(),
- pEndOfRedlines->GetIndex() )) return true;
+ if( TstIdx( nStt, nEnd, m_pEndOfContent->StartOfSectionIndex(),
+ m_pEndOfContent->GetIndex() )) return true;
+ if( TstIdx( nStt, nEnd, m_pEndOfAutotext->StartOfSectionIndex(),
+ m_pEndOfAutotext->GetIndex() )) return true;
+ if( TstIdx( nStt, nEnd, m_pEndOfPostIts->StartOfSectionIndex(),
+ m_pEndOfPostIts->GetIndex() )) return true;
+ if( TstIdx( nStt, nEnd, m_pEndOfInserts->StartOfSectionIndex(),
+ m_pEndOfInserts->GetIndex() )) return true;
+ if( TstIdx( nStt, nEnd, m_pEndOfRedlines->StartOfSectionIndex(),
+ m_pEndOfRedlines->GetIndex() )) return true;
return false; // is somewhere in the middle, ERROR
}
@@ -1358,9 +1358,9 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
// The whole nodes array will be destroyed, you're in the Doc's DTOR!
// The initial start/end nodes should be only destroyed in the SwNodes' DTOR!
- SwNode* aEndNdArr[] = { pEndOfContent,
- pEndOfPostIts, pEndOfInserts,
- pEndOfAutotext, pEndOfRedlines,
+ SwNode* aEndNdArr[] = { m_pEndOfContent,
+ m_pEndOfPostIts, m_pEndOfInserts,
+ m_pEndOfAutotext, m_pEndOfRedlines,
0
};
@@ -1387,9 +1387,9 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
// remove the outline indices
sal_uInt16 nIdxPos;
- if( pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
+ if( m_pOutlineNodes->Seek_Entry( pNd, &nIdxPos ))
{
- pOutlineNds->erase(nIdxPos);
+ m_pOutlineNodes->erase(nIdxPos);
bUpdateNum = 1;
}
}
@@ -2266,7 +2266,7 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
sal_uLong nEnd = nDelPos + nSz;
SwNode* pNew = (*this)[ nEnd ];
- for (SwNodeIndex& rIndex : vIndices->GetRingContainer())
+ for (SwNodeIndex& rIndex : m_vIndices->GetRingContainer())
{
sal_uLong const nIdx = rIndex.GetIndex();
if (nDelPos <= nIdx && nIdx < nEnd)
@@ -2345,7 +2345,7 @@ SwNode * SwNodes::DocumentSectionEndNode(SwNode * pNode) const
bool SwNodes::IsDocNodes() const
{
- return this == &pMyDoc->GetNodes();
+ return this == &m_pMyDoc->GetNodes();
}
void SwNodes::dumpAsXml(xmlTextWriterPtr pWriter) const