summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-02 09:30:39 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-02 10:34:50 +0100
commitd10d6270a48b7b3d4118e427d2fdd93c3248eb67 (patch)
tree00bb8e06ae06fe6d133eba40048b59d5e0a88600 /sw
parent9d2e98e695c9d58aa95b82d979a152d7265a2c0e (diff)
sw: prefix members of SwHashTable, SwSbxValue and SwServerObject
Change-Id: Ibd99ef57d1e80b14e8b2e3ed73dbbab7755a2ea8 Reviewed-on: https://gerrit.libreoffice.org/65802 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/calc.hxx30
-rw-r--r--sw/inc/swserv.hxx16
-rw-r--r--sw/source/core/doc/swserv.cxx70
3 files changed, 58 insertions, 58 deletions
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index ed517b89073c..220fe79d21c5 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -102,22 +102,22 @@ enum class SwCalcError
class SwSbxValue : public SbxValue
{
- bool bVoid;
- bool bDBvalue;
+ bool m_bVoid;
+ bool m_bDBvalue;
public:
// always default to a number. otherwise it will become a SbxEMPTY
- SwSbxValue( long n = 0 ) : bVoid(false), bDBvalue(false) { PutLong( n ); }
- SwSbxValue( const double& rD ) : bVoid(false), bDBvalue(false) { PutDouble( rD ); }
+ SwSbxValue( long n = 0 ) : m_bVoid(false), m_bDBvalue(false) { PutLong( n ); }
+ SwSbxValue( const double& rD ) : m_bVoid(false), m_bDBvalue(false) { PutDouble( rD ); }
bool GetBool() const;
double GetDouble() const;
SwSbxValue& MakeDouble();
- bool IsVoidValue() {return bVoid;}
- void SetVoidValue(bool bSet) {bVoid = bSet;}
+ bool IsVoidValue() {return m_bVoid;}
+ void SetVoidValue(bool bSet) {m_bVoid = bSet;}
- bool IsDBvalue() {return bDBvalue;}
- void SetDBvalue(bool bSet) {bDBvalue = bSet;}
+ bool IsDBvalue() {return m_bDBvalue;}
+ void SetDBvalue(bool bSet) {m_bDBvalue = bSet;}
};
// Calculate HashTables for VarTable and Operations
@@ -142,16 +142,16 @@ struct SwCalcExp : public SwHash
template<class T>
class SwHashTable
{
- std::vector<std::unique_ptr<T>> aData;
+ std::vector<std::unique_ptr<T>> m_aData;
public:
- SwHashTable(size_t nSize) : aData(nSize) {}
- std::unique_ptr<T> & operator[](size_t idx) { return aData[idx]; }
- std::unique_ptr<T> const & operator[](size_t idx) const { return aData[idx]; }
- void resize(size_t nSize) { aData.resize(nSize); }
+ SwHashTable(size_t nSize) : m_aData(nSize) {}
+ std::unique_ptr<T> & operator[](size_t idx) { return m_aData[idx]; }
+ std::unique_ptr<T> const & operator[](size_t idx) const { return m_aData[idx]; }
+ void resize(size_t nSize) { m_aData.resize(nSize); }
T* Find( const OUString& rStr, sal_uInt16* pPos = nullptr ) const
{
- size_t nTableSize = aData.size();
+ size_t nTableSize = m_aData.size();
sal_uLong ii = 0;
for( sal_Int32 n = 0; n < rStr.getLength(); ++n )
{
@@ -162,7 +162,7 @@ public:
if( pPos )
*pPos = static_cast<sal_uInt16>(ii);
- for( T* pEntry = aData[ii].get(); pEntry; pEntry = static_cast<T*>(pEntry->pNext.get()) )
+ for( T* pEntry = m_aData[ii].get(); pEntry; pEntry = static_cast<T*>(pEntry->pNext.get()) )
{
if( rStr == pEntry->aStr )
{
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
index fea95f2c93f3..f82d288a035a 100644
--- a/sw/inc/swserv.hxx
+++ b/sw/inc/swserv.hxx
@@ -32,28 +32,28 @@ class SwServerObject final : public ::sfx2::SvLinkSource
{
using sfx2::SvLinkSource::SendDataChanged;
- enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType;
+ enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } m_eType;
union {
::sw::mark::IMark* pBkmk;
SwTableNode* pTableNd;
SwSectionNode* pSectNd;
- } CNTNT_TYPE;
+ } m_CNTNT_TYPE;
public:
SwServerObject( ::sw::mark::IMark& rBookmark )
- : eType( BOOKMARK_SERVER )
+ : m_eType( BOOKMARK_SERVER )
{
- CNTNT_TYPE.pBkmk = &rBookmark;
+ m_CNTNT_TYPE.pBkmk = &rBookmark;
}
SwServerObject( SwTableNode& rTableNd )
- : eType( TABLE_SERVER )
+ : m_eType( TABLE_SERVER )
{
- CNTNT_TYPE.pTableNd = &rTableNd;
+ m_CNTNT_TYPE.pTableNd = &rTableNd;
}
SwServerObject( SwSectionNode& rSectNd )
- : eType( SECTION_SERVER )
+ : m_eType( SECTION_SERVER )
{
- CNTNT_TYPE.pSectNd = &rSectNd;
+ m_CNTNT_TYPE.pSectNd = &rSectNd;
}
virtual ~SwServerObject() override;
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 8fd23844c09a..6bf133cbf352 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -61,27 +61,27 @@ bool SwServerObject::GetData( uno::Any & rData,
if( xWrt.is() )
{
SwPaM* pPam = nullptr;
- switch( eType )
+ switch( m_eType )
{
case BOOKMARK_SERVER:
- if( CNTNT_TYPE.pBkmk->IsExpanded() )
+ if( m_CNTNT_TYPE.pBkmk->IsExpanded() )
{
// Span area
- pPam = new SwPaM( CNTNT_TYPE.pBkmk->GetMarkPos(),
- CNTNT_TYPE.pBkmk->GetOtherMarkPos() );
+ pPam = new SwPaM( m_CNTNT_TYPE.pBkmk->GetMarkPos(),
+ m_CNTNT_TYPE.pBkmk->GetOtherMarkPos() );
}
break;
case TABLE_SERVER:
- pPam = new SwPaM( *CNTNT_TYPE.pTableNd,
- *CNTNT_TYPE.pTableNd->EndOfSectionNode() );
+ pPam = new SwPaM( *m_CNTNT_TYPE.pTableNd,
+ *m_CNTNT_TYPE.pTableNd->EndOfSectionNode() );
break;
case SECTION_SERVER:
- pPam = new SwPaM( SwPosition( *CNTNT_TYPE.pSectNd ) );
+ pPam = new SwPaM( SwPosition( *m_CNTNT_TYPE.pSectNd ) );
pPam->Move( fnMoveForward );
pPam->SetMark();
- pPam->GetPoint()->nNode = *CNTNT_TYPE.pSectNd->EndOfSectionNode();
+ pPam->GetPoint()->nNode = *m_CNTNT_TYPE.pSectNd->EndOfSectionNode();
pPam->Move( fnMoveBackward );
break;
case NONE_SERVER: break;
@@ -113,18 +113,18 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
{
bool bCall = false;
const SwStartNode* pNd = nullptr;
- switch( eType )
+ switch( m_eType )
{
case BOOKMARK_SERVER:
- if( CNTNT_TYPE.pBkmk->IsExpanded() )
+ if( m_CNTNT_TYPE.pBkmk->IsExpanded() )
{
- bCall = CNTNT_TYPE.pBkmk->GetMarkStart() <= rPos
- && rPos < CNTNT_TYPE.pBkmk->GetMarkEnd();
+ bCall = m_CNTNT_TYPE.pBkmk->GetMarkStart() <= rPos
+ && rPos < m_CNTNT_TYPE.pBkmk->GetMarkEnd();
}
break;
- case TABLE_SERVER: pNd = CNTNT_TYPE.pTableNd; break;
- case SECTION_SERVER: pNd = CNTNT_TYPE.pSectNd; break;
+ case TABLE_SERVER: pNd = m_CNTNT_TYPE.pTableNd; break;
+ case SECTION_SERVER: pNd = m_CNTNT_TYPE.pSectNd; break;
case NONE_SERVER: break;
}
if( pNd )
@@ -150,18 +150,18 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
bool bCall = false;
const SwStartNode* pNd = nullptr;
const SwPosition* pStt = rRange.Start(), *pEnd = rRange.End();
- switch( eType )
+ switch( m_eType )
{
case BOOKMARK_SERVER:
- if(CNTNT_TYPE.pBkmk->IsExpanded())
+ if(m_CNTNT_TYPE.pBkmk->IsExpanded())
{
- bCall = *pStt <= CNTNT_TYPE.pBkmk->GetMarkEnd()
- && *pEnd > CNTNT_TYPE.pBkmk->GetMarkStart();
+ bCall = *pStt <= m_CNTNT_TYPE.pBkmk->GetMarkEnd()
+ && *pEnd > m_CNTNT_TYPE.pBkmk->GetMarkStart();
}
break;
- case TABLE_SERVER: pNd = CNTNT_TYPE.pTableNd; break;
- case SECTION_SERVER: pNd = CNTNT_TYPE.pSectNd; break;
+ case TABLE_SERVER: pNd = m_CNTNT_TYPE.pTableNd; break;
+ case SECTION_SERVER: pNd = m_CNTNT_TYPE.pSectNd; break;
case NONE_SERVER: break;
}
if( pNd )
@@ -186,13 +186,13 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
const SwNode* pNd = nullptr;
const SwNodes* pNds = nullptr;
- switch( eType )
+ switch( m_eType )
{
case BOOKMARK_SERVER:
- if( CNTNT_TYPE.pBkmk->IsExpanded() )
+ if( m_CNTNT_TYPE.pBkmk->IsExpanded() )
{
- const SwPosition* pStt = &CNTNT_TYPE.pBkmk->GetMarkStart(),
- * pEnd = &CNTNT_TYPE.pBkmk->GetMarkEnd();
+ const SwPosition* pStt = &m_CNTNT_TYPE.pBkmk->GetMarkStart(),
+ * pEnd = &m_CNTNT_TYPE.pBkmk->GetMarkEnd();
nSttNd = pStt->nNode.GetIndex();
nEndNd = pEnd->nNode.GetIndex();
@@ -200,8 +200,8 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
}
break;
- case TABLE_SERVER: pNd = CNTNT_TYPE.pTableNd; break;
- case SECTION_SERVER: pNd = CNTNT_TYPE.pSectNd; break;
+ case TABLE_SERVER: pNd = m_CNTNT_TYPE.pTableNd; break;
+ case SECTION_SERVER: pNd = m_CNTNT_TYPE.pSectNd; break;
case SECTION_SERVER+1:
return true;
@@ -220,9 +220,9 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
const ::sfx2::SvBaseLinks& rLnks = pNds->GetDoc()->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
// To avoid recursions: convert ServerType!
- SwServerObject::ServerModes eSave = eType;
+ SwServerObject::ServerModes eSave = m_eType;
if( !pChkLnk )
- const_cast<SwServerObject*>(this)->eType = NONE_SERVER;
+ const_cast<SwServerObject*>(this)->m_eType = NONE_SERVER;
for( size_t n = rLnks.size(); n; )
{
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
@@ -242,7 +242,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
}
}
if( !pChkLnk )
- const_cast<SwServerObject*>(this)->eType = eSave;
+ const_cast<SwServerObject*>(this)->m_eType = eSave;
}
return false;
@@ -250,13 +250,13 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
void SwServerObject::SetNoServer()
{
- if(eType == BOOKMARK_SERVER && CNTNT_TYPE.pBkmk)
+ if(m_eType == BOOKMARK_SERVER && m_CNTNT_TYPE.pBkmk)
{
- ::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< ::sw::mark::DdeBookmark* >(CNTNT_TYPE.pBkmk);
+ ::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< ::sw::mark::DdeBookmark* >(m_CNTNT_TYPE.pBkmk);
if(pDdeBookmark)
{
- CNTNT_TYPE.pBkmk = nullptr;
- eType = NONE_SERVER;
+ m_CNTNT_TYPE.pBkmk = nullptr;
+ m_eType = NONE_SERVER;
pDdeBookmark->SetRefObject(nullptr);
}
}
@@ -267,8 +267,8 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< ::sw::mark::DdeBookmark* >(&rBookmark);
if(pDdeBookmark)
{
- eType = BOOKMARK_SERVER;
- CNTNT_TYPE.pBkmk = &rBookmark;
+ m_eType = BOOKMARK_SERVER;
+ m_CNTNT_TYPE.pBkmk = &rBookmark;
pDdeBookmark->SetRefObject(this);
}
else