summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-05-10 09:00:52 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-05-10 11:36:40 +0200
commit7ef207a79e13cbb3a98b03d7370e741f5796186c (patch)
treecabad3d0fb567c1329fb33189b15dd3cd9dd1078 /sw/source
parent5def21945183b9e4cd86f6c941873a7e5d5d5f67 (diff)
sw: prefix members of SwAutoStylesEnumImpl, SwXRedline, ...
... SwXRedlineEnumeration and SwXRedlineText See tdf#94879 for motivation. Change-Id: I58a7077522264856e84ae53fe9134509b6640690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115308 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unoredline.cxx58
-rw-r--r--sw/source/core/unocore/unoredlines.cxx20
-rw-r--r--sw/source/core/unocore/unostyle.cxx22
3 files changed, 50 insertions, 50 deletions
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index f1c7a6d3fe10..a54a6ec885d7 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -45,13 +45,13 @@ using namespace ::com::sun::star;
SwXRedlineText::SwXRedlineText(SwDoc* _pDoc, const SwNodeIndex& aIndex) :
SwXText(_pDoc, CursorType::Redline),
- aNodeIndex(aIndex)
+ m_aNodeIndex(aIndex)
{
}
const SwStartNode* SwXRedlineText::GetStartNode() const
{
- return aNodeIndex.GetNode().GetStartNode();
+ return m_aNodeIndex.GetNode().GetStartNode();
}
uno::Any SwXRedlineText::queryInterface( const uno::Type& rType )
@@ -93,7 +93,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor()
{
SolarMutexGuard aGuard;
- SwPosition aPos(aNodeIndex);
+ SwPosition aPos(m_aNodeIndex);
rtl::Reference<SwXTextCursor> pXCursor =
new SwXTextCursor(*GetDoc(), this, CursorType::Redline, aPos);
auto& rUnoCursor(pXCursor->GetCursor());
@@ -143,7 +143,7 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange(
uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration()
{
SolarMutexGuard aGuard;
- SwPaM aPam(aNodeIndex);
+ SwPaM aPam(m_aNodeIndex);
aPam.Move(fnMoveForward, GoInNode);
auto pUnoCursor(GetDoc()->CreateUnoCursor(*aPam.Start()));
return SwXParagraphEnumeration::Create(this, pUnoCursor, CursorType::Redline);
@@ -341,10 +341,10 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties
SwXRedline::SwXRedline(SwRangeRedline& rRedline, SwDoc& rDoc) :
SwXText(&rDoc, CursorType::Redline),
- pDoc(&rDoc),
- pRedline(&rRedline)
+ m_pDoc(&rDoc),
+ m_pRedline(&rRedline)
{
- StartListening(pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
+ StartListening(m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
}
SwXRedline::~SwXRedline()
@@ -361,7 +361,7 @@ uno::Reference< beans::XPropertySetInfo > SwXRedline::getPropertySetInfo( )
void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any& aValue )
{
SolarMutexGuard aGuard;
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
if(rPropertyName == UNO_NAME_REDLINE_AUTHOR)
{
@@ -374,7 +374,7 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
else if(rPropertyName == UNO_NAME_REDLINE_COMMENT)
{
OUString sTmp; aValue >>= sTmp;
- pRedline->SetComment(sTmp);
+ m_pRedline->SetComment(sTmp);
}
else if(rPropertyName == UNO_NAME_REDLINE_DESCRIPTION)
{
@@ -400,7 +400,7 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
{
SolarMutexGuard aGuard;
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
uno::Any aRet;
bool bStart = rPropertyName == UNO_NAME_REDLINE_START;
@@ -408,9 +408,9 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
rPropertyName == UNO_NAME_REDLINE_END)
{
uno::Reference<XInterface> xRet;
- SwNode* pNode = &pRedline->GetNode();
- if(!bStart && pRedline->HasMark())
- pNode = &pRedline->GetNode(false);
+ SwNode* pNode = &m_pRedline->GetNode();
+ if(!bStart && m_pRedline->HasMark())
+ pNode = &m_pRedline->GetNode(false);
switch(pNode->GetNodeType())
{
case SwNodeType::Section:
@@ -432,12 +432,12 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
case SwNodeType::Text :
{
SwPosition* pPoint = nullptr;
- if(bStart || !pRedline->HasMark())
- pPoint = pRedline->GetPoint();
+ if(bStart || !m_pRedline->HasMark())
+ pPoint = m_pRedline->GetPoint();
else
- pPoint = pRedline->GetMark();
+ pPoint = m_pRedline->GetMark();
const uno::Reference<text::XTextRange> xRange =
- SwXTextRange::CreateXTextRange(*pDoc, *pPoint, nullptr);
+ SwXTextRange::CreateXTextRange(*m_pDoc, *pPoint, nullptr);
xRet = xRange.get();
}
break;
@@ -448,12 +448,12 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
}
else if(rPropertyName == UNO_NAME_REDLINE_TEXT)
{
- SwNodeIndex* pNodeIdx = pRedline->GetContentIdx();
+ SwNodeIndex* pNodeIdx = m_pRedline->GetContentIdx();
if( pNodeIdx )
{
if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) )
{
- uno::Reference<text::XText> xRet = new SwXRedlineText(pDoc, *pNodeIdx);
+ uno::Reference<text::XText> xRet = new SwXRedlineText(m_pDoc, *pNodeIdx);
aRet <<= xRet;
}
else {
@@ -462,7 +462,7 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
}
}
else
- aRet = SwXRedlinePortion::GetPropertyValue(rPropertyName, *pRedline);
+ aRet = SwXRedlinePortion::GetPropertyValue(rPropertyName, *m_pRedline);
return aRet;
}
@@ -491,8 +491,8 @@ void SwXRedline::Notify( const SfxHint& rHint )
{
if(rHint.GetId() == SfxHintId::Dying)
{
- pDoc = nullptr;
- pRedline = nullptr;
+ m_pDoc = nullptr;
+ m_pRedline = nullptr;
} else if(auto pHint = dynamic_cast<const sw::FindRedlineHint*>(&rHint)) {
if(!*pHint->m_ppXRedline && &pHint->m_rRedline == GetRedline())
*pHint->m_ppXRedline = this;
@@ -502,10 +502,10 @@ void SwXRedline::Notify( const SfxHint& rHint )
uno::Reference< container::XEnumeration > SwXRedline::createEnumeration()
{
SolarMutexGuard aGuard;
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
- SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
+ SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
if(!pNodeIndex)
return nullptr;
SwPaM aPam(*pNodeIndex);
@@ -521,18 +521,18 @@ uno::Type SwXRedline::getElementType( )
sal_Bool SwXRedline::hasElements( )
{
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
- return nullptr != pRedline->GetContentIdx();
+ return nullptr != m_pRedline->GetContentIdx();
}
uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
{
SolarMutexGuard aGuard;
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
- SwNodeIndex* pNodeIndex = pRedline->GetContentIdx();
+ SwNodeIndex* pNodeIndex = m_pRedline->GetContentIdx();
if(!pNodeIndex)
{
throw uno::RuntimeException();
@@ -540,7 +540,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor()
SwPosition aPos(*pNodeIndex);
rtl::Reference<SwXTextCursor> pXCursor =
- new SwXTextCursor(*pDoc, this, CursorType::Redline, aPos);
+ new SwXTextCursor(*m_pDoc, this, CursorType::Redline, aPos);
auto& rUnoCursor(pXCursor->GetCursor());
rUnoCursor.Move(fnMoveForward, GoInNode);
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 637e16b52c6b..572bb7756647 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -115,10 +115,10 @@ beans::XPropertySet* SwXRedlines::GetObject( SwRangeRedline& rRedline, SwDoc& rD
}
SwXRedlineEnumeration::SwXRedlineEnumeration(SwDoc& rDoc) :
- pDoc(&rDoc),
- nCurrentIndex(0)
+ m_pDoc(&rDoc),
+ m_nCurrentIndex(0)
{
- StartListening(pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
+ StartListening(m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
}
SwXRedlineEnumeration::~SwXRedlineEnumeration()
@@ -127,19 +127,19 @@ SwXRedlineEnumeration::~SwXRedlineEnumeration()
sal_Bool SwXRedlineEnumeration::hasMoreElements()
{
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
- return pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() > nCurrentIndex;
+ return m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() > m_nCurrentIndex;
}
uno::Any SwXRedlineEnumeration::nextElement()
{
- if(!pDoc)
+ if(!m_pDoc)
throw uno::RuntimeException();
- const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
- if( rRedTable.size() <= nCurrentIndex )
+ const SwRedlineTable& rRedTable = m_pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ if( rRedTable.size() <= m_nCurrentIndex )
throw container::NoSuchElementException();
- uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTable[nCurrentIndex++], *pDoc );
+ uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTable[m_nCurrentIndex++], *m_pDoc );
uno::Any aRet;
aRet <<= xRet;
return aRet;
@@ -163,7 +163,7 @@ uno::Sequence< OUString > SwXRedlineEnumeration::getSupportedServiceNames()
void SwXRedlineEnumeration::Notify( const SfxHint& rHint )
{
if(rHint.GetId() == SfxHintId::Dying)
- pDoc = nullptr;
+ m_pDoc = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 4a84cfd531d5..6633906e5346 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3393,15 +3393,15 @@ const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex[] =
class SwAutoStylesEnumImpl
{
std::vector<std::shared_ptr<SfxItemSet>> mAutoStyles;
- std::vector<std::shared_ptr<SfxItemSet>>::iterator aIter;
- SwDoc& rDoc;
- IStyleAccess::SwAutoStyleFamily eFamily;
+ std::vector<std::shared_ptr<SfxItemSet>>::iterator m_aIter;
+ SwDoc& m_rDoc;
+ IStyleAccess::SwAutoStyleFamily m_eFamily;
public:
SwAutoStylesEnumImpl( SwDoc& rInitDoc, IStyleAccess::SwAutoStyleFamily eFam );
- bool hasMoreElements() { return aIter != mAutoStyles.end(); }
- std::shared_ptr<SfxItemSet> const & nextElement() { return *(aIter++); }
- IStyleAccess::SwAutoStyleFamily getFamily() const { return eFamily; }
- SwDoc& getDoc() const { return rDoc; }
+ bool hasMoreElements() { return m_aIter != mAutoStyles.end(); }
+ std::shared_ptr<SfxItemSet> const & nextElement() { return *(m_aIter++); }
+ IStyleAccess::SwAutoStyleFamily getFamily() const { return m_eFamily; }
+ SwDoc& getDoc() const { return m_rDoc; }
};
SwXAutoStyles::SwXAutoStyles(SwDocShell& rDocShell) :
@@ -3767,13 +3767,13 @@ sal_Bool SwXAutoStyleFamily::hasElements( )
}
SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc& rInitDoc, IStyleAccess::SwAutoStyleFamily eFam )
-: rDoc( rInitDoc ), eFamily( eFam )
+: m_rDoc( rInitDoc ), m_eFamily( eFam )
{
// special case for ruby auto styles:
if ( IStyleAccess::AUTO_STYLE_RUBY == eFam )
{
std::set< std::pair< sal_uInt16, text::RubyAdjust > > aRubyMap;
- SwAttrPool& rAttrPool = rDoc.GetAttrPool();
+ SwAttrPool& rAttrPool = m_rDoc.GetAttrPool();
// do this in two phases otherwise we invalidate the iterators when we insert into the pool
std::vector<const SwFormatRuby*> vRubyItems;
@@ -3796,10 +3796,10 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc& rInitDoc, IStyleAccess::SwAut
}
else
{
- rDoc.GetIStyleAccess().getAllStyles( mAutoStyles, eFamily );
+ m_rDoc.GetIStyleAccess().getAllStyles( mAutoStyles, m_eFamily );
}
- aIter = mAutoStyles.begin();
+ m_aIter = mAutoStyles.begin();
}
SwXAutoStylesEnumerator::SwXAutoStylesEnumerator( SwDoc& rDoc, IStyleAccess::SwAutoStyleFamily eFam )