summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-04-20 09:02:30 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-04-20 09:42:55 +0200
commit5dad371b329f92d93e042ca8d3127ce99166c7b1 (patch)
treec8853cd8058c5c6fb9f8027f2ff7954aafd96498 /sw
parentc5df1ab9ba8331802acadc00f7ff949ed0b2dbc1 (diff)
sw: prefix members of SwPageDescHint, SwUndoPageDesc, ...
... SwUndoRedlineDelete and SwUndoRedlineSort See tdf#94879 for motivation. Change-Id: I0fc94a3028a0b776122e0891c321a0778ca68af3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92517 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/SwUndoPageDesc.hxx16
-rw-r--r--sw/source/core/inc/UndoRedline.hxx12
-rw-r--r--sw/source/core/inc/pagedeschint.hxx6
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx78
-rw-r--r--sw/source/core/undo/unredln.cxx34
5 files changed, 73 insertions, 73 deletions
diff --git a/sw/source/core/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx
index 48d8f6b28e95..acdaed7cc259 100644
--- a/sw/source/core/inc/SwUndoPageDesc.hxx
+++ b/sw/source/core/inc/SwUndoPageDesc.hxx
@@ -27,9 +27,9 @@ class SwDoc;
class SwUndoPageDesc : public SwUndo
{
- SwPageDescExt aOld, aNew;
- SwDoc * pDoc;
- bool bExchange;
+ SwPageDescExt m_aOld, m_aNew;
+ SwDoc * m_pDoc;
+ bool m_bExchange;
// To avoid duplication of (header/footer)content nodes for simple page desc changes
void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
@@ -47,9 +47,9 @@ public:
class SwUndoPageDescCreate : public SwUndo
{
- const SwPageDesc * pDesc;
- SwPageDescExt aNew;
- SwDoc * pDoc;
+ const SwPageDesc * m_pDesc;
+ SwPageDescExt m_aNew;
+ SwDoc * m_pDoc;
void DoImpl();
@@ -66,8 +66,8 @@ public:
class SwUndoPageDescDelete : public SwUndo
{
- SwPageDescExt aOld;
- SwDoc * pDoc;
+ SwPageDescExt m_aOld;
+ SwDoc * m_pDoc;
void DoImpl();
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index dd1c7a3a83d4..1688e2872578 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -52,9 +52,9 @@ public:
class SwUndoRedlineDelete : public SwUndoRedline
{
- bool bCanGroup : 1;
- bool bIsDelim : 1;
- bool bIsBackspace : 1;
+ bool m_bCanGroup : 1;
+ bool m_bIsDelim : 1;
+ bool m_bIsBackspace : 1;
OUString m_sRedlineText;
@@ -76,9 +76,9 @@ public:
class SwUndoRedlineSort : public SwUndoRedline
{
- std::unique_ptr<SwSortOptions> pOpt;
- sal_uLong nSaveEndNode;
- sal_Int32 nSaveEndContent;
+ std::unique_ptr<SwSortOptions> m_pOpt;
+ sal_uLong m_nSaveEndNode;
+ sal_Int32 m_nSaveEndContent;
virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
diff --git a/sw/source/core/inc/pagedeschint.hxx b/sw/source/core/inc/pagedeschint.hxx
index d76aa95d3e70..adee2319f2be 100644
--- a/sw/source/core/inc/pagedeschint.hxx
+++ b/sw/source/core/inc/pagedeschint.hxx
@@ -26,13 +26,13 @@ class SwPageDesc;
class SwPageDescHint : public SfxHint
{
- SwPageDesc* pPageDesc;
+ SwPageDesc* m_pPageDesc;
public:
SwPageDescHint( SwPageDesc* p )
- : pPageDesc(p)
+ : m_pPageDesc(p)
{}
- SwPageDesc* GetPageDesc() const { return pPageDesc; }
+ SwPageDesc* GetPageDesc() const { return m_pPageDesc; }
};
#endif
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index b0926499c293..1ca66f9fb760 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -36,9 +36,9 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
SwUndoId::RENAME_PAGEDESC :
SwUndoId::CHANGE_PAGEDESC,
_pDoc ),
- aOld(_aOld, _pDoc), aNew(_aNew, _pDoc), pDoc(_pDoc), bExchange( false )
+ m_aOld(_aOld, _pDoc), m_aNew(_aNew, _pDoc), m_pDoc(_pDoc), m_bExchange( false )
{
- OSL_ENSURE(nullptr != pDoc, "no document?");
+ OSL_ENSURE(nullptr != m_pDoc, "no document?");
/*
The page description changes.
@@ -47,8 +47,8 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
But this happens, this Undo Ctor will destroy the unnecessary duplicate and manipulate the
content pointer of the both page descriptions.
*/
- SwPageDesc &rOldDesc = aOld.m_PageDesc;
- SwPageDesc &rNewDesc = aNew.m_PageDesc;
+ SwPageDesc &rOldDesc = m_aOld.m_PageDesc;
+ SwPageDesc &rNewDesc = m_aNew.m_PageDesc;
const SwFormatHeader& rOldHead = rOldDesc.GetMaster().GetHeader();
const SwFormatHeader& rNewHead = rNewDesc.GetMaster().GetHeader();
const SwFormatFooter& rOldFoot = rOldDesc.GetMaster().GetFooter();
@@ -59,17 +59,17 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
#i67334#: changing the follow style
If header/footer will be activated or deactivated, this undo will not work.
*/
- bExchange = ( aOld.GetName() == aNew.GetName() ) &&
+ m_bExchange = ( m_aOld.GetName() == m_aNew.GetName() ) &&
( _aOld.GetFollow() == _aNew.GetFollow() ) &&
( rOldHead.IsActive() == rNewHead.IsActive() ) &&
( rOldFoot.IsActive() == rNewFoot.IsActive() );
if( rOldHead.IsActive() && ( rOldDesc.IsHeaderShared() != rNewDesc.IsHeaderShared() ) )
- bExchange = false;
+ m_bExchange = false;
if( rOldFoot.IsActive() && ( rOldDesc.IsFooterShared() != rNewDesc.IsFooterShared() ) )
- bExchange = false;
+ m_bExchange = false;
if( ( rOldHead.IsActive() || rOldFoot.IsActive() ) && ( rOldDesc.IsFirstShared() != rNewDesc.IsFirstShared() ) )
- bExchange = false;
- if( bExchange )
+ m_bExchange = false;
+ if( m_bExchange )
{
if( rNewHead.IsActive() )
{
@@ -117,7 +117,7 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
// After this exchange method the old page description will point to zero,
// the new one will point to the node position of the original content nodes.
- ExchangeContentNodes( aOld.m_PageDesc, aNew.m_PageDesc );
+ ExchangeContentNodes( m_aOld.m_PageDesc, m_aNew.m_PageDesc );
}
}
@@ -127,7 +127,7 @@ SwUndoPageDesc::~SwUndoPageDesc()
void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest )
{
- OSL_ENSURE( bExchange, "You shouldn't do that." );
+ OSL_ENSURE( m_bExchange, "You shouldn't do that." );
const SwFormatHeader& rDestHead = rDest.GetMaster().GetHeader();
const SwFormatHeader& rSourceHead = rSource.GetMaster().GetHeader();
if( rDestHead.IsActive() )
@@ -220,36 +220,36 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
void SwUndoPageDesc::UndoImpl(::sw::UndoRedoContext &)
{
// Move (header/footer)content node responsibility from new page descriptor to old one again.
- if( bExchange )
- ExchangeContentNodes( aNew.m_PageDesc, aOld.m_PageDesc );
- pDoc->ChgPageDesc(aOld.GetName(), aOld);
+ if( m_bExchange )
+ ExchangeContentNodes( m_aNew.m_PageDesc, m_aOld.m_PageDesc );
+ m_pDoc->ChgPageDesc(m_aOld.GetName(), m_aOld);
}
void SwUndoPageDesc::RedoImpl(::sw::UndoRedoContext &)
{
// Move (header/footer)content node responsibility from old page descriptor to new one again.
- if( bExchange )
- ExchangeContentNodes( aOld.m_PageDesc, aNew.m_PageDesc );
- pDoc->ChgPageDesc(aNew.GetName(), aNew);
+ if( m_bExchange )
+ ExchangeContentNodes( m_aOld.m_PageDesc, m_aNew.m_PageDesc );
+ m_pDoc->ChgPageDesc(m_aNew.GetName(), m_aNew);
}
SwRewriter SwUndoPageDesc::GetRewriter() const
{
SwRewriter aResult;
- aResult.AddRule(UndoArg1, aOld.GetName());
+ aResult.AddRule(UndoArg1, m_aOld.GetName());
aResult.AddRule(UndoArg2, SwResId(STR_YIELDS));
- aResult.AddRule(UndoArg3, aNew.GetName());
+ aResult.AddRule(UndoArg3, m_aNew.GetName());
return aResult;
}
SwUndoPageDescCreate::SwUndoPageDescCreate(const SwPageDesc * pNew,
SwDoc * _pDoc)
- : SwUndo(SwUndoId::CREATE_PAGEDESC, _pDoc), pDesc(pNew), aNew(*pNew, _pDoc),
- pDoc(_pDoc)
+ : SwUndo(SwUndoId::CREATE_PAGEDESC, _pDoc), m_pDesc(pNew), m_aNew(*pNew, _pDoc),
+ m_pDoc(_pDoc)
{
- OSL_ENSURE(nullptr != pDoc, "no document?");
+ OSL_ENSURE(nullptr != m_pDoc, "no document?");
}
SwUndoPageDescCreate::~SwUndoPageDescCreate()
@@ -258,19 +258,19 @@ SwUndoPageDescCreate::~SwUndoPageDescCreate()
void SwUndoPageDescCreate::UndoImpl(::sw::UndoRedoContext &)
{
- if (pDesc)
+ if (m_pDesc)
{
- aNew = *pDesc;
- pDesc = nullptr;
+ m_aNew = *m_pDesc;
+ m_pDesc = nullptr;
}
- pDoc->DelPageDesc(aNew.GetName(), true);
+ m_pDoc->DelPageDesc(m_aNew.GetName(), true);
}
void SwUndoPageDescCreate::DoImpl()
{
- SwPageDesc aPageDesc = aNew;
- pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, false, true);
+ SwPageDesc aPageDesc = m_aNew;
+ m_pDoc->MakePageDesc(m_aNew.GetName(), &aPageDesc, false, true);
}
void SwUndoPageDescCreate::RedoImpl(::sw::UndoRedoContext &)
@@ -280,7 +280,7 @@ void SwUndoPageDescCreate::RedoImpl(::sw::UndoRedoContext &)
void SwUndoPageDescCreate::RepeatImpl(::sw::RepeatContext &)
{
- ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ ::sw::UndoGuard const undoGuard(m_pDoc->GetIDocumentUndoRedo());
DoImpl();
}
@@ -288,19 +288,19 @@ SwRewriter SwUndoPageDescCreate::GetRewriter() const
{
SwRewriter aResult;
- if (pDesc)
- aResult.AddRule(UndoArg1, pDesc->GetName());
+ if (m_pDesc)
+ aResult.AddRule(UndoArg1, m_pDesc->GetName());
else
- aResult.AddRule(UndoArg1, aNew.GetName());
+ aResult.AddRule(UndoArg1, m_aNew.GetName());
return aResult;
}
SwUndoPageDescDelete::SwUndoPageDescDelete(const SwPageDesc & _aOld,
SwDoc * _pDoc)
- : SwUndo(SwUndoId::DELETE_PAGEDESC, _pDoc), aOld(_aOld, _pDoc), pDoc(_pDoc)
+ : SwUndo(SwUndoId::DELETE_PAGEDESC, _pDoc), m_aOld(_aOld, _pDoc), m_pDoc(_pDoc)
{
- OSL_ENSURE(nullptr != pDoc, "no document?");
+ OSL_ENSURE(nullptr != m_pDoc, "no document?");
}
SwUndoPageDescDelete::~SwUndoPageDescDelete()
@@ -309,13 +309,13 @@ SwUndoPageDescDelete::~SwUndoPageDescDelete()
void SwUndoPageDescDelete::UndoImpl(::sw::UndoRedoContext &)
{
- SwPageDesc aPageDesc = aOld;
- pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, false, true);
+ SwPageDesc aPageDesc = m_aOld;
+ m_pDoc->MakePageDesc(m_aOld.GetName(), &aPageDesc, false, true);
}
void SwUndoPageDescDelete::DoImpl()
{
- pDoc->DelPageDesc(aOld.GetName(), true);
+ m_pDoc->DelPageDesc(m_aOld.GetName(), true);
}
void SwUndoPageDescDelete::RedoImpl(::sw::UndoRedoContext &)
@@ -325,7 +325,7 @@ void SwUndoPageDescDelete::RedoImpl(::sw::UndoRedoContext &)
void SwUndoPageDescDelete::RepeatImpl(::sw::RepeatContext &)
{
- ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ ::sw::UndoGuard const undoGuard(m_pDoc->GetIDocumentUndoRedo());
DoImpl();
}
@@ -333,7 +333,7 @@ SwRewriter SwUndoPageDescDelete::GetRewriter() const
{
SwRewriter aResult;
- aResult.AddRule(UndoArg1, aOld.GetName());
+ aResult.AddRule(UndoArg1, m_aOld.GetName());
return aResult;
}
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 9e243053ee68..4b98043a6669 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -154,7 +154,7 @@ void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
: SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
- bCanGroup( false ), bIsDelim( false ), bIsBackspace( false )
+ m_bCanGroup( false ), m_bIsDelim( false ), m_bIsBackspace( false )
{
const SwTextNode* pTNd;
SetRedlineText(rRange.GetText());
@@ -165,10 +165,10 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
sal_Unicode const cCh = pTNd->GetText()[m_nSttContent];
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
{
- bCanGroup = true;
- bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetText(),
+ m_bCanGroup = true;
+ m_bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetText(),
m_nSttContent );
- bIsBackspace = m_nSttContent == rRange.GetPoint()->nContent.GetIndex();
+ m_bIsBackspace = m_nSttContent == rRange.GetPoint()->nContent.GetIndex();
}
}
@@ -211,9 +211,9 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
{
bool bRet = false;
if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
- bCanGroup == rNext.bCanGroup &&
- bIsDelim == rNext.bIsDelim &&
- bIsBackspace == rNext.bIsBackspace &&
+ m_bCanGroup == rNext.m_bCanGroup &&
+ m_bIsDelim == rNext.m_bIsDelim &&
+ m_bIsBackspace == rNext.m_bIsBackspace &&
m_nSttNode == m_nEndNode &&
rNext.m_nSttNode == m_nSttNode &&
rNext.m_nEndNode == m_nEndNode )
@@ -244,8 +244,8 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange,
const SwSortOptions& rOpt )
: SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
- pOpt( new SwSortOptions( rOpt ) ),
- nSaveEndNode( m_nEndNode ), nSaveEndContent( m_nEndContent )
+ m_pOpt( new SwSortOptions( rOpt ) ),
+ m_nSaveEndNode( m_nEndNode ), m_nSaveEndContent( m_nEndContent )
{
}
@@ -282,8 +282,8 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
SwPaM aTmp( *rPam.GetMark() );
aTmp.GetMark()->nContent = 0;
aTmp.SetMark();
- aTmp.GetPoint()->nNode = nSaveEndNode;
- aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), nSaveEndContent );
+ aTmp.GetPoint()->nNode = m_nSaveEndNode;
+ aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), m_nSaveEndContent );
rDoc.getIDocumentRedlineAccess().DeleteRedline( aTmp, true, RedlineType::Any );
}
@@ -315,7 +315,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
const sal_Int32 nCntStt = pStart->nContent.GetIndex();
- rDoc.SortText(rPam, *pOpt);
+ rDoc.SortText(rPam, *m_pOpt);
pPam->DeleteMark();
pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
@@ -333,20 +333,20 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
SetValues( rPam );
SetPaM( rPam );
- rPam.GetPoint()->nNode = nSaveEndNode;
- rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), nSaveEndContent );
+ rPam.GetPoint()->nNode = m_nSaveEndNode;
+ rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), m_nSaveEndContent );
}
void SwUndoRedlineSort::RepeatImpl(::sw::RepeatContext & rContext)
{
- rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *pOpt );
+ rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *m_pOpt );
}
void SwUndoRedlineSort::SetSaveRange( const SwPaM& rRange )
{
const SwPosition& rPos = *rRange.End();
- nSaveEndNode = rPos.nNode.GetIndex();
- nSaveEndContent = rPos.nContent.GetIndex();
+ m_nSaveEndNode = rPos.nNode.GetIndex();
+ m_nSaveEndContent = rPos.nContent.GetIndex();
}
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )