[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 16 07:45:43 UTC 2019
sw/inc/undobj.hxx | 14 +++----
sw/source/core/undo/undel.cxx | 60 +++++++++++++++---------------
sw/source/core/undo/undobj.cxx | 80 ++++++++++++++++++++---------------------
sw/source/core/undo/unins.cxx | 52 +++++++++++++-------------
sw/source/core/undo/unmove.cxx | 44 +++++++++++-----------
sw/source/core/undo/unovwr.cxx | 16 ++++----
sw/source/core/undo/untblk.cxx | 16 ++++----
7 files changed, 141 insertions(+), 141 deletions(-)
New commits:
commit b21be80c403abefa40cf9056d46b8c8e8d69a8ac
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Sep 16 09:02:52 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Sep 16 09:45:04 2019 +0200
sw: prefix members of SwUndoSaveSection
Change-Id: I7e5433695a2e06c540fe6623fe3d9940d3255bd4
Reviewed-on: https://gerrit.libreoffice.org/78974
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index b9f058be2793..3e8e69631383 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -153,7 +153,7 @@ class SwUndoSaveContent
{
protected:
- std::unique_ptr<SwHistory> pHistory;
+ std::unique_ptr<SwHistory> m_pHistory;
// Needed for deletion of content. For Redo content is moved into the
// UndoNodesArray. These methods always create a new node to insert
@@ -189,13 +189,13 @@ public:
class SwUndoSaveSection : private SwUndoSaveContent
{
std::unique_ptr<SwNodeIndex> m_pMovedStart;
- std::unique_ptr<SwRedlineSaveDatas> pRedlSaveData;
- sal_uLong nMvLen; // Index into UndoNodes-Array.
- sal_uLong nStartPos;
+ std::unique_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ sal_uLong m_nMoveLen; // Index into UndoNodes-Array.
+ sal_uLong m_nStartPos;
protected:
SwNodeIndex* GetMvSttIdx() const { return m_pMovedStart.get(); }
- sal_uLong GetMvNodeCnt() const { return nMvLen; }
+ sal_uLong GetMvNodeCnt() const { return m_nMoveLen; }
public:
SwUndoSaveSection();
@@ -206,8 +206,8 @@ public:
void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, sal_uInt16 nSectType );
void RestoreSection(SwDoc* pDoc, const SwNodeIndex& rInsPos, bool bForceCreateFrames = false);
- const SwHistory* GetHistory() const { return pHistory.get(); }
- SwHistory* GetHistory() { return pHistory.get(); }
+ const SwHistory* GetHistory() const { return m_pHistory.get(); }
+ SwHistory* GetHistory() { return m_pHistory.get(); }
};
// This class saves the PaM as sal_uInt16's and is able to restore it
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index a005785d51da..a1a8ca52f841 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -205,8 +205,8 @@ SwUndoDelete::SwUndoDelete(
}
}
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
// delete all footnotes for now
const SwPosition *pStt = rPam.Start(),
@@ -235,7 +235,7 @@ SwUndoDelete::SwUndoDelete(
}
}
- m_nSetPos = pHistory ? pHistory->Count() : 0;
+ m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
// Is already anything deleted?
m_nNdDiff = m_nSttNode - pStt->nNode.GetIndex();
@@ -262,8 +262,8 @@ SwUndoDelete::SwUndoDelete(
if( pSttTextNd && pEndTextNd && pSttTextNd != pEndTextNd )
{
// two different TextNodes, thus save also the TextFormatCollection
- pHistory->Add( pSttTextNd->GetTextColl(),pStt->nNode.GetIndex(), SwNodeType::Text );
- pHistory->Add( pEndTextNd->GetTextColl(),pEnd->nNode.GetIndex(), SwNodeType::Text );
+ m_pHistory->Add( pSttTextNd->GetTextColl(),pStt->nNode.GetIndex(), SwNodeType::Text );
+ m_pHistory->Add( pEndTextNd->GetTextColl(),pEnd->nNode.GetIndex(), SwNodeType::Text );
if( !m_bJoinNext ) // Selection from bottom to top
{
@@ -272,7 +272,7 @@ SwUndoDelete::SwUndoDelete(
// EndNode needs to be reset. Same for PageDesc and ColBreak.
if( pEndTextNd->HasSwAttrSet() )
{
- SwRegHistory aRegHist( *pEndTextNd, pHistory.get() );
+ SwRegHistory aRegHist( *pEndTextNd, m_pHistory.get() );
if( SfxItemState::SET == pEndTextNd->GetpSwAttrSet()->GetItemState(
RES_BREAK, false ) )
pEndTextNd->ResetAttr( RES_BREAK );
@@ -432,8 +432,8 @@ SwUndoDelete::SwUndoDelete(
rPam.GetPoint()->nContent.Assign( nullptr, 0 );
// is a history necessary here at all?
- if( pHistory && !pHistory->Count() )
- pHistory.reset();
+ if( m_pHistory && !m_pHistory->Count() )
+ m_pHistory.reset();
}
bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
@@ -444,13 +444,13 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
if( pSttTextNd )
{
bool bOneNode = m_nSttNode == m_nEndNode;
- SwRegHistory aRHst( *pSttTextNd, pHistory.get() );
+ SwRegHistory aRHst( *pSttTextNd, m_pHistory.get() );
// always save all text atttibutes because of possibly overlapping
// areas of on/off
- pHistory->CopyAttr( pSttTextNd->GetpSwpHints(), nNdIdx,
+ m_pHistory->CopyAttr( pSttTextNd->GetpSwpHints(), nNdIdx,
0, pSttTextNd->GetText().getLength(), true );
if( !bOneNode && pSttTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pSttTextNd->GetpSwAttrSet(), nNdIdx );
+ m_pHistory->CopyFormatAttr( *pSttTextNd->GetpSwAttrSet(), nNdIdx );
// the length might have changed (!!Fields!!)
sal_Int32 nLen = (bOneNode
@@ -483,15 +483,15 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
{
SwIndex aEndIdx( pEndTextNd );
nNdIdx = pEnd->nNode.GetIndex();
- SwRegHistory aRHst( *pEndTextNd, pHistory.get() );
+ SwRegHistory aRHst( *pEndTextNd, m_pHistory.get() );
// always save all text atttibutes because of possibly overlapping
// areas of on/off
- pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), nNdIdx, 0,
+ m_pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), nNdIdx, 0,
pEndTextNd->GetText().getLength(), true );
if( pEndTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), nNdIdx );
+ m_pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), nNdIdx );
// delete now also the text (all attribute changes are added to
// UNDO history)
@@ -794,9 +794,9 @@ SwRewriter SwUndoDelete::GetRewriter() const
}
aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
- if (pHistory)
+ if (m_pHistory)
{
- SwRewriter aRewriter = lcl_RewriterFromHistory(*pHistory);
+ SwRewriter aRewriter = lcl_RewriterFromHistory(*m_pHistory);
aStr = aRewriter.Apply(aStr);
}
@@ -999,24 +999,24 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
}
}
- if( pHistory )
+ if( m_pHistory )
{
- pHistory->TmpRollback(&rDoc, m_nSetPos, false);
+ m_pHistory->TmpRollback(&rDoc, m_nSetPos, false);
if( m_nSetPos ) // there were Footnodes/FlyFrames
{
// are there others than these ones?
- if( m_nSetPos < pHistory->Count() )
+ if( m_nSetPos < m_pHistory->Count() )
{
// if so save the attributes of the others
SwHistory aHstr;
- aHstr.Move( 0, pHistory.get(), m_nSetPos );
- pHistory->Rollback(&rDoc);
- pHistory->Move( 0, &aHstr );
+ aHstr.Move( 0, m_pHistory.get(), m_nSetPos );
+ m_pHistory->Rollback(&rDoc);
+ m_pHistory->Move( 0, &aHstr );
}
else
{
- pHistory->Rollback(&rDoc);
- pHistory.reset();
+ m_pHistory->Rollback(&rDoc);
+ m_pHistory.reset();
}
}
}
@@ -1159,11 +1159,11 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
rPam.Exchange();
}
- if( pHistory ) // are the attributes saved?
+ if( m_pHistory ) // are the attributes saved?
{
- pHistory->SetTmpEnd( pHistory->Count() );
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
SwHistory aHstr;
- aHstr.Move( 0, pHistory.get() );
+ aHstr.Move( 0, m_pHistory.get() );
if( m_bDelFullPara )
{
@@ -1175,9 +1175,9 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
}
else
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
- m_nSetPos = pHistory ? pHistory->Count() : 0;
+ m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
- pHistory->Move( m_nSetPos, &aHstr );
+ m_pHistory->Move( m_nSetPos, &aHstr );
}
else
{
@@ -1191,7 +1191,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
}
else
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
- m_nSetPos = pHistory ? pHistory->Count() : 0;
+ m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
}
if( !m_aSttStr && !m_aEndStr )
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 654c75483033..441e1744791a 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -887,13 +887,13 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// will be problems with TextNode because the index will be
// deleted in the DTOR of SwFootnote!
SwTextNode* pTextNd = const_cast<SwTextNode*>(static_cast<const SwTextNode*>(pFootnoteNd));
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
SwTextAttr* const pFootnoteHint =
pTextNd->GetTextAttrForCharAt( nFootnoteSttIdx );
assert(pFootnoteHint);
SwIndex aIdx( pTextNd, nFootnoteSttIdx );
- pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
+ m_pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
pTextNd->EraseText( aIdx, 1 );
}
@@ -912,13 +912,13 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// will be problems with TextNode because the index will be
// deleted in the DTOR of SwFootnote!
SwTextNode* pTextNd = const_cast<SwTextNode*>(static_cast<const SwTextNode*>(pFootnoteNd));
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
SwTextAttr* const pFootnoteHint =
pTextNd->GetTextAttrForCharAt( nFootnoteSttIdx );
assert(pFootnoteHint);
SwIndex aIdx( pTextNd, nFootnoteSttIdx );
- pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
+ m_pHistory->Add( pFootnoteHint, pTextNd->GetIndex(), false );
pTextNd->EraseText( aIdx, 1 );
}
}
@@ -927,7 +927,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// 2. Flys
if( DelContentType::Fly & nDelContentType )
{
- sal_uInt16 nChainInsPos = pHistory ? pHistory->Count() : 0;
+ sal_uInt16 nChainInsPos = m_pHistory ? m_pHistory->Count() : 0;
const SwFrameFormats& rSpzArr = *pDoc->GetSpzFrameFormats();
if( !rSpzArr.empty() )
{
@@ -950,14 +950,14 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
pAPos->nNode < pEnd->nNode )
: ( *pStt <= *pAPos && *pAPos < *pEnd )) )
{
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
SwTextNode *const pTextNd =
pAPos->nNode.GetNode().GetTextNode();
SwTextAttr* const pFlyHint = pTextNd->GetTextAttrForCharAt(
pAPos->nContent.GetIndex());
assert(pFlyHint);
- pHistory->Add( pFlyHint, 0, false );
+ m_pHistory->Add( pFlyHint, 0, false );
// reset n so that no Format is skipped
n = n >= rSpzArr.size() ? rSpzArr.size() : n+1;
}
@@ -982,8 +982,8 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
if (bTmp)
{
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
// Moving the anchor?
if( !( DelContentType::CheckNoCntnt & nDelContentType ) &&
@@ -991,7 +991,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// Do not try to move the anchor to a table!
&& rMark.nNode.GetNode().IsTextNode())
{
- pHistory->Add( *pFormat );
+ m_pHistory->Add( *pFormat );
SwFormatAnchor aAnch( *pAnchor );
SwPosition aPos( rMark.nNode );
aAnch.SetAnchor( &aPos );
@@ -999,7 +999,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
}
else
{
- pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
+ m_pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
// reset n so that no Format is skipped
n = n >= rSpzArr.size() ?
rSpzArr.size() : n+1;
@@ -1012,12 +1012,12 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
( pStt->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) )
{
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
if (IsDestroyFrameAnchoredAtChar(
*pAPos, *pStt, *pEnd, nDelContentType))
{
- pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
+ m_pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
n = n >= rSpzArr.size() ? rSpzArr.size() : n+1;
}
else if (!((DelContentType::CheckNoCntnt |
@@ -1031,7 +1031,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// Do not try to move the anchor to a table!
if( rMark.nNode.GetNode().GetTextNode() )
{
- pHistory->Add( *pFormat );
+ m_pHistory->Add( *pFormat );
SwFormatAnchor aAnch( *pAnchor );
aAnch.SetAnchor( &rMark );
pFormat->SetFormatAttr( aAnch );
@@ -1045,10 +1045,10 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
pStt->nNode == pAPos->nNode )
{
- if( !pHistory )
- pHistory.reset( new SwHistory );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
- pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
+ m_pHistory->Add( *static_cast<SwFlyFrameFormat *>(pFormat), nChainInsPos );
// reset n so that no Format is skipped
n = n >= rSpzArr.size() ? rSpzArr.size() : n+1;
@@ -1164,9 +1164,9 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
{
if( IDocumentMarkAccess::GetType(*pBkmk) != IDocumentMarkAccess::MarkType::UNO_BOOKMARK )
{
- if( !pHistory )
- pHistory.reset( new SwHistory );
- pHistory->Add( *pBkmk, bSavePos, bSaveOtherPos );
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
+ m_pHistory->Add( *pBkmk, bSavePos, bSaveOtherPos );
}
if ( bSavePos
&& ( bSaveOtherPos
@@ -1183,7 +1183,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// save a complete section into UndoNodes array
SwUndoSaveSection::SwUndoSaveSection()
- : nMvLen( 0 ), nStartPos( ULONG_MAX )
+ : m_nMoveLen( 0 ), m_nStartPos( ULONG_MAX )
{
}
@@ -1193,11 +1193,11 @@ SwUndoSaveSection::~SwUndoSaveSection()
{
// SaveSection saves the content in the PostIt section.
SwNodes& rUNds = m_pMovedStart->GetNode().GetNodes();
- rUNds.Delete( *m_pMovedStart, nMvLen );
+ rUNds.Delete( *m_pMovedStart, m_nMoveLen );
m_pMovedStart.reset();
}
- pRedlSaveData.reset();
+ m_pRedlineSaveData.reset();
}
void SwUndoSaveSection::SaveSection( const SwNodeIndex& rSttIdx )
@@ -1217,10 +1217,10 @@ void SwUndoSaveSection::SaveSection(
// redlines *before* CorrAbs, because DelBookmarks will make them 0-length
// but *after* DelContentIndex because that also may use FillSaveData (in
// flys) and that will be restored *after* this one...
- pRedlSaveData.reset( new SwRedlineSaveDatas );
- if (!SwUndo::FillSaveData( aPam, *pRedlSaveData ))
+ m_pRedlineSaveData.reset( new SwRedlineSaveDatas );
+ if (!SwUndo::FillSaveData( aPam, *m_pRedlineSaveData ))
{
- pRedlSaveData.reset();
+ m_pRedlineSaveData.reset();
}
{
@@ -1231,7 +1231,7 @@ void SwUndoSaveSection::SaveSection(
SwDoc::CorrAbs( aSttIdx, aEndIdx, SwPosition( aMvStt ), true );
}
- nStartPos = rRange.aStart.GetIndex();
+ m_nStartPos = rRange.aStart.GetIndex();
if (bExpandNodes)
{
@@ -1249,16 +1249,16 @@ void SwUndoSaveSection::SaveSection(
sal_uLong nEnd;
m_pMovedStart.reset(new SwNodeIndex(rRange.aStart));
MoveToUndoNds(aPam, m_pMovedStart.get(), &nEnd);
- nMvLen = nEnd - m_pMovedStart->GetIndex() + 1;
+ m_nMoveLen = nEnd - m_pMovedStart->GetIndex() + 1;
}
void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx,
sal_uInt16 nSectType )
{
- if( ULONG_MAX != nStartPos ) // was there any content?
+ if( ULONG_MAX != m_nStartPos ) // was there any content?
{
// check if the content is at the old position
- SwNodeIndex aSttIdx( pDoc->GetNodes(), nStartPos );
+ SwNodeIndex aSttIdx( pDoc->GetNodes(), m_nStartPos );
// move the content from UndoNodes array into Fly
SwStartNode* pSttNd = SwNodes::MakeEmptySection( aSttIdx,
@@ -1274,20 +1274,20 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx,
void SwUndoSaveSection::RestoreSection(
SwDoc *const pDoc, const SwNodeIndex& rInsPos, bool bForceCreateFrames)
{
- if( ULONG_MAX != nStartPos ) // was there any content?
+ if( ULONG_MAX != m_nStartPos ) // was there any content?
{
SwPosition aInsPos( rInsPos );
- sal_uLong nEnd = m_pMovedStart->GetIndex() + nMvLen - 1;
+ sal_uLong nEnd = m_pMovedStart->GetIndex() + m_nMoveLen - 1;
MoveFromUndoNds(*pDoc, m_pMovedStart->GetIndex(), aInsPos, &nEnd, bForceCreateFrames);
// destroy indices again, content was deleted from UndoNodes array
m_pMovedStart.reset();
- nMvLen = 0;
+ m_nMoveLen = 0;
- if( pRedlSaveData )
+ if( m_pRedlineSaveData )
{
- SwUndo::SetSaveData( *pDoc, *pRedlSaveData );
- pRedlSaveData.reset();
+ SwUndo::SetSaveData( *pDoc, *m_pRedlineSaveData );
+ m_pRedlineSaveData.reset();
}
}
}
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 5333588f9fd4..2d838b740760 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -607,41 +607,41 @@ SwUndoReplace::Impl::Impl(
SwTextNode* pNd = pStt->nNode.GetNode().GetTextNode();
OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
- pHistory.reset( new SwHistory );
+ m_pHistory.reset( new SwHistory );
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
- m_nSetPos = pHistory->Count();
+ m_nSetPos = m_pHistory->Count();
sal_uLong nNewPos = pStt->nNode.GetIndex();
m_nOffset = m_nSttNd - nNewPos;
if ( pNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pNd->GetpSwpHints(), nNewPos, 0,
+ m_pHistory->CopyAttr( pNd->GetpSwpHints(), nNewPos, 0,
pNd->GetText().getLength(), true );
}
if ( m_bSplitNext )
{
if( pNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pNd->GetpSwAttrSet(), nNewPos );
- pHistory->Add( pNd->GetTextColl(), nNewPos, SwNodeType::Text );
+ m_pHistory->CopyFormatAttr( *pNd->GetpSwAttrSet(), nNewPos );
+ m_pHistory->Add( pNd->GetTextColl(), nNewPos, SwNodeType::Text );
SwTextNode* pNext = pEnd->nNode.GetNode().GetTextNode();
sal_uLong nTmp = pNext->GetIndex();
- pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0,
+ m_pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0,
pNext->GetText().getLength(), true );
if( pNext->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pNext->GetpSwAttrSet(), nTmp );
- pHistory->Add( pNext->GetTextColl(),nTmp, SwNodeType::Text );
+ m_pHistory->CopyFormatAttr( *pNext->GetpSwAttrSet(), nTmp );
+ m_pHistory->Add( pNext->GetTextColl(),nTmp, SwNodeType::Text );
// METADATA: store
m_pMetadataUndoStart = pNd ->CreateUndo();
m_pMetadataUndoEnd = pNext->CreateUndo();
}
- if( !pHistory->Count() )
+ if( !m_pHistory->Count() )
{
- pHistory.reset();
+ m_pHistory.reset();
}
const sal_Int32 nECnt = m_bSplitNext ? pNd->GetText().getLength()
@@ -705,27 +705,27 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
(void) ins;
}
- if( pHistory )
+ if( m_pHistory )
{
if( pNd->GetpSwpHints() )
pNd->ClearSwpHintsArr( true );
- pHistory->TmpRollback( pDoc, m_nSetPos, false );
+ m_pHistory->TmpRollback( pDoc, m_nSetPos, false );
if ( m_nSetPos ) // there were footnotes/FlyFrames
{
// are there others than these?
- if( m_nSetPos < pHistory->Count() )
+ if( m_nSetPos < m_pHistory->Count() )
{
// than save those attributes as well
SwHistory aHstr;
- aHstr.Move( 0, pHistory.get(), m_nSetPos );
- pHistory->Rollback( pDoc );
- pHistory->Move( 0, &aHstr );
+ aHstr.Move( 0, m_pHistory.get(), m_nSetPos );
+ m_pHistory->Rollback( pDoc );
+ m_pHistory->Move( 0, &aHstr );
}
else
{
- pHistory->Rollback( pDoc );
- pHistory.reset();
+ m_pHistory->Rollback( pDoc );
+ m_pHistory.reset();
}
}
}
@@ -752,25 +752,25 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
}
rPam.GetPoint()->nContent.Assign( pNd, m_nSelEnd );
- if( pHistory )
+ if( m_pHistory )
{
auto xSave = std::make_unique<SwHistory>();
- std::swap(pHistory, xSave);
+ std::swap(m_pHistory, xSave);
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
- m_nSetPos = pHistory->Count();
+ m_nSetPos = m_pHistory->Count();
- std::swap(xSave, pHistory);
- pHistory->Move(0, xSave.get());
+ std::swap(xSave, m_pHistory);
+ m_pHistory->Move(0, xSave.get());
}
else
{
- pHistory.reset( new SwHistory );
+ m_pHistory.reset( new SwHistory );
DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
- m_nSetPos = pHistory->Count();
+ m_nSetPos = m_pHistory->Count();
if( !m_nSetPos )
{
- pHistory.reset();
+ m_pHistory.reset();
}
}
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 0ff383652e62..934a7fa0a87c 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -48,49 +48,49 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
SwTextNode* pTextNd = pDoc->GetNodes()[ m_nSttNode ]->GetTextNode();
SwTextNode* pEndTextNd = pDoc->GetNodes()[ m_nEndNode ]->GetTextNode();
- pHistory.reset( new SwHistory );
+ m_pHistory.reset( new SwHistory );
if( pTextNd )
{
- pHistory->Add( pTextNd->GetTextColl(), m_nSttNode, SwNodeType::Text );
+ m_pHistory->Add( pTextNd->GetTextColl(), m_nSttNode, SwNodeType::Text );
if ( pTextNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
+ m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
0, pTextNd->GetText().getLength(), false );
}
if( pTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nSttNode );
+ m_pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nSttNode );
}
if( pEndTextNd && pEndTextNd != pTextNd )
{
- pHistory->Add( pEndTextNd->GetTextColl(), m_nEndNode, SwNodeType::Text );
+ m_pHistory->Add( pEndTextNd->GetTextColl(), m_nEndNode, SwNodeType::Text );
if ( pEndTextNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), m_nEndNode,
+ m_pHistory->CopyAttr( pEndTextNd->GetpSwpHints(), m_nEndNode,
0, pEndTextNd->GetText().getLength(), false );
}
if( pEndTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), m_nEndNode );
+ m_pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), m_nEndNode );
}
pTextNd = rMvPos.nNode.GetNode().GetTextNode();
if (nullptr != pTextNd)
{
- pHistory->Add( pTextNd->GetTextColl(), m_nMoveDestNode, SwNodeType::Text );
+ m_pHistory->Add( pTextNd->GetTextColl(), m_nMoveDestNode, SwNodeType::Text );
if ( pTextNd->GetpSwpHints() )
{
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nMoveDestNode,
+ m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nMoveDestNode,
0, pTextNd->GetText().getLength(), false );
}
if( pTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nMoveDestNode );
+ m_pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nMoveDestNode );
}
- m_nFootnoteStart = pHistory->Count();
+ m_nFootnoteStart = m_pHistory->Count();
DelFootnote( rRange );
- if( pHistory && !pHistory->Count() )
- pHistory.reset();
+ if( m_pHistory && !m_pHistory->Count() )
+ m_pHistory.reset();
}
SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
@@ -131,8 +131,8 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
DelContentIndex( aMkPos, aPtPos, DelContentType::Ftn );
- if( pHistory && !pHistory->Count() )
- pHistory.reset();
+ if( m_pHistory && !m_pHistory->Count() )
+ m_pHistory.reset();
}
m_nFootnoteStart = 0;
@@ -261,12 +261,12 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
} while( false );
- if( pHistory )
+ if( m_pHistory )
{
- if( m_nFootnoteStart != pHistory->Count() )
- pHistory->Rollback( pDoc, m_nFootnoteStart );
- pHistory->TmpRollback( pDoc, 0 );
- pHistory->SetTmpEnd( pHistory->Count() );
+ if( m_nFootnoteStart != m_pHistory->Count() )
+ m_pHistory->Rollback( pDoc, m_nFootnoteStart );
+ m_pHistory->TmpRollback( pDoc, 0 );
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
}
// set the cursor onto Undo area
@@ -340,9 +340,9 @@ void SwUndoMove::DelFootnote( const SwPaM& rRange )
DelContentIndex( *rRange.GetMark(), *rRange.GetPoint(),
DelContentType::Ftn );
- if( pHistory && !pHistory->Count() )
+ if( m_pHistory && !m_pHistory->Count() )
{
- pHistory.reset();
+ m_pHistory.reset();
}
}
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index f4218591a330..62bcdb7ef17e 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -69,10 +69,10 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
if( nSttContent < nTextNdLen ) // no pure insert?
{
aDelStr += OUStringLiteral1( pTextNd->GetText()[nSttContent] );
- if( !pHistory )
- pHistory.reset( new SwHistory );
- SwRegHistory aRHst( *pTextNd, pHistory.get() );
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), nSttNode, 0,
+ if( !m_pHistory )
+ m_pHistory.reset( new SwHistory );
+ SwRegHistory aRHst( *pTextNd, m_pHistory.get() );
+ m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), nSttNode, 0,
nTextNdLen, false );
++rPos.nContent;
bInsChar = false;
@@ -224,11 +224,11 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
--rIdx;
}
- if( pHistory )
+ if( m_pHistory )
{
if( pTextNd->GetpSwpHints() )
pTextNd->ClearSwpHintsArr( false );
- pHistory->TmpRollback( pDoc, 0, false );
+ m_pHistory->TmpRollback( pDoc, 0, false );
}
if( pCurrentPam->GetMark()->nContent.GetIndex() != nSttContent )
@@ -299,8 +299,8 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
pTextNd->SetIgnoreDontExpand( bOldExpFlg );
// get back old start position from UndoNodes array
- if( pHistory )
- pHistory->SetTmpEnd( pHistory->Count() );
+ if( m_pHistory )
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
if( pCurrentPam->GetMark()->nContent.GetIndex() != nSttContent )
{
pCurrentPam->SetMark();
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 1d759753b115..75d509d43004 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -65,17 +65,17 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
m_pTextFormatColl( nullptr ), m_pLastNodeColl(nullptr),
m_bStartWasTextNode( true ), m_nNodeDiff( 0 ), m_nSetPos( 0 )
{
- pHistory.reset( new SwHistory );
+ m_pHistory.reset( new SwHistory );
SwDoc* pDoc = rPam.GetDoc();
SwTextNode* pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode();
if( pTextNd )
{
m_pTextFormatColl = pTextNd->GetTextColl();
- pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
+ m_pHistory->CopyAttr( pTextNd->GetpSwpHints(), m_nSttNode,
0, pTextNd->GetText().getLength(), false );
if( pTextNd->HasSwAttrSet() )
- pHistory->CopyFormatAttr( *pTextNd->GetpSwAttrSet(), m_nSttNode );
+ m_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!)
@@ -263,7 +263,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
if (m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent)
{
// are there Footnotes or ContentFlyFrames in text?
- m_nSetPos = pHistory->Count();
+ m_nSetPos = m_pHistory->Count();
sal_uLong nTmp = rPam.GetMark()->nNode.GetIndex();
DelContentIndex(*rPam.GetMark(), *rPam.GetPoint(),
DelContentType::AllMask|DelContentType::ExcludeAtCharFlyAtStartEnd);
@@ -314,8 +314,8 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
if (rDoc.GetTextFormatColls()->IsAlive(m_pTextFormatColl))
m_pTextFormatColl = static_cast<SwTextFormatColl*>(pTextNode->ChgFormatColl( m_pTextFormatColl )) ;
- pHistory->SetTmpEnd( m_nSetPos );
- pHistory->TmpRollback(&rDoc, 0, false);
+ m_pHistory->SetTmpEnd( m_nSetPos );
+ m_pHistory->TmpRollback(&rDoc, 0, false);
}
}
}
@@ -337,7 +337,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
if( m_pTextFormatColl && pCNd && pCNd->IsTextNode() )
pSavTextFormatColl = static_cast<SwTextNode*>(pCNd)->GetTextColl();
- pHistory->SetTmpEnd( m_nSetPos );
+ m_pHistory->SetTmpEnd( m_nSetPos );
// retrieve start position for rollback
if( ( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent ) && m_pUndoNodeIndex)
@@ -390,7 +390,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
// tdf#108124 the SwHistoryChangeFlyAnchor/SwHistoryFlyCnt must run before
// m_FlyUndos as they were created by DelContentIndex()
- pHistory->Rollback( pDoc, m_nSetPos );
+ m_pHistory->Rollback( pDoc, m_nSetPos );
// tdf#108124 (10/25/2017)
// During UNDO we call SwUndoInsLayFormat::UndoImpl in reverse order,
More information about the Libreoffice-commits
mailing list