summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-05 09:13:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-05 10:04:44 +0200
commit837ee0de927a6ab6ac75b1044a3363c3484710a3 (patch)
tree5475ca529352d1b038ebff1d4cdd809623e017e1
parent8a029e4a39d9afda5334bc546338645241f656d6 (diff)
sw: prefix members of SwUndRng
See tdf#94879 for motivation. Change-Id: Ie028e421b44f66e8db3941c6dcd142f830e6e343 Reviewed-on: https://gerrit.libreoffice.org/76963 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/inc/undobj.hxx4
-rw-r--r--sw/source/core/inc/UndoRedline.hxx4
-rw-r--r--sw/source/core/inc/UndoSplitMove.hxx2
-rw-r--r--sw/source/core/undo/unattr.cxx16
-rw-r--r--sw/source/core/undo/undel.cxx88
-rw-r--r--sw/source/core/undo/undobj.cxx52
-rw-r--r--sw/source/core/undo/unmove.cxx26
-rw-r--r--sw/source/core/undo/unnum.cxx30
-rw-r--r--sw/source/core/undo/unredln.cxx40
-rw-r--r--sw/source/core/undo/unsect.cxx8
-rw-r--r--sw/source/core/undo/unsort.cxx14
-rw-r--r--sw/source/core/undo/untbl.cxx14
-rw-r--r--sw/source/core/undo/untblk.cxx36
13 files changed, 167 insertions, 167 deletions
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 3128ffc788d5..8d7afa1bc046 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -215,8 +215,8 @@ public:
class SwUndRng
{
public:
- sal_uLong nSttNode, nEndNode;
- sal_Int32 nSttContent, nEndContent;
+ sal_uLong m_nSttNode, m_nEndNode;
+ sal_Int32 m_nSttContent, m_nEndContent;
SwUndRng();
SwUndRng( const SwPaM& );
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index e2c75db6aa1b..38ecd86314cb 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -68,8 +68,8 @@ public:
bool CanGrouping( const SwUndoRedlineDelete& rPrev );
// SwUndoTableCpyTable needs this information:
- long NodeDiff() const { return nSttNode - nEndNode; }
- sal_Int32 ContentStart() const { return nSttContent; }
+ long NodeDiff() const { return m_nSttNode - m_nEndNode; }
+ sal_Int32 ContentStart() const { return m_nSttContent; }
void SetRedlineText(const OUString & rText);
};
diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx
index 6641611da7f5..a21b249b2509 100644
--- a/sw/source/core/inc/UndoSplitMove.hxx
+++ b/sw/source/core/inc/UndoSplitMove.hxx
@@ -75,7 +75,7 @@ public:
const SwNodeIndex& rInsPos );
bool IsMoveRange() const { return m_bMoveRange; }
- sal_uLong GetEndNode() const { return nEndNode; }
+ sal_uLong GetEndNode() const { return m_nEndNode; }
sal_uLong GetDestSttNode() const { return m_nDestStartNode; }
sal_Int32 GetDestSttContent() const { return m_nDestStartContent; }
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index e389d4341dab..ca1c30ddaebd 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -567,8 +567,8 @@ SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFormatId )
, m_pHistory( new SwHistory )
, m_nFormatId( nFormatId )
{
- nSttNode = nEndNode = rPos.nNode.GetIndex();
- nSttContent = nEndContent = rPos.nContent.GetIndex();
+ m_nSttNode = m_nEndNode = rPos.nNode.GetIndex();
+ m_nSttContent = m_nEndContent = rPos.nContent.GetIndex();
}
SwUndoResetAttr::~SwUndoResetAttr()
@@ -583,10 +583,10 @@ void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & rContext)
m_pHistory->SetTmpEnd( m_pHistory->Count() );
if ((RES_CONDTXTFMTCOLL == m_nFormatId) &&
- (nSttNode == nEndNode) && (nSttContent == nEndContent)) {
- SwTextNode* pTNd = rDoc.GetNodes()[ nSttNode ]->GetTextNode();
+ (m_nSttNode == m_nEndNode) && (m_nSttContent == m_nEndContent)) {
+ SwTextNode* pTNd = rDoc.GetNodes()[ m_nSttNode ]->GetTextNode();
if( pTNd ) {
- SwIndex aIdx( pTNd, nSttContent );
+ SwIndex aIdx( pTNd, m_nSttContent );
pTNd->DontExpandFormat( aIdx, false );
}
}
@@ -614,9 +614,9 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & rContext)
// special treatment for TOXMarks
{
SwTOXMarks aArr;
- SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
+ SwNodeIndex aIdx( rDoc.GetNodes(), m_nSttNode );
SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetContentNode(),
- nSttContent ));
+ m_nSttContent ));
sal_uInt16 nCnt = SwDoc::GetCurTOXMark( aPos, aArr );
if( nCnt ) {
@@ -725,7 +725,7 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext)
if ( ULONG_MAX != m_nNodeIndex ) {
aPam.DeleteMark();
aPam.GetPoint()->nNode = m_nNodeIndex;
- aPam.GetPoint()->nContent.Assign( aPam.GetContentNode(), nSttContent );
+ aPam.GetPoint()->nContent.Assign( aPam.GetContentNode(), m_nSttContent );
aPam.SetMark();
++aPam.GetPoint()->nContent;
pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index a53458952594..83536dba8f31 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -72,19 +72,19 @@ static SwTextNode * FindFirstAndNextNode(SwDoc & rDoc, SwUndRng const& rRange,
SwTextNode *& o_rpFirstMergedDeletedTextNode)
{
// redlines are corrected now to exclude the deleted node
- assert(rRange.nEndContent == 0);
+ assert(rRange.m_nEndContent == 0);
sal_uLong nEndOfRedline = 0;
for (size_t i = 0; i < rRedlineSaveData.size(); ++i)
{
auto const& rRedline(rRedlineSaveData[i]);
- if (rRedline.nSttNode <= rRange.nSttNode
- && rRedline.nSttNode < rRange.nEndNode
- && rRange.nEndNode <= rRedline.nEndNode
+ if (rRedline.m_nSttNode <= rRange.m_nSttNode
+ && rRedline.m_nSttNode < rRange.m_nEndNode
+ && rRange.m_nEndNode <= rRedline.m_nEndNode
&& rRedline.GetType() == RedlineType::Delete)
{
- nEndOfRedline = rRedline.nEndNode;
- o_rpFirstMergedDeletedTextNode = rDoc.GetNodes()[rRedline.nSttNode]->GetTextNode();
- assert(rRange.nSttNode == rRange.nEndNode - 1); // otherwise this needs to iterate more RL to find the first node?
+ nEndOfRedline = rRedline.m_nEndNode;
+ o_rpFirstMergedDeletedTextNode = rDoc.GetNodes()[rRedline.m_nSttNode]->GetTextNode();
+ assert(rRange.m_nSttNode == rRange.m_nEndNode - 1); // otherwise this needs to iterate more RL to find the first node?
break;
}
}
@@ -92,7 +92,7 @@ static SwTextNode * FindFirstAndNextNode(SwDoc & rDoc, SwUndRng const& rRange,
{
assert(o_rpFirstMergedDeletedTextNode);
SwTextNode * pNextNode(nullptr);
- for (sal_uLong i = rRange.nEndNode; /* i <= nEndOfRedline */; ++i)
+ for (sal_uLong i = rRange.m_nEndNode; /* i <= nEndOfRedline */; ++i)
{
SwNode *const pNode(rDoc.GetNodes()[i]);
assert(!pNode->IsEndNode()); // cannot be both leaving section here *and* overlapping redline
@@ -228,7 +228,7 @@ SwUndoDelete::SwUndoDelete(
{
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
- if (nEndNode - nSttNode > 1) // check for fully selected nodes
+ if (m_nEndNode - m_nSttNode > 1) // check for fully selected nodes
{
SwNodeIndex const start(pStt->nNode, +1);
DelBookmarks(start, pEnd->nNode);
@@ -238,7 +238,7 @@ SwUndoDelete::SwUndoDelete(
m_nSetPos = pHistory ? pHistory->Count() : 0;
// Is already anything deleted?
- m_nNdDiff = nSttNode - pStt->nNode.GetIndex();
+ m_nNdDiff = m_nSttNode - pStt->nNode.GetIndex();
m_bJoinNext = !bFullPara && pEnd == rPam.GetPoint();
m_bBackSp = !bFullPara && !m_bJoinNext;
@@ -247,7 +247,7 @@ SwUndoDelete::SwUndoDelete(
if( !bFullPara )
{
pSttTextNd = pStt->nNode.GetNode().GetTextNode();
- pEndTextNd = nSttNode == nEndNode
+ pEndTextNd = m_nSttNode == m_nEndNode
? pSttTextNd
: pEnd->nNode.GetNode().GetTextNode();
}
@@ -293,21 +293,21 @@ SwUndoDelete::SwUndoDelete(
rPam.DeleteMark(); // the SPoint is in the selection
if( !pEndTextNd )
- nEndContent = 0;
+ m_nEndContent = 0;
if( !pSttTextNd )
- nSttContent = 0;
+ m_nSttContent = 0;
if( bMoveNds ) // Do Nodes exist that need to be moved?
{
SwNodes& rNds = pDoc->GetUndoManager().GetUndoNodes();
SwNodes& rDocNds = pDoc->GetNodes();
- SwNodeRange aRg( rDocNds, nSttNode - m_nNdDiff,
- rDocNds, nEndNode - m_nNdDiff );
+ SwNodeRange aRg( rDocNds, m_nSttNode - m_nNdDiff,
+ rDocNds, m_nEndNode - m_nNdDiff );
if( !bFullPara && !pEndTextNd &&
&aRg.aEnd.GetNode() != &pDoc->GetNodes().GetEndOfContent() )
{
SwNode* pNode = aRg.aEnd.GetNode().StartOfSectionNode();
- if( pNode->GetIndex() >= nSttNode - m_nNdDiff )
+ if( pNode->GetIndex() >= m_nSttNode - m_nNdDiff )
++aRg.aEnd; // Deletion of a complete table
}
SwNode* pTmpNd;
@@ -321,7 +321,7 @@ SwUndoDelete::SwUndoDelete(
pTmpNd->StartOfSectionNode()->IsSectionNode() &&
pTmpNd->StartOfSectionNode()->GetIndex() >= aRg.aStart.GetIndex() ) )
++aRg.aEnd;
- m_nReplaceDummy = aRg.aEnd.GetIndex() + m_nNdDiff - nEndNode;
+ m_nReplaceDummy = aRg.aEnd.GetIndex() + m_nNdDiff - m_nEndNode;
if( m_nReplaceDummy )
{ // The selection has been expanded, because
++aRg.aEnd;
@@ -352,7 +352,7 @@ SwUndoDelete::SwUndoDelete(
--aRg.aStart;
if( pSttTextNd )
{
- m_nReplaceDummy = nSttNode - m_nNdDiff - aRg.aStart.GetIndex();
+ m_nReplaceDummy = m_nSttNode - m_nNdDiff - aRg.aStart.GetIndex();
if( m_nReplaceDummy )
{
SwNodeRange aMvRg( *pSttTextNd, 0, *pSttTextNd, 1 );
@@ -417,12 +417,12 @@ SwUndoDelete::SwUndoDelete(
// have ContentNodes)?
if( !pSttTextNd && !pEndTextNd )
{
- m_nNdDiff = nSttNode - rPam.GetPoint()->nNode.GetIndex() - (bFullPara ? 0 : 1);
+ m_nNdDiff = m_nSttNode - rPam.GetPoint()->nNode.GetIndex() - (bFullPara ? 0 : 1);
rPam.Move( fnMoveForward, GoInNode );
}
else
{
- m_nNdDiff = nSttNode;
+ m_nNdDiff = m_nSttNode;
if( m_nSectDiff && m_bBackSp )
m_nNdDiff += m_nSectDiff;
m_nNdDiff -= rPam.GetPoint()->nNode.GetIndex();
@@ -443,7 +443,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
// 1 - copy start in Start-String
if( pSttTextNd )
{
- bool bOneNode = nSttNode == nEndNode;
+ bool bOneNode = m_nSttNode == m_nEndNode;
SwRegHistory aRHst( *pSttTextNd, pHistory.get() );
// always save all text atttibutes because of possibly overlapping
// areas of on/off
@@ -460,7 +460,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
// delete now also the text (all attribute changes are added to
// UNDO history)
- m_aSttStr = pSttTextNd->GetText().copy(nSttContent, nLen);
+ m_aSttStr = pSttTextNd->GetText().copy(m_nSttContent, nLen);
pSttTextNd->EraseText( pStt->nContent, nLen );
if( pSttTextNd->GetpSwpHints() )
pSttTextNd->GetpSwpHints()->DeRegister();
@@ -509,7 +509,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
}
// if there are only two Nodes then we're done
- if( ( pSttTextNd || pEndTextNd ) && nSttNode + 1 == nEndNode )
+ if( ( pSttTextNd || pEndTextNd ) && m_nSttNode + 1 == m_nEndNode )
return false; // do not move any Node
return true; // move Nodes lying in between
@@ -522,7 +522,7 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
return false;
// only the deletion of single char's can be condensed
- if( nSttNode != nEndNode || ( !m_bGroup && nSttContent+1 != nEndContent ))
+ if( m_nSttNode != m_nEndNode || ( !m_bGroup && m_nSttContent+1 != m_nEndContent ))
return false;
const SwPosition *pStt = rDelPam.Start(),
@@ -532,17 +532,17 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( pStt->nNode != pEnd->nNode ||
pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() ||
- pEnd->nNode != nSttNode )
+ pEnd->nNode != m_nSttNode )
return false;
// Distinguish between BackSpace and Delete because the Undo array needs to
// be constructed differently!
- if( pEnd->nContent == nSttContent )
+ if( pEnd->nContent == m_nSttContent )
{
if( m_bGroup && !m_bBackSp ) return false;
m_bBackSp = true;
}
- else if( pStt->nContent == nSttContent )
+ else if( pStt->nContent == m_nSttContent )
{
if( m_bGroup && m_bBackSp ) return false;
m_bBackSp = false;
@@ -578,10 +578,10 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
// Both 'deletes' can be consolidated, so 'move' the related character
if( m_bBackSp )
- nSttContent--; // BackSpace: add char to array!
+ m_nSttContent--; // BackSpace: add char to array!
else
{
- nEndContent++; // Delete: attach char at the end
+ m_nEndContent++; // Delete: attach char at the end
nUChrPos++;
}
m_aSttStr = m_aSttStr->replaceAt( nUChrPos, 0, OUString(cDelChar) );
@@ -836,7 +836,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc& rDoc = rContext.GetDoc();
- sal_uLong nCalcStt = nSttNode - m_nNdDiff;
+ sal_uLong nCalcStt = m_nSttNode - m_nNdDiff;
if( m_nSectDiff && m_bBackSp )
nCalcStt += m_nSectDiff;
@@ -855,12 +855,12 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
rDoc.GetDfltTextFormatColl() );
--aIdx;
aPos.nNode = aIdx;
- aPos.nContent.Assign( pInsNd->GetContentNode(), nSttContent );
+ aPos.nContent.Assign( pInsNd->GetContentNode(), m_nSttContent );
}
else
{
if( pInsNd->IsContentNode() )
- aPos.nContent.Assign( static_cast<SwContentNode*>(pInsNd), nSttContent );
+ aPos.nContent.Assign( static_cast<SwContentNode*>(pInsNd), m_nSttContent );
if( !m_bTableDelLastNd )
pInsNd = nullptr; // do not delete Node!
}
@@ -908,7 +908,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
SwTextNode * pNd = aPos.nNode.GetNode().GetTextNode();
if( pNd )
{
- if (nSttContent < pNd->GetText().getLength())
+ if (m_nSttContent < pNd->GetText().getLength())
{
sal_uLong nOldIdx = aPos.nNode.GetIndex();
rDoc.getIDocumentContentOperations().SplitNode( aPos, false );
@@ -957,7 +957,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
sal_uLong nMoveIndex;
if( m_bJoinNext )
{
- nMoveIndex = nEndNode - m_nNdDiff;
+ nMoveIndex = m_nEndNode - m_nNdDiff;
aPos.nNode = nMoveIndex + m_nReplaceDummy;
}
else
@@ -975,7 +975,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if( m_aSttStr )
{
- aPos.nNode = nSttNode - m_nNdDiff + ( m_bJoinNext ? 0 : m_nReplaceDummy );
+ aPos.nNode = m_nSttNode - m_nNdDiff + ( m_bJoinNext ? 0 : m_nReplaceDummy );
SwTextNode * pTextNd = aPos.nNode.GetNode().GetTextNode();
// If more than a single Node got deleted, also all "Node"
// attributes were saved
@@ -989,7 +989,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
// SectionNode mode and selection from top to bottom:
// -> in StartNode is still the rest of the Join => delete
- aPos.nContent.Assign( pTextNd, nSttContent );
+ aPos.nContent.Assign( pTextNd, m_nSttContent );
OUString const ins( pTextNd->InsertText(*m_aSttStr, aPos.nContent,
SwInsertFlags::NOHINTEXPAND) );
assert(ins.getLength() == m_aSttStr->getLength()); // must succeed
@@ -1026,7 +1026,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
sal_uInt16 nStt = m_bResetPgDesc ? sal_uInt16(RES_PAGEDESC) : sal_uInt16(RES_BREAK);
sal_uInt16 nEnd = m_bResetPgBrk ? sal_uInt16(RES_BREAK) : sal_uInt16(RES_PAGEDESC);
- SwNode* pNode = rDoc.GetNodes()[ nEndNode + 1 ];
+ SwNode* pNode = rDoc.GetNodes()[ m_nEndNode + 1 ];
if( pNode->IsContentNode() )
static_cast<SwContentNode*>(pNode)->ResetAttr( nStt, nEnd );
else if( pNode->IsTableNode() )
@@ -1039,7 +1039,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if( m_pRedlSaveData )
SetSaveData(rDoc, *m_pRedlSaveData);
- sal_uLong delFullParaEndNode(nEndNode);
+ sal_uLong delFullParaEndNode(m_nEndNode);
if (m_bDelFullPara && m_pRedlSaveData)
{
SwTextNode * pFirstMergedDeletedTextNode(nullptr);
@@ -1081,7 +1081,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{
// only now do we have redlines in the document again; fix up the split
// frames
- SwTextNode *const pStartNode(aIdx.GetNodes()[nSttNode]->GetTextNode());
+ SwTextNode *const pStartNode(aIdx.GetNodes()[m_nSttNode]->GetTextNode());
assert(pStartNode);
std::vector<SwTextFrame*> frames;
SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pStartNode);
@@ -1115,13 +1115,13 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
// tdf#121031 if the start node is a text node, it already has a frame;
// if it's a table, it does not
// tdf#109376 exception: end on non-text-node -> start node was inserted
- SwNodeIndex const start(rDoc.GetNodes(), nSttNode +
- ((m_bDelFullPara || !rDoc.GetNodes()[nSttNode]->IsTextNode() || pInsNd)
+ SwNodeIndex const start(rDoc.GetNodes(), m_nSttNode +
+ ((m_bDelFullPara || !rDoc.GetNodes()[m_nSttNode]->IsTextNode() || pInsNd)
? 0 : 1));
// don't include end node in the range: it may have been merged already
// by the start node, or it may be merged by one of the moved nodes,
// but if it isn't merged, its current frame(s) should be good...
- SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara ? delFullParaEndNode : nEndNode);
+ SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara ? delFullParaEndNode : m_nEndNode);
::MakeFrames(&rDoc, start, end);
}
@@ -1235,7 +1235,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
else if (*rPam.GetMark() == *rPam.GetPoint())
{ // paragraph with only footnote or as-char fly, delete that
// => DelContentIndex has already deleted it! nothing to do here
- assert(nEndNode == nSttNode);
+ assert(m_nEndNode == m_nSttNode);
return;
}
@@ -1252,7 +1252,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
rPam.DeleteMark();
- rDoc.GetNodes().Delete( aSttIdx, nEndNode - nSttNode );
+ rDoc.GetNodes().Delete( aSttIdx, m_nEndNode - m_nSttNode );
}
else if( m_bDelFullPara )
{
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index fccab47e8f27..a07b873c5922 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -44,7 +44,7 @@
// This class saves the Pam as integers and can recompose those into a PaM
SwUndRng::SwUndRng()
- : nSttNode( 0 ), nEndNode( 0 ), nSttContent( 0 ), nEndContent( 0 )
+ : m_nSttNode( 0 ), m_nEndNode( 0 ), m_nSttContent( 0 ), m_nEndContent( 0 )
{
}
@@ -61,42 +61,42 @@ void SwUndRng::SetValues( const SwPaM& rPam )
const SwPosition *pEnd = rPam.GetPoint() == pStt
? rPam.GetMark()
: rPam.GetPoint();
- nEndNode = pEnd->nNode.GetIndex();
- nEndContent = pEnd->nContent.GetIndex();
+ m_nEndNode = pEnd->nNode.GetIndex();
+ m_nEndContent = pEnd->nContent.GetIndex();
}
else
{
// no selection !!
- nEndNode = 0;
- nEndContent = COMPLETE_STRING;
+ m_nEndNode = 0;
+ m_nEndContent = COMPLETE_STRING;
}
- nSttNode = pStt->nNode.GetIndex();
- nSttContent = pStt->nContent.GetIndex();
+ m_nSttNode = pStt->nNode.GetIndex();
+ m_nSttContent = pStt->nContent.GetIndex();
}
void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const
{
rPam.DeleteMark();
- rPam.GetPoint()->nNode = nSttNode;
+ rPam.GetPoint()->nNode = m_nSttNode;
SwNode& rNd = rPam.GetNode();
if( rNd.IsContentNode() )
- rPam.GetPoint()->nContent.Assign( rNd.GetContentNode(), nSttContent );
+ rPam.GetPoint()->nContent.Assign( rNd.GetContentNode(), m_nSttContent );
else if( bCorrToContent )
rPam.Move( fnMoveForward, GoInContent );
else
rPam.GetPoint()->nContent.Assign( nullptr, 0 );
- if( !nEndNode && COMPLETE_STRING == nEndContent ) // no selection
+ if( !m_nEndNode && COMPLETE_STRING == m_nEndContent ) // no selection
return ;
rPam.SetMark();
- if( nSttNode == nEndNode && nSttContent == nEndContent )
+ if( m_nSttNode == m_nEndNode && m_nSttContent == m_nEndContent )
return; // nothing left to do
- rPam.GetPoint()->nNode = nEndNode;
+ rPam.GetPoint()->nNode = m_nEndNode;
if( rPam.GetNode().IsContentNode() )
- rPam.GetPoint()->nContent.Assign( rPam.GetNode().GetContentNode(), nEndContent );
+ rPam.GetPoint()->nContent.Assign( rPam.GetNode().GetContentNode(), m_nEndContent );
else if( bCorrToContent )
rPam.Move( fnMoveBackward, GoInContent );
else
@@ -1308,20 +1308,20 @@ SwRedlineSaveData::SwRedlineSaveData(
switch (eCmpPos)
{
case SwComparePosition::OverlapBefore: // Pos1 overlaps Pos2 at the beginning
- nEndNode = rEndPos.nNode.GetIndex();
- nEndContent = rEndPos.nContent.GetIndex();
+ m_nEndNode = rEndPos.nNode.GetIndex();
+ m_nEndContent = rEndPos.nContent.GetIndex();
break;
case SwComparePosition::OverlapBehind: // Pos1 overlaps Pos2 at the end
- nSttNode = rSttPos.nNode.GetIndex();
- nSttContent = rSttPos.nContent.GetIndex();
+ m_nSttNode = rSttPos.nNode.GetIndex();
+ m_nSttContent = rSttPos.nContent.GetIndex();
break;
case SwComparePosition::Inside: // Pos1 lays completely in Pos2
- nSttNode = rSttPos.nNode.GetIndex();
- nSttContent = rSttPos.nContent.GetIndex();
- nEndNode = rEndPos.nNode.GetIndex();
- nEndContent = rEndPos.nContent.GetIndex();
+ m_nSttNode = rSttPos.nNode.GetIndex();
+ m_nSttContent = rSttPos.nContent.GetIndex();
+ m_nEndNode = rEndPos.nNode.GetIndex();
+ m_nEndContent = rEndPos.nContent.GetIndex();
break;
case SwComparePosition::Outside: // Pos2 lays completely in Pos1
@@ -1482,10 +1482,10 @@ bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
{
const SwRedlineSaveData& rSet = rCurr[ n ];
const SwRedlineSaveData& rGet = rCheck[ n ];
- if( rSet.nSttNode != rGet.nSttNode ||
+ if( rSet.m_nSttNode != rGet.m_nSttNode ||
rSet.GetMvSttIdx() || rGet.GetMvSttIdx() ||
- ( bCurrIsEnd ? rSet.nSttContent != rGet.nEndContent
- : rSet.nEndContent != rGet.nSttContent ) ||
+ ( bCurrIsEnd ? rSet.m_nSttContent != rGet.m_nEndContent
+ : rSet.m_nEndContent != rGet.m_nSttContent ) ||
!rGet.CanCombine( rSet ) )
{
return false;
@@ -1497,9 +1497,9 @@ bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
SwRedlineSaveData& rSet = rCurr[ n ];
const SwRedlineSaveData& rGet = rCheck[ n ];
if( bCurrIsEnd )
- rSet.nSttContent = rGet.nSttContent;
+ rSet.m_nSttContent = rGet.m_nSttContent;
else
- rSet.nEndContent = rGet.nEndContent;
+ rSet.m_nEndContent = rGet.m_nEndContent;
}
return true;
}
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index a8f99653961a..0ff383652e62 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -45,32 +45,32 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
{
// get StartNode from footnotes before delete!
SwDoc* pDoc = rRange.GetDoc();
- SwTextNode* pTextNd = pDoc->GetNodes()[ nSttNode ]->GetTextNode();
- SwTextNode* pEndTextNd = pDoc->GetNodes()[ nEndNode ]->GetTextNode();
+ SwTextNode* pTextNd = pDoc->GetNodes()[ m_nSttNode ]->GetTextNode();
+ SwTextNode* pEndTextNd = pDoc->GetNodes()[ m_nEndNode ]->GetTextNode();
pHistory.reset( new SwHistory );
if( pTextNd )
{
- pHistory->Add( pTextNd->GetTextColl(), nSttNode, SwNodeType::Text );
+ pHistory->Add( pTextNd->GetTextColl(), m_nSttNode, SwNodeType::Text );
if ( pTextNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), nSttNode,
+ pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
0, pTextNd->GetText().getLength(), false );
}
if( pTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), nSttNode );
+ pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nSttNode );
}
if( pEndTextNd && pEndTextNd != pTextNd )
{
- pHistory->Add( pEndTextNd->GetTextColl(), nEndNode, SwNodeType::Text );
+ pHistory->Add( pEndTextNd->GetTextColl(), m_nEndNode, SwNodeType::Text );
if ( pEndTextNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), nEndNode,
+ pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), m_nEndNode,
0, pEndTextNd->GetText().getLength(), false );
}
if( pEndTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), nEndNode );
+ pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), m_nEndNode );
}
pTextNd = rMvPos.nNode.GetNode().GetTextNode();
@@ -108,10 +108,10 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
m_bMoveRange = true;
m_bJoinNext = m_bJoinPrev = false;
- nSttContent = nEndContent = m_nMoveDestContent = COMPLETE_STRING;
+ m_nSttContent = m_nEndContent = m_nMoveDestContent = COMPLETE_STRING;
- nSttNode = rRg.aStart.GetIndex();
- nEndNode = rRg.aEnd.GetIndex();
+ m_nSttNode = rRg.aStart.GetIndex();
+ m_nEndNode = rRg.aEnd.GetIndex();
// DelFootnote( rRange );
// FIXME: duplication of the method body of DelFootnote below
@@ -287,7 +287,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
if( m_bMoveRange )
{
// only a move with SwRange
- SwNodeRange aRg( rNds, nSttNode, rNds, nEndNode );
+ SwNodeRange aRg( rNds, m_nSttNode, rNds, m_nEndNode );
rDoc.getIDocumentContentOperations().MoveNodeRange( aRg, aIdx, m_bMoveRedlines
? SwMoveFlags::REDLINES
: SwMoveFlags::DEFAULT );
@@ -309,7 +309,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
rDoc.getIDocumentContentOperations().MoveRange( aPam, aMvPos,
SwMoveFlags::DEFAULT );
- if( nSttNode != nEndNode && bJoinText )
+ if( m_nSttNode != m_nEndNode && bJoinText )
{
++aIdx;
SwTextNode * pTextNd = aIdx.GetNode().GetTextNode();
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 958f55139f16..a9595f643327 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -53,10 +53,10 @@ SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
sReplaceRule( rReplaceRule ), nLRSavePos( 0 )
{
// No selection!
- nEndNode = 0;
- nEndContent = COMPLETE_STRING;
- nSttNode = rPos.nNode.GetIndex();
- nSttContent = rPos.nContent.GetIndex();
+ m_nEndNode = 0;
+ m_nEndContent = COMPLETE_STRING;
+ m_nSttNode = rPos.nNode.GetIndex();
+ m_nSttContent = rPos.nContent.GetIndex();
}
SwUndoInsNum::~SwUndoInsNum()
@@ -92,7 +92,7 @@ void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
pHistory->SetTmpEnd( pHistory->Count() );
}
- if (nSttNode)
+ if (m_nSttNode)
{
AddUndoRedoPaM(rContext);
}
@@ -128,7 +128,7 @@ void SwUndoInsNum::SetLRSpaceEndPos()
void SwUndoInsNum::RepeatImpl(::sw::RepeatContext & rContext)
{
SwDoc & rDoc( rContext.GetDoc() );
- if ( nSttNode )
+ if ( m_nSttNode )
{
if( sReplaceRule.isEmpty() )
{
@@ -158,7 +158,7 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
: SwUndo( SwUndoId::DELNUM, rPam.GetDoc() ), SwUndRng( rPam )
{
- aNodes.reserve( std::min<sal_uLong>(nEndNode - nSttNode, 255) );
+ aNodes.reserve( std::min<sal_uLong>(m_nEndNode - m_nSttNode, 255) );
pHistory.reset( new SwHistory );
}
@@ -216,22 +216,22 @@ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, bool bIsOutlMv )
void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
- sal_uLong nTmpStt = nSttNode, nTmpEnd = nEndNode;
+ sal_uLong nTmpStt = m_nSttNode, nTmpEnd = m_nEndNode;
- if (nEndNode || nEndContent != COMPLETE_STRING) // section?
+ if (m_nEndNode || m_nEndContent != COMPLETE_STRING) // section?
{
- if( nNewStt < nSttNode ) // moved forwards
- nEndNode = nEndNode - ( nSttNode - nNewStt );
+ if( nNewStt < m_nSttNode ) // moved forwards
+ m_nEndNode = m_nEndNode - ( m_nSttNode - nNewStt );
else
- nEndNode = nEndNode + ( nNewStt - nSttNode );
+ m_nEndNode = m_nEndNode + ( nNewStt - m_nSttNode );
}
- nSttNode = nNewStt;
+ m_nSttNode = nNewStt;
SwPaM & rPam( AddUndoRedoPaM(rContext) );
rContext.GetDoc().MoveParagraph( rPam, -nOffset,
SwUndoId::OUTLINE_UD == GetId() );
- nSttNode = nTmpStt;
- nEndNode = nTmpEnd;
+ m_nSttNode = nTmpStt;
+ m_nEndNode = nTmpEnd;
}
void SwUndoMoveNum::RedoImpl(::sw::UndoRedoContext & rContext)
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 59be96d9d2dd..725922e26157 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -69,8 +69,8 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
if( mbHiddenRedlines ) // then the NodeIndices of SwUndRng need to be corrected
{
nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
- nSttNode -= nEndExtra;
- nEndNode -= nEndExtra;
+ m_nSttNode -= nEndExtra;
+ m_nEndNode -= nEndExtra;
}
}
}
@@ -102,8 +102,8 @@ void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext)
mpRedlSaveData->clear();
nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex() - nEndExtra;
- nSttNode += nEndExtra;
- nEndNode += nEndExtra;
+ m_nSttNode += nEndExtra;
+ m_nEndNode += nEndExtra;
}
SetPaM(rPam, true);
}
@@ -133,8 +133,8 @@ void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext)
FillSaveData(rPam, *mpRedlSaveData, false, SwUndoId::REJECT_REDLINE != mnUserId );
nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
- nSttNode -= nEndExtra;
- nEndNode -= nEndExtra;
+ m_nSttNode -= nEndExtra;
+ m_nEndNode -= nEndExtra;
}
RedoRedlineImpl(rDoc, rPam);
@@ -160,16 +160,16 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
const SwTextNode* pTNd;
SetRedlineText(rRange.GetText());
if( SwUndoId::DELETE == mnUserId &&
- nSttNode == nEndNode && nSttContent + 1 == nEndContent &&
+ m_nSttNode == m_nEndNode && m_nSttContent + 1 == m_nEndContent &&
nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
{
- sal_Unicode const cCh = pTNd->GetText()[nSttContent];
+ sal_Unicode const cCh = pTNd->GetText()[m_nSttContent];
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
{
bCanGroup = true;
bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetText(),
- nSttContent );
- bIsBackspace = nSttContent == rRange.GetPoint()->nContent.GetIndex();
+ m_nSttContent );
+ bIsBackspace = m_nSttContent == rRange.GetPoint()->nContent.GetIndex();
}
}
@@ -215,14 +215,14 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
bCanGroup == rNext.bCanGroup &&
bIsDelim == rNext.bIsDelim &&
bIsBackspace == rNext.bIsBackspace &&
- nSttNode == nEndNode &&
- rNext.nSttNode == nSttNode &&
- rNext.nEndNode == nEndNode )
+ m_nSttNode == m_nEndNode &&
+ rNext.m_nSttNode == m_nSttNode &&
+ rNext.m_nEndNode == m_nEndNode )
{
int bIsEnd = 0;
- if( rNext.nSttContent == nEndContent )
+ if( rNext.m_nSttContent == m_nEndContent )
bIsEnd = 1;
- else if( rNext.nEndContent == nSttContent )
+ else if( rNext.m_nEndContent == m_nSttContent )
bIsEnd = -1;
if( bIsEnd &&
@@ -233,9 +233,9 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
)))
{
if( 1 == bIsEnd )
- nEndContent = rNext.nEndContent;
+ m_nEndContent = rNext.m_nEndContent;
else
- nSttContent = rNext.nSttContent;
+ m_nSttContent = rNext.m_nSttContent;
bRet = true;
}
}
@@ -246,7 +246,7 @@ SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange,
const SwSortOptions& rOpt )
: SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
pOpt( new SwSortOptions( rOpt ) ),
- nSaveEndNode( nEndNode ), nSaveEndContent( nEndContent )
+ nSaveEndNode( m_nEndNode ), nSaveEndContent( m_nEndContent )
{
}
@@ -271,7 +271,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
// consistent again. The 'delete' one is hidden, thus search for the
// 'insert' Redline object. The former is located directly after the latter.
SwRedlineTable::size_type nFnd = rDoc.getIDocumentRedlineAccess().GetRedlinePos(
- *rDoc.GetNodes()[ nSttNode + 1 ],
+ *rDoc.GetNodes()[ m_nSttNode + 1 ],
RedlineType::Insert );
OSL_ENSURE( SwRedlineTable::npos != nFnd && nFnd+1 < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(),
"could not find an Insert object" );
@@ -443,7 +443,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
// complete nodes into the current doc. And then the selection
// must be from end to start, so the delete join into the right
// direction.
- if( !nSttContent && !nEndContent )
+ if( !m_nSttContent && !m_nEndContent )
rPam.Exchange();
bool bJoinText, bJoinPrev;
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index f6bd82bb959f..127ba5a410eb 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -137,8 +137,8 @@ void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
// no selection?
SwNodeIndex aIdx( *pNd );
- if( ( !nEndNode && COMPLETE_STRING == nEndContent ) ||
- ( nSttNode == nEndNode && nSttContent == nEndContent ))
+ if( ( !m_nEndNode && COMPLETE_STRING == m_nEndContent ) ||
+ ( m_nSttNode == m_nEndNode && m_nSttContent == m_nEndContent ))
// delete simply all nodes
rDoc.GetNodes().Delete( aIdx, pNd->EndOfSectionIndex() -
aIdx.GetIndex() );
@@ -149,12 +149,12 @@ void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
// do we need to consolidate?
if (m_bSplitAtStart)
{
- Join( rDoc, nSttNode );
+ Join( rDoc, m_nSttNode );
}
if (m_bSplitAtEnd)
{
- Join( rDoc, nEndNode );
+ Join( rDoc, m_nEndNode );
}
if (m_pHistory)
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 3765c71bd384..f0ffbaeb454e 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -54,8 +54,8 @@ SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTabl
const SwSortOptions& rOpt, bool bSaveTable )
: SwUndo(SwUndoId::SORT_TBL, rTableNd.GetDoc())
{
- nSttNode = nStt;
- nEndNode = nEnd;
+ m_nSttNode = nStt;
+ m_nEndNode = nEnd;
nTableNd = rTableNd.GetIndex();
pSortOpt.reset( new SwSortOptions(rOpt) );
@@ -75,7 +75,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
if(pSortOpt->bTable)
{
// Undo for Table
- RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
+ RemoveIdxFromSection( rDoc, m_nSttNode, &m_nEndNode );
if( pUndoTableAttr )
{
@@ -128,7 +128,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
{
for (std::unique_ptr<SwSortUndoElement> & j : m_SortList)
{
- if (j->SORT_TXT_TBL.TXT.nSource == nSttNode + i)
+ if (j->SORT_TXT_TBL.TXT.nSource == m_nSttNode + i)
{
aIdxList.push_back( SwNodeIndex( rDoc.GetNodes(),
j->SORT_TXT_TBL.TXT.nTarget ) );
@@ -139,7 +139,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
for (size_t i = 0; i < m_SortList.size(); ++i)
{
- SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode + i );
+ SwNodeIndex aIdx( rDoc.GetNodes(), m_nSttNode + i );
SwNodeRange aRg( aIdxList[i], 0, aIdxList[i], 1 );
rDoc.getIDocumentContentOperations().MoveNodeRange(aRg, aIdx,
SwMoveFlags::DEFAULT);
@@ -157,7 +157,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
if(pSortOpt->bTable)
{
// Redo for Table
- RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
+ RemoveIdxFromSection( rDoc, m_nSttNode, &m_nEndNode );
SwTableNode* pTableNd = rDoc.GetNodes()[ nTableNd ]->GetTableNode();
@@ -212,7 +212,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
for (size_t i = 0; i < m_SortList.size(); ++i)
{
- SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode + i);
+ SwNodeIndex aIdx( rDoc.GetNodes(), m_nSttNode + i);
SwNodeRange aRg( aIdxList[i], 0, aIdxList[i], 1 );
rDoc.getIDocumentContentOperations().MoveNodeRange(aRg, aIdx,
SwMoveFlags::DEFAULT);
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 7e0775f92fff..ef3f14d189ff 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -713,8 +713,8 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- sal_uLong nTableNd = nSttNode;
- if( nSttContent )
+ sal_uLong nTableNd = m_nSttNode;
+ if( m_nSttContent )
++nTableNd; // Node was splitted previously
SwNodeIndex aIdx( rDoc.GetNodes(), nTableNd );
SwTableNode *const pTNd = aIdx.GetNode().GetTableNode();
@@ -751,7 +751,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
// join again at start?
SwPaM aPam(rDoc.GetNodes().GetEndOfContent());
SwPosition *const pPos = aPam.GetPoint();
- if( nSttContent )
+ if( m_nSttContent )
{
pPos->nNode = nTableNd;
pPos->nContent.Assign(pPos->nNode.GetNode().GetContentNode(), 0);
@@ -770,7 +770,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
if( bSplitEnd )
{
SwNodeIndex& rIdx = pPos->nNode;
- rIdx = nEndNode;
+ rIdx = m_nEndNode;
SwTextNode* pTextNd = rIdx.GetNode().GetTextNode();
if( pTextNd && pTextNd->CanJoinNext() )
{
@@ -779,7 +779,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext)
// than move, relatively, the Cursor/etc. again
pPos->nContent.Assign(pTextNd, pTextNd->GetText().getLength());
- RemoveIdxRel( nEndNode + 1, *pPos );
+ RemoveIdxRel( m_nEndNode + 1, *pPos );
pTextNd->JoinNext();
}
@@ -1984,8 +1984,8 @@ void SwUndoTableMerge::UndoImpl(::sw::UndoRedoContext & rContext)
}
SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
- pPam->GetPoint()->nNode = nSttNode;
- pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), nSttContent );
+ pPam->GetPoint()->nNode = m_nSttNode;
+ pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), m_nSttContent );
pPam->SetMark();
pPam->DeleteMark();
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 8b206e064873..595810b6bef6 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -72,16 +72,16 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
if( pTextNd )
{
pTextFormatColl = pTextNd->GetTextColl();
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), nSttNode,
+ pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
0, pTextNd->GetText().getLength(), false );
if( pTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), nSttNode );
+ pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nSttNode );
// We may have some flys anchored to paragraph where we inserting.
// These flys will be saved in pFrameFormats array (only flys which exist BEFORE insertion!)
// Then in SwUndoInserts::SetInsertRange the flys saved in pFrameFormats will NOT create Undos.
// m_FlyUndos will only be filled with newly inserted flys.
- pFrameFormats = sw::GetFlysAnchoredAt(*pDoc, nSttNode);
+ pFrameFormats = sw::GetFlysAnchoredAt(*pDoc, m_nSttNode);
}
// consider Redline
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
@@ -107,8 +107,8 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
bool bSttIsTextNd )
{
const SwPosition* pTmpPos = rPam.End();
- nEndNode = pTmpPos->nNode.GetIndex();
- nEndContent = pTmpPos->nContent.GetIndex();
+ m_nEndNode = pTmpPos->nNode.GetIndex();
+ m_nEndContent = pTmpPos->nContent.GetIndex();
if( rPam.HasMark() )
{
if( pTmpPos == rPam.GetPoint() )
@@ -116,12 +116,12 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
else
pTmpPos = rPam.GetPoint();
- nSttNode = pTmpPos->nNode.GetIndex();
- nSttContent = pTmpPos->nContent.GetIndex();
+ m_nSttNode = pTmpPos->nNode.GetIndex();
+ m_nSttContent = pTmpPos->nContent.GetIndex();
if( !bSttIsTextNd ) // if a table selection is added...
{
- ++nSttNode; // ... then the CopyPam is not fully correct
+ ++m_nSttNode; // ... then the CopyPam is not fully correct
bSttWasTextNd = false;
}
}
@@ -137,7 +137,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
{
SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[n];
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
- if (IsCreateUndoForNewFly(*pAnchor, nSttNode, nEndNode))
+ if (IsCreateUndoForNewFly(*pAnchor, m_nSttNode, m_nEndNode))
{
std::vector<SwFrameFormat*>::iterator it;
if( !pFrameFormats ||
@@ -224,17 +224,17 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
// if Point and Mark are different text nodes so a JoinNext has to be done
- bool bJoinNext = nSttNode != nEndNode &&
+ bool bJoinNext = m_nSttNode != m_nEndNode &&
rPam.GetMark()->nNode.GetNode().GetTextNode() &&
rPam.GetPoint()->nNode.GetNode().GetTextNode();
// Is there any content? (loading from template does not have content)
- if( nSttNode != nEndNode || nSttContent != nEndContent )
+ if( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent )
{
- if( nSttNode != nEndNode )
+ if( m_nSttNode != m_nEndNode )
{
- SwTextNode* pTextNd = rDoc.GetNodes()[ nEndNode ]->GetTextNode();
- if (pTextNd && pTextNd->GetText().getLength() == nEndContent)
+ SwTextNode* pTextNd = rDoc.GetNodes()[ m_nEndNode ]->GetTextNode();
+ if (pTextNd && pTextNd->GetText().getLength() == m_nEndContent)
pLastNdColl = pTextNd->GetTextColl();
}
@@ -260,7 +260,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
nNdDiff += nTmp - rPam.GetPoint()->nNode.GetIndex();
}
- if (nSttNode != nEndNode || nSttContent != nEndContent)
+ if (m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent)
{
// are there Footnotes or ContentFlyFrames in text?
nSetPos = pHistory->Count();
@@ -329,9 +329,9 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
SwPaM& rPam(rContext.GetCursorSupplier().CreateNewShellCursor());
SwDoc* pDoc = rPam.GetDoc();
rPam.DeleteMark();
- rPam.GetPoint()->nNode = nSttNode - nNdDiff;
+ rPam.GetPoint()->nNode = m_nSttNode - nNdDiff;
SwContentNode* pCNd = rPam.GetContentNode();
- rPam.GetPoint()->nContent.Assign( pCNd, nSttContent );
+ rPam.GetPoint()->nContent.Assign( pCNd, m_nSttContent );
SwTextFormatColl* pSavTextFormatColl = pTextFormatColl;
if( pTextFormatColl && pCNd && pCNd->IsTextNode() )
@@ -340,7 +340,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
pHistory->SetTmpEnd( nSetPos );
// retrieve start position for rollback
- if( ( nSttNode != nEndNode || nSttContent != nEndContent ) && m_pUndoNodeIndex)
+ if( ( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent ) && m_pUndoNodeIndex)
{
auto const pFlysAtInsPos(sw::GetFlysAnchoredAt(*pDoc,
rPam.GetPoint()->nNode.GetIndex()));