summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/inc/SwUndoFmt.hxx8
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx16
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx34
-rw-r--r--sw/source/core/undo/unnum.cxx76
4 files changed, 67 insertions, 67 deletions
diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index 17cafe144110..7ba6b1c348d1 100644
--- a/sw/source/core/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -82,8 +82,8 @@ public:
class SwUndoRenameFormat : public SwUndo
{
protected:
- OUString sOldName, sNewName;
- SwDoc * pDoc;
+ OUString m_sOldName, m_sNewName;
+ SwDoc * m_pDoc;
public:
SwUndoRenameFormat(SwUndoId nUndoId, const OUString & sOldName,
@@ -238,8 +238,8 @@ public:
class SwUndoNumruleRename : public SwUndo
{
- OUString aOldName, aNewName;
- SwDoc * pDoc;
+ OUString m_aOldName, m_aNewName;
+ SwDoc * m_pDoc;
public:
SwUndoNumruleRename(const OUString & aOldName, const OUString & aNewName,
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index 70e6149b383e..b83a78ec48e6 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -28,11 +28,11 @@
class SwUndoInsNum : public SwUndo, private SwUndRng
{
- SwNumRule aNumRule;
- std::unique_ptr<SwHistory> pHistory;
- std::unique_ptr<SwNumRule> pOldNumRule;
- OUString sReplaceRule;
- sal_uInt16 nLRSavePos;
+ SwNumRule m_aNumRule;
+ std::unique_ptr<SwHistory> m_pHistory;
+ std::unique_ptr<SwNumRule> m_pOldNumRule;
+ OUString m_sReplaceRule;
+ sal_uInt16 m_nLRSavePos;
public:
SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
@@ -64,8 +64,8 @@ class SwUndoDelNum : public SwUndo, private SwUndRng
int level;
NodeLevel(sal_uLong idx, int lvl) : index(idx), level(lvl) {};
};
- std::vector<NodeLevel> aNodes;
- std::unique_ptr<SwHistory> pHistory;
+ std::vector<NodeLevel> m_aNodes;
+ std::unique_ptr<SwHistory> m_pHistory;
public:
SwUndoDelNum( const SwPaM& rPam );
@@ -77,7 +77,7 @@ public:
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
void AddNode( const SwTextNode& rNd );
- SwHistory* GetHistory() { return pHistory.get(); }
+ SwHistory* GetHistory() { return m_pHistory.get(); }
};
class SwUndoMoveNum : public SwUndo, private SwUndRng
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index 02a93a1a8ead..d0e3798aab82 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -147,8 +147,8 @@ SwUndoRenameFormat::SwUndoRenameFormat(SwUndoId nUndoId,
const OUString & _sOldName,
const OUString & _sNewName,
SwDoc * _pDoc)
- : SwUndo(nUndoId, _pDoc), sOldName(_sOldName),
- sNewName(_sNewName), pDoc(_pDoc)
+ : SwUndo(nUndoId, _pDoc), m_sOldName(_sOldName),
+ m_sNewName(_sNewName), m_pDoc(_pDoc)
{
}
@@ -158,21 +158,21 @@ SwUndoRenameFormat::~SwUndoRenameFormat()
void SwUndoRenameFormat::UndoImpl(::sw::UndoRedoContext &)
{
- SwFormat * pFormat = Find(sNewName);
+ SwFormat * pFormat = Find(m_sNewName);
if (pFormat)
{
- pDoc->RenameFormat(*pFormat, sOldName, true);
+ m_pDoc->RenameFormat(*pFormat, m_sOldName, true);
}
}
void SwUndoRenameFormat::RedoImpl(::sw::UndoRedoContext &)
{
- SwFormat * pFormat = Find(sOldName);
+ SwFormat * pFormat = Find(m_sOldName);
if (pFormat)
{
- pDoc->RenameFormat(*pFormat, sNewName, true);
+ m_pDoc->RenameFormat(*pFormat, m_sNewName, true);
}
}
@@ -180,9 +180,9 @@ SwRewriter SwUndoRenameFormat::GetRewriter() const
{
SwRewriter aRewriter;
- aRewriter.AddRule(UndoArg1, sOldName);
+ aRewriter.AddRule(UndoArg1, m_sOldName);
aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
- aRewriter.AddRule(UndoArg3, sNewName);
+ aRewriter.AddRule(UndoArg3, m_sNewName);
return aRewriter;
}
@@ -260,7 +260,7 @@ SwUndoRenameFormatColl::SwUndoRenameFormatColl(const OUString & sInitOldName,
SwFormat * SwUndoRenameFormatColl::Find(const OUString & rName) const
{
- return pDoc->FindTextFormatCollByName(rName);
+ return m_pDoc->FindTextFormatCollByName(rName);
}
SwUndoCharFormatCreate::SwUndoCharFormatCreate(SwCharFormat * pNewFormat,
@@ -314,7 +314,7 @@ SwUndoRenameCharFormat::SwUndoRenameCharFormat(const OUString & sInitOldName,
SwFormat * SwUndoRenameCharFormat::Find(const OUString & rName) const
{
- return pDoc->FindCharFormatByName(rName);
+ return m_pDoc->FindCharFormatByName(rName);
}
SwUndoFrameFormatCreate::SwUndoFrameFormatCreate(SwFrameFormat * pNewFormat,
@@ -368,7 +368,7 @@ SwUndoRenameFrameFormat::SwUndoRenameFrameFormat(const OUString & sInitOldName,
SwFormat * SwUndoRenameFrameFormat::Find(const OUString & rName) const
{
- return pDoc->FindFrameFormatByName(rName);
+ return m_pDoc->FindFrameFormatByName(rName);
}
SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew,
@@ -437,28 +437,28 @@ SwRewriter SwUndoNumruleDelete::GetRewriter() const
SwUndoNumruleRename::SwUndoNumruleRename(const OUString & _aOldName,
const OUString & _aNewName,
SwDoc * _pDoc)
- : SwUndo(SwUndoId::NUMRULE_RENAME, _pDoc), aOldName(_aOldName), aNewName(_aNewName),
- pDoc(_pDoc)
+ : SwUndo(SwUndoId::NUMRULE_RENAME, _pDoc), m_aOldName(_aOldName), m_aNewName(_aNewName),
+ m_pDoc(_pDoc)
{
}
void SwUndoNumruleRename::UndoImpl(::sw::UndoRedoContext &)
{
- pDoc->RenameNumRule(aNewName, aOldName, true);
+ m_pDoc->RenameNumRule(m_aNewName, m_aOldName, true);
}
void SwUndoNumruleRename::RedoImpl(::sw::UndoRedoContext &)
{
- pDoc->RenameNumRule(aOldName, aNewName, true);
+ m_pDoc->RenameNumRule(m_aOldName, m_aNewName, true);
}
SwRewriter SwUndoNumruleRename::GetRewriter() const
{
SwRewriter aRewriter;
- aRewriter.AddRule(UndoArg1, aOldName);
+ aRewriter.AddRule(UndoArg1, m_aOldName);
aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
- aRewriter.AddRule(UndoArg3, aNewName);
+ aRewriter.AddRule(UndoArg3, m_aNewName);
return aRewriter;
}
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index c46f1689b96c..a4e4b39c04ff 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -31,23 +31,23 @@ SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule,
const SwDoc* pDoc,
SwUndoId nUndoId)
: SwUndo( nUndoId, pDoc ),
- aNumRule( rNewRule ),
- pOldNumRule( new SwNumRule( rOldRule )), nLRSavePos( 0 )
+ m_aNumRule( rNewRule ),
+ m_pOldNumRule( new SwNumRule( rOldRule )), m_nLRSavePos( 0 )
{
}
SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule )
: SwUndo( SwUndoId::INSNUM, rPam.GetDoc() ), SwUndRng( rPam ),
- aNumRule( rRule ),
- nLRSavePos( 0 )
+ m_aNumRule( rRule ),
+ m_nLRSavePos( 0 )
{
}
SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
const OUString& rReplaceRule )
: SwUndo( SwUndoId::INSNUM, rPos.nNode.GetNode().GetDoc() ),
- aNumRule( rRule ),
- sReplaceRule( rReplaceRule ), nLRSavePos( 0 )
+ m_aNumRule( rRule ),
+ m_sReplaceRule( rReplaceRule ), m_nLRSavePos( 0 )
{
// No selection!
m_nEndNode = 0;
@@ -58,15 +58,15 @@ SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
SwUndoInsNum::~SwUndoInsNum()
{
- pHistory.reset();
- pOldNumRule.reset();
+ m_pHistory.reset();
+ m_pOldNumRule.reset();
}
SwRewriter SwUndoInsNum::GetRewriter() const
{
SwRewriter aResult;
if( SwUndoId::INSFMTATTR == GetId() )
- aResult.AddRule(UndoArg1, aNumRule.GetName());
+ aResult.AddRule(UndoArg1, m_aNumRule.GetName());
return aResult;
}
@@ -74,19 +74,19 @@ void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- if( pOldNumRule )
- rDoc.ChgNumRuleFormats( *pOldNumRule );
+ if( m_pOldNumRule )
+ rDoc.ChgNumRuleFormats( *m_pOldNumRule );
- if( pHistory )
+ if( m_pHistory )
{
- if( nLRSavePos )
+ if( m_nLRSavePos )
{
// Update immediately so that potential "old" LRSpaces will be valid again.
- pHistory->TmpRollback( &rDoc, nLRSavePos );
+ m_pHistory->TmpRollback( &rDoc, m_nLRSavePos );
}
- pHistory->TmpRollback( &rDoc, 0 );
- pHistory->SetTmpEnd( pHistory->Count() );
+ m_pHistory->TmpRollback( &rDoc, 0 );
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
}
if (m_nSttNode)
@@ -99,27 +99,27 @@ void SwUndoInsNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- if ( pOldNumRule )
- rDoc.ChgNumRuleFormats( aNumRule );
- else if ( pHistory )
+ if ( m_pOldNumRule )
+ rDoc.ChgNumRuleFormats( m_aNumRule );
+ else if ( m_pHistory )
{
SwPaM & rPam( AddUndoRedoPaM(rContext) );
- if( !sReplaceRule.isEmpty() )
+ if( !m_sReplaceRule.isEmpty() )
{
- rDoc.ReplaceNumRule( *rPam.GetPoint(), sReplaceRule, aNumRule.GetName() );
+ rDoc.ReplaceNumRule( *rPam.GetPoint(), m_sReplaceRule, m_aNumRule.GetName() );
}
else
{
// #i42921# - adapt to changed signature
- rDoc.SetNumRule(rPam, aNumRule, false);
+ rDoc.SetNumRule(rPam, m_aNumRule, false);
}
}
}
void SwUndoInsNum::SetLRSpaceEndPos()
{
- if( pHistory )
- nLRSavePos = pHistory->Count();
+ if( m_pHistory )
+ m_nLRSavePos = m_pHistory->Count();
}
void SwUndoInsNum::RepeatImpl(::sw::RepeatContext & rContext)
@@ -127,36 +127,36 @@ void SwUndoInsNum::RepeatImpl(::sw::RepeatContext & rContext)
SwDoc & rDoc( rContext.GetDoc() );
if ( m_nSttNode )
{
- if( sReplaceRule.isEmpty() )
+ if( m_sReplaceRule.isEmpty() )
{
// #i42921# - adapt to changed signature
- rDoc.SetNumRule(rContext.GetRepeatPaM(), aNumRule, false);
+ rDoc.SetNumRule(rContext.GetRepeatPaM(), m_aNumRule, false);
}
}
else
{
- rDoc.ChgNumRuleFormats( aNumRule );
+ rDoc.ChgNumRuleFormats( m_aNumRule );
}
}
SwHistory* SwUndoInsNum::GetHistory()
{
- if( !pHistory )
- pHistory.reset(new SwHistory);
- return pHistory.get();
+ if( !m_pHistory )
+ m_pHistory.reset(new SwHistory);
+ return m_pHistory.get();
}
void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
{
- if( !pOldNumRule )
- pOldNumRule.reset(new SwNumRule( rOld ));
+ if( !m_pOldNumRule )
+ m_pOldNumRule.reset(new SwNumRule( rOld ));
}
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
: SwUndo( SwUndoId::DELNUM, rPam.GetDoc() ), SwUndRng( rPam )
{
- aNodes.reserve( std::min<sal_uLong>(m_nEndNode - m_nSttNode, 255) );
- pHistory.reset( new SwHistory );
+ m_aNodes.reserve( std::min<sal_uLong>(m_nEndNode - m_nSttNode, 255) );
+ m_pHistory.reset( new SwHistory );
}
SwUndoDelNum::~SwUndoDelNum()
@@ -167,10 +167,10 @@ void SwUndoDelNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- pHistory->TmpRollback( &rDoc, 0 );
- pHistory->SetTmpEnd( pHistory->Count() );
+ m_pHistory->TmpRollback( &rDoc, 0 );
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
- for( const auto& rNode : aNodes )
+ for( const auto& rNode : m_aNodes )
{
SwTextNode* pNd = rDoc.GetNodes()[ rNode.index ]->GetTextNode();
OSL_ENSURE( pNd, "Where has the TextNode gone?" );
@@ -198,7 +198,7 @@ void SwUndoDelNum::AddNode( const SwTextNode& rNd )
{
if( rNd.GetNumRule() )
{
- aNodes.emplace_back( rNd.GetIndex(), rNd.GetActualListLevel() );
+ m_aNodes.emplace_back( rNd.GetIndex(), rNd.GetActualListLevel() );
}
}