[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 3 07:55:19 UTC 2021
sw/inc/docstyle.hxx | 14 ++--
sw/source/core/unocore/unodraw.cxx | 24 +++----
sw/source/core/unocore/unoframe.cxx | 6 -
sw/source/uibase/app/docstyle.cxx | 116 ++++++++++++++++++------------------
4 files changed, 80 insertions(+), 80 deletions(-)
New commits:
commit 8c3ba8ac759e661f9402e0b5651d7e1914e72b66
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon May 3 08:45:44 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 3 09:54:43 2021 +0200
sw: prefix members of BaseFrameProperties_Impl, SwDocStyleSheetPool, ...
... SwShapeDescriptor_Impl and SwStyleSheetIterator
See tdf#94879 for motivation.
Change-Id: I5602b7e94da0e5b004a45bed56d8c231b11004f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115023
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 96731e758c39..520404389fe9 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -164,9 +164,9 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
rtl::Reference< SwDocStyleSheet > mxIterSheet;
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
- SwPoolFormatList aLst;
- sal_uInt32 nLastPos;
- bool bFirstCalled;
+ SwPoolFormatList m_aLst;
+ sal_uInt32 m_nLastPos;
+ bool m_bFirstCalled;
void AppendStyleList(const std::vector<OUString>& rLst,
bool bUsed,
@@ -194,8 +194,8 @@ public:
class SwDocStyleSheetPool : public SfxStyleSheetBasePool
{
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
- SwDoc& rDoc;
- bool bOrganizer : 1; ///< Organizer
+ SwDoc& m_rDoc;
+ bool m_bOrganizer : 1; ///< Organizer
virtual rtl::Reference<SfxStyleSheetBase> Create( const OUString&, SfxStyleFamily, SfxStyleSearchBits nMask) override;
virtual rtl::Reference<SfxStyleSheetBase> Create( const SfxStyleSheetBase& ) override;
@@ -216,11 +216,11 @@ public:
virtual void Remove( SfxStyleSheetBase* pStyle) override;
- bool IsOrganizerMode() const { return bOrganizer; }
+ bool IsOrganizerMode() const { return m_bOrganizer; }
virtual std::unique_ptr<SfxStyleSheetIterator> CreateIterator( SfxStyleFamily, SfxStyleSearchBits nMask = SfxStyleSearchBits::All) override;
- SwDoc& GetDoc() const { return rDoc; }
+ SwDoc& GetDoc() const { return m_rDoc; }
void dispose();
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2dd384de7f26..6c336b2738fd 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -88,8 +88,8 @@ class SwShapeDescriptor_Impl
std::unique_ptr<SwFormatSurround> m_pSurround;
std::unique_ptr<SvxULSpaceItem> m_pULSpace;
std::unique_ptr<SvxLRSpaceItem> m_pLRSpace;
- bool bOpaque;
- uno::Reference< text::XTextRange > xTextRange;
+ bool m_bOpaque;
+ uno::Reference< text::XTextRange > m_xTextRange;
// #i26791#
std::unique_ptr<SwFormatFollowTextFlow> m_pFollowTextFlow;
// #i28701#
@@ -101,14 +101,14 @@ class SwShapeDescriptor_Impl
SwShapeDescriptor_Impl& operator=(const SwShapeDescriptor_Impl&) = delete;
public:
- bool bInitializedPropertyNotifier;
+ bool m_bInitializedPropertyNotifier;
public:
SwShapeDescriptor_Impl(SwDoc const*const pDoc)
: m_isInReading(pDoc && pDoc->IsInReading())
// #i32349# - no defaults, in order to determine on
// adding a shape, if positioning attributes are set or not.
- , bOpaque(false)
+ , m_bOpaque(false)
// #i26791#
, m_pFollowTextFlow( new SwFormatFollowTextFlow(false) )
// #i28701# #i35017#
@@ -116,7 +116,7 @@ public:
text::WrapInfluenceOnPosition::ONCE_CONCURRENT) )
// #i28749#
, mnPositionLayoutDir(text::PositionLayoutDir::PositionInLayoutDirOfAnchor)
- , bInitializedPropertyNotifier(false)
+ , m_bInitializedPropertyNotifier(false)
{}
SwFormatAnchor* GetAnchor(bool bCreate = false)
@@ -179,15 +179,15 @@ public:
}
uno::Reference< text::XTextRange > & GetTextRange()
{
- return xTextRange;
+ return m_xTextRange;
}
bool IsOpaque() const
{
- return bOpaque;
+ return m_bOpaque;
}
const bool& GetOpaque() const
{
- return bOpaque;
+ return m_bOpaque;
}
void RemoveHOrient() { m_pHOrient.reset(); }
void RemoveVOrient() { m_pVOrient.reset(); }
@@ -195,7 +195,7 @@ public:
void RemoveSurround() { m_pSurround.reset(); }
void RemoveULSpace() { m_pULSpace.reset(); }
void RemoveLRSpace() { m_pLRSpace.reset(); }
- void SetOpaque(bool bSet){bOpaque = bSet;}
+ void SetOpaque(bool bSet){m_bOpaque = bSet;}
// #i26791#
SwFormatFollowTextFlow* GetFollowTextFlow( bool _bCreate = false )
@@ -922,7 +922,7 @@ SwXShape::SwXShape(
SetFrameFormat(pFormat);
lcl_addShapePropertyEventFactories( *pObj, *this );
- m_pImpl->bInitializedPropertyNotifier = true;
+ m_pImpl->m_bInitializedPropertyNotifier = true;
}
}
@@ -948,10 +948,10 @@ void SwXShape::AddExistingShapeToFormat( SdrObject const & _rObj )
pSwShape->m_bDescriptor = false;
}
- if ( !pSwShape->m_pImpl->bInitializedPropertyNotifier )
+ if ( !pSwShape->m_pImpl->m_bInitializedPropertyNotifier )
{
lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape );
- pSwShape->m_pImpl->bInitializedPropertyNotifier = true;
+ pSwShape->m_pImpl->m_bInitializedPropertyNotifier = true;
}
}
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 76318143d1e5..894e4db8733b 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -140,7 +140,7 @@ using ::com::sun::star::style::XStyleFamiliesSupplier;
class BaseFrameProperties_Impl
{
- SwUnoCursorHelper::SwAnyMapHelper aAnyMap;
+ SwUnoCursorHelper::SwAnyMapHelper m_aAnyMap;
public:
virtual ~BaseFrameProperties_Impl();
@@ -158,12 +158,12 @@ BaseFrameProperties_Impl::~BaseFrameProperties_Impl()
void BaseFrameProperties_Impl::SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal)
{
- aAnyMap.SetValue( nWID, nMemberId, rVal );
+ m_aAnyMap.SetValue( nWID, nMemberId, rVal );
}
bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& rpAny)
{
- return aAnyMap.FillValue( nWID, nMemberId, rpAny );
+ return m_aAnyMap.FillValue( nWID, nMemberId, rpAny );
}
bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet& rFromSet, bool& rSizeFound)
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index ce8a92633018..015812df184e 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2405,9 +2405,9 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, bool bOrg )
: SfxStyleSheetBasePool(rDocument.GetAttrPool())
, mxStyleSheet(new SwDocStyleSheet(rDocument, *this))
- , rDoc(rDocument)
+ , m_rDoc(rDocument)
{
- bOrganizer = bOrg;
+ m_bOrganizer = bOrg;
}
SwDocStyleSheetPool::~SwDocStyleSheetPool()
@@ -2458,40 +2458,40 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
return;
bool bBroadcast = true;
- SwImplShellAction aTmpSh( rDoc );
+ SwImplShellAction aTmpSh( m_rDoc );
const OUString sName = pStyle->GetName();
switch( pStyle->GetFamily() )
{
case SfxStyleFamily::Char:
{
- SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, nullptr, false );
+ SwCharFormat* pFormat = lcl_FindCharFormat(m_rDoc, sName, nullptr, false );
if(pFormat)
- rDoc.DelCharFormat(pFormat);
+ m_rDoc.DelCharFormat(pFormat);
}
break;
case SfxStyleFamily::Para:
{
- SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, nullptr, false );
+ SwTextFormatColl* pColl = lcl_FindParaFormat(m_rDoc, sName, nullptr, false );
if(pColl)
- rDoc.DelTextFormatColl(pColl);
+ m_rDoc.DelTextFormatColl(pColl);
}
break;
case SfxStyleFamily::Frame:
{
- SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, nullptr, false );
+ SwFrameFormat* pFormat = lcl_FindFrameFormat(m_rDoc, sName, nullptr, false );
if(pFormat)
- rDoc.DelFrameFormat(pFormat);
+ m_rDoc.DelFrameFormat(pFormat);
}
break;
case SfxStyleFamily::Page :
{
- rDoc.DelPageDesc(sName);
+ m_rDoc.DelPageDesc(sName);
}
break;
case SfxStyleFamily::Pseudo:
{
- if( !rDoc.DelNumRule( sName ) )
+ if( !m_rDoc.DelNumRule( sName ) )
// Only send Broadcast, when something was deleted
bBroadcast = false;
}
@@ -2499,7 +2499,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
case SfxStyleFamily::Table:
{
- rDoc.DelTableStyle(sName);
+ m_rDoc.DelTableStyle(sName);
}
break;
@@ -2519,18 +2519,18 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
switch( eFam )
{
case SfxStyleFamily::Char :
- if( nullptr != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
- pParent = lcl_FindCharFormat(rDoc, rParent );
+ if( nullptr != ( pFormat = lcl_FindCharFormat( m_rDoc, rStyle ) ) && !rParent.isEmpty() )
+ pParent = lcl_FindCharFormat(m_rDoc, rParent );
break;
case SfxStyleFamily::Para :
- if( nullptr != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
- pParent = lcl_FindParaFormat( rDoc, rParent );
+ if( nullptr != ( pFormat = lcl_FindParaFormat( m_rDoc, rStyle ) ) && !rParent.isEmpty() )
+ pParent = lcl_FindParaFormat( m_rDoc, rParent );
break;
case SfxStyleFamily::Frame:
- if( nullptr != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
- pParent = lcl_FindFrameFormat( rDoc, rParent );
+ if( nullptr != ( pFormat = lcl_FindFrameFormat( m_rDoc, rStyle ) ) && !rParent.isEmpty() )
+ pParent = lcl_FindFrameFormat( m_rDoc, rParent );
break;
case SfxStyleFamily::Page:
@@ -2546,7 +2546,7 @@ bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
pFormat->DerivedFrom()->GetName() != rParent )
{
{
- SwImplShellAction aTmpSh( rDoc );
+ SwImplShellAction aTmpSh( m_rDoc );
bRet = pFormat->SetDerivedFrom( pParent );
}
@@ -2572,7 +2572,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
SfxStyleFamily eFam, SfxStyleSearchBits n )
{
SfxStyleSearchBits nSMask = n;
- if( SfxStyleFamily::Para == eFam && rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) )
+ if( SfxStyleFamily::Para == eFam && m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) )
{
// then only HTML-Templates are of interest
if( SfxStyleSearchBits::All == nSMask )
@@ -2655,8 +2655,8 @@ SwStyleSheetIterator::SwStyleSheetIterator(SwDocStyleSheetPool& rBase,
, mxIterSheet(new SwDocStyleSheet(rBase.GetDoc(), rBase))
, mxStyleSheet(new SwDocStyleSheet(rBase.GetDoc(), rBase))
{
- bFirstCalled = false;
- nLastPos = 0;
+ m_bFirstCalled = false;
+ m_nLastPos = 0;
StartListening(rBase);
}
@@ -2668,17 +2668,17 @@ SwStyleSheetIterator::~SwStyleSheetIterator()
sal_Int32 SwStyleSheetIterator::Count()
{
// let the list fill correctly!!
- if( !bFirstCalled )
+ if( !m_bFirstCalled )
First();
- return aLst.size();
+ return m_aLst.size();
}
SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_Int32 nIdx )
{
// found
- if( !bFirstCalled )
+ if( !m_bFirstCalled )
First();
- mxStyleSheet->PresetNameAndFamily( aLst[ nIdx ] );
+ mxStyleSheet->PresetNameAndFamily( m_aLst[ nIdx ] );
mxStyleSheet->SetPhysical( false );
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
@@ -2688,9 +2688,9 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_Int32 nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
// Delete old list
- bFirstCalled = true;
- nLastPos = 0;
- aLst.clear();
+ m_bFirstCalled = true;
+ m_nLastPos = 0;
+ m_aLst.clear();
// Delete current
mxIterSheet->Reset();
@@ -2743,7 +2743,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- aLst.Append( cCHAR, pFormat == rDoc.GetDfltCharFormat()
+ m_aLst.Append( cCHAR, pFormat == rDoc.GetDfltCharFormat()
? SwResId(STR_POOLCHR_STANDARD)
: pFormat->GetName() );
}
@@ -2757,13 +2757,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
SwGetPoolIdFromName::ChrFmt, cCHAR);
else
{
- aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
+ m_aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
RES_POOLCHR_INET_NORMAL - RES_POOLCHR_BEGIN ] );
- aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
+ m_aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
RES_POOLCHR_INET_VISIT - RES_POOLCHR_BEGIN ] );
- aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
+ m_aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
RES_POOLCHR_ENDNOTE - RES_POOLCHR_BEGIN ] );
- aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
+ m_aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[
RES_POOLCHR_FOOTNOTE - RES_POOLCHR_BEGIN ] );
}
AppendStyleList(SwStyleNameMapper::GetHTMLChrFormatUINameArray(),
@@ -2872,7 +2872,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
}
- aLst.Append( cPARA, pColl->GetName() );
+ m_aLst.Append( cPARA, pColl->GetName() );
}
bAll = ( nSMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
@@ -2895,7 +2895,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
{
if( !bIsSearchUsed ||
rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( RES_POOLCOLL_TEXT ))
- aLst.Append( cPARA, SwStyleNameMapper::GetTextUINameArray()[
+ m_aLst.Append( cPARA, SwStyleNameMapper::GetTextUINameArray()[
RES_POOLCOLL_TEXT - RES_POOLCOLL_TEXT_BEGIN ] );
}
if ( bAll ||
@@ -2933,7 +2933,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( !bIsSearchUsed || rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( *pPoolIds ) )
{
s = SwStyleNameMapper::GetUIName( *pPoolIds, s );
- aLst.Append( cPARA, s);
+ m_aLst.Append( cPARA, s);
}
++pPoolIds;
}
@@ -2968,7 +2968,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
}
}
- aLst.Append( cFRAME, pFormat->GetName() );
+ m_aLst.Append( cFRAME, pFormat->GetName() );
}
// PoolFormat
@@ -2999,7 +2999,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if ( nSrchMask == SfxStyleSearchBits::Hidden && !rDesc.IsHidden( ) )
continue;
- aLst.Append( cPAGE, rDesc.GetName() );
+ m_aLst.Append( cPAGE, rDesc.GetName() );
}
if ( bAll )
AppendStyleList(SwStyleNameMapper::GetPageDescUINameArray(),
@@ -3029,7 +3029,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- aLst.Append( cNUMRULE, rRule.GetName() );
+ m_aLst.Append( cNUMRULE, rRule.GetName() );
}
}
if ( bAll )
@@ -3059,7 +3059,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- aLst.Append( cTABSTYLE, rTableStyle.GetName() );
+ m_aLst.Append( cTABSTYLE, rTableStyle.GetName() );
}
}
@@ -3080,18 +3080,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
OUString sBoxFormatName;
SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, SwGetPoolIdFromName::TabStyle);
sBoxFormatName += rTableStyle.GetTableTemplateCellSubName(rBoxFormat);
- aLst.Append( cCELLSTYLE, sBoxFormatName );
+ m_aLst.Append( cCELLSTYLE, sBoxFormatName );
}
}
}
const SwCellStyleTable& rCellStyles = rDoc.GetCellStyles();
for(size_t i = 0; i < rCellStyles.size(); ++i)
- aLst.Append( cCELLSTYLE, rCellStyles[i].GetName() );
+ m_aLst.Append( cCELLSTYLE, rCellStyles[i].GetName() );
}
- if(!aLst.empty())
+ if(!m_aLst.empty())
{
- nLastPos = SAL_MAX_UINT32;
+ m_nLastPos = SAL_MAX_UINT32;
return Next();
}
return nullptr;
@@ -3099,11 +3099,11 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
SfxStyleSheetBase* SwStyleSheetIterator::Next()
{
- assert(bFirstCalled);
- ++nLastPos;
- if(nLastPos < aLst.size())
+ assert(m_bFirstCalled);
+ ++m_nLastPos;
+ if(m_nLastPos < m_aLst.size())
{
- mxIterSheet->PresetNameAndFamily(aLst[nLastPos]);
+ mxIterSheet->PresetNameAndFamily(m_aLst[m_nLastPos]);
mxIterSheet->SetPhysical( false );
mxIterSheet->SetMask( nMask );
if(mxIterSheet->pSet)
@@ -3119,14 +3119,14 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName)
{
// searching
- if( !bFirstCalled )
+ if( !m_bFirstCalled )
First();
- nLastPos = aLst.FindName( nSearchFamily, rName );
- if( SAL_MAX_UINT32 != nLastPos )
+ m_nLastPos = m_aLst.FindName( nSearchFamily, rName );
+ if( SAL_MAX_UINT32 != m_nLastPos )
{
// found
- mxStyleSheet->PresetNameAndFamily(aLst[nLastPos]);
+ mxStyleSheet->PresetNameAndFamily(m_aLst[m_nLastPos]);
// new name is set, so determine its Data
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
@@ -3190,7 +3190,7 @@ void SwStyleSheetIterator::AppendStyleList(const std::vector<OUString>& rList,
bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) );
if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) )
- aLst.Append( cType, i );
+ m_aLst.Append( cType, i );
}
}
@@ -3205,9 +3205,9 @@ void SwStyleSheetIterator::InvalidateIterator()
// potentially we could send an SfxHint to Notify but currently it's
// iterating over the vector anyway so would still be slow - why does
// this iterator not use a map?
- bFirstCalled = false;
- nLastPos = 0;
- aLst.clear();
+ m_bFirstCalled = false;
+ m_nLastPos = 0;
+ m_aLst.clear();
}
void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -3220,7 +3220,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
SfxStyleSheetBase* pStyle = pStyleSheetHint->GetStyleSheet();
if (pStyle)
- aLst.RemoveName(pStyle->GetFamily(), pStyle->GetName());
+ m_aLst.RemoveName(pStyle->GetFamily(), pStyle->GetName());
}
}
More information about the Libreoffice-commits
mailing list