[Libreoffice-commits] core.git: 4 commits - sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Nov 4 00:11:51 PST 2015
sw/inc/swregion.hxx | 6 +--
sw/inc/tblsel.hxx | 14 ++++----
sw/source/core/bastyp/swcache.cxx | 18 +++++------
sw/source/core/bastyp/swregion.cxx | 6 +--
sw/source/core/inc/frmtool.hxx | 10 +++---
sw/source/core/inc/swcache.hxx | 28 ++++++++---------
sw/source/core/layout/frmtool.cxx | 60 ++++++++++++++++++-------------------
7 files changed, 71 insertions(+), 71 deletions(-)
New commits:
commit 2e6327e4e8c35678a7a52b8b1a78c99caff1f73f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Nov 4 09:10:06 2015 +0100
sw: prefix members of SwCacheObj
Change-Id: I416c43f5f6819029e279bc2f5fb696b59917ef06
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 58e722b..5181732 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -422,11 +422,11 @@ void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
}
SwCacheObj::SwCacheObj( const void *pOwn ) :
- pNext( 0 ),
- pPrev( 0 ),
- nCachePos( USHRT_MAX ),
- nLock( 0 ),
- pOwner( pOwn )
+ m_pNext( 0 ),
+ m_pPrev( 0 ),
+ m_nCachePos( USHRT_MAX ),
+ m_nLock( 0 ),
+ m_pOwner( pOwn )
{
}
@@ -437,14 +437,14 @@ SwCacheObj::~SwCacheObj()
#ifdef DBG_UTIL
void SwCacheObj::Lock()
{
- OSL_ENSURE( nLock < UCHAR_MAX, "Too many Locks for CacheObject." );
- ++nLock;
+ OSL_ENSURE( m_nLock < UCHAR_MAX, "Too many Locks for CacheObject." );
+ ++m_nLock;
}
void SwCacheObj::Unlock()
{
- OSL_ENSURE( nLock, "No more Locks available." );
- --nLock;
+ OSL_ENSURE( m_nLock, "No more Locks available." );
+ --m_nLock;
}
#endif
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 9897a20..1fa3093 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -136,34 +136,34 @@ class SwCacheObj
{
friend class SwCache; /// Can do everything
- SwCacheObj *pNext; /// For the LRU chaining
- SwCacheObj *pPrev;
+ SwCacheObj *m_pNext; /// For the LRU chaining
+ SwCacheObj *m_pPrev;
- sal_uInt16 nCachePos; /// Position in the Cache array
+ sal_uInt16 m_nCachePos; /// Position in the Cache array
- sal_uInt8 nLock;
+ sal_uInt8 m_nLock;
- inline SwCacheObj *GetNext() { return pNext; }
- inline SwCacheObj *GetPrev() { return pPrev; }
- inline void SetNext( SwCacheObj *pNew ) { pNext = pNew; }
- inline void SetPrev( SwCacheObj *pNew ) { pPrev = pNew; }
+ inline SwCacheObj *GetNext() { return m_pNext; }
+ inline SwCacheObj *GetPrev() { return m_pPrev; }
+ inline void SetNext( SwCacheObj *pNew ) { m_pNext = pNew; }
+ inline void SetPrev( SwCacheObj *pNew ) { m_pPrev = pNew; }
- inline void SetCachePos( const sal_uInt16 nNew ) { nCachePos = nNew; }
+ inline void SetCachePos( const sal_uInt16 nNew ) { m_nCachePos = nNew; }
protected:
- const void *pOwner;
+ const void *m_pOwner;
public:
SwCacheObj( const void *pOwner );
virtual ~SwCacheObj();
- inline const void *GetOwner() const { return pOwner; }
+ inline const void *GetOwner() const { return m_pOwner; }
inline bool IsOwner( const void *pNew ) const;
- inline sal_uInt16 GetCachePos() const { return nCachePos; }
+ inline sal_uInt16 GetCachePos() const { return m_nCachePos; }
- inline bool IsLocked() const { return 0 != nLock; }
+ inline bool IsLocked() const { return 0 != m_nLock; }
#ifdef DBG_UTIL
void Lock();
@@ -230,7 +230,7 @@ inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
inline bool SwCacheObj::IsOwner( const void *pNew ) const
{
- return pOwner && pOwner == pNew;
+ return m_pOwner && m_pOwner == pNew;
}
inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 6928c12..eb107c1 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1867,7 +1867,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor)
SwBorderAttrs::~SwBorderAttrs()
{
- const_cast<SwModify *>(static_cast<SwModify const *>(pOwner))->SetInCache( false );
+ const_cast<SwModify *>(static_cast<SwModify const *>(m_pOwner))->SetInCache( false );
}
/* All calc methods calculate a safety distance in addition to the values given by the attributes.
commit 37e0e10fd8335eb4b6d25e542cdf163020e8d452
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Nov 4 09:09:59 2015 +0100
sw: prefix members of SwOrderIter
Change-Id: I9bea22d07a95eb521d9c3729b2aba1694cf02def
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index d40a2c4..7d746ff 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -392,15 +392,15 @@ public:
// SortArray needs to be traversed.
class SwOrderIter
{
- const SwPageFrm *pPage;
- const SdrObject *pCurrent;
- const bool bFlysOnly;
+ const SwPageFrm *m_pPage;
+ const SdrObject *m_pCurrent;
+ const bool m_bFlysOnly;
public:
SwOrderIter( const SwPageFrm *pPage, bool bFlysOnly = true );
- void Current( const SdrObject *pNew ) { pCurrent = pNew; }
- const SdrObject *operator()() const { return pCurrent; }
+ void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
+ const SdrObject *operator()() const { return m_pCurrent; }
const SdrObject *Top();
const SdrObject *Bottom();
const SdrObject *Next();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index ce1db40..6928c12 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2226,18 +2226,18 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
}
SwOrderIter::SwOrderIter( const SwPageFrm *pPg, bool bFlys ) :
- pPage( pPg ),
- pCurrent( 0 ),
- bFlysOnly( bFlys )
+ m_pPage( pPg ),
+ m_pCurrent( 0 ),
+ m_bFlysOnly( bFlys )
{
}
const SdrObject *SwOrderIter::Top()
{
- pCurrent = 0;
- if ( pPage->GetSortedObjs() )
+ m_pCurrent = 0;
+ if ( m_pPage->GetSortedObjs() )
{
- const SwSortedObjs *pObjs = pPage->GetSortedObjs();
+ const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
if ( pObjs->size() )
{
sal_uInt32 nTopOrd = 0;
@@ -2245,82 +2245,82 @@ const SdrObject *SwOrderIter::Top()
for ( size_t i = 0; i < pObjs->size(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
- if ( bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
+ if ( m_bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp >= nTopOrd )
{
nTopOrd = nTmp;
- pCurrent = pObj;
+ m_pCurrent = pObj;
}
}
}
}
- return pCurrent;
+ return m_pCurrent;
}
const SdrObject *SwOrderIter::Bottom()
{
- pCurrent = 0;
- if ( pPage->GetSortedObjs() )
+ m_pCurrent = 0;
+ if ( m_pPage->GetSortedObjs() )
{
sal_uInt32 nBotOrd = USHRT_MAX;
- const SwSortedObjs *pObjs = pPage->GetSortedObjs();
+ const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
if ( pObjs->size() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); // force updating
for ( size_t i = 0; i < pObjs->size(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
- if ( bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
+ if ( m_bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nBotOrd )
{
nBotOrd = nTmp;
- pCurrent = pObj;
+ m_pCurrent = pObj;
}
}
}
}
- return pCurrent;
+ return m_pCurrent;
}
const SdrObject *SwOrderIter::Next()
{
- const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
- pCurrent = 0;
- if ( pPage->GetSortedObjs() )
+ const sal_uInt32 nCurOrd = m_pCurrent ? m_pCurrent->GetOrdNumDirect() : 0;
+ m_pCurrent = 0;
+ if ( m_pPage->GetSortedObjs() )
{
sal_uInt32 nOrd = USHRT_MAX;
- const SwSortedObjs *pObjs = pPage->GetSortedObjs();
+ const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
if ( pObjs->size() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); // force updating
for ( size_t i = 0; i < pObjs->size(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
- if ( bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
+ if ( m_bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp > nCurOrd && nTmp < nOrd )
{
nOrd = nTmp;
- pCurrent = pObj;
+ m_pCurrent = pObj;
}
}
}
}
- return pCurrent;
+ return m_pCurrent;
}
const SdrObject *SwOrderIter::Prev()
{
- const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
- pCurrent = 0;
- if ( pPage->GetSortedObjs() )
+ const sal_uInt32 nCurOrd = m_pCurrent ? m_pCurrent->GetOrdNumDirect() : 0;
+ m_pCurrent = 0;
+ if ( m_pPage->GetSortedObjs() )
{
- const SwSortedObjs *pObjs = pPage->GetSortedObjs();
+ const SwSortedObjs *pObjs = m_pPage->GetSortedObjs();
if ( pObjs->size() )
{
sal_uInt32 nOrd = 0;
@@ -2328,18 +2328,18 @@ const SdrObject *SwOrderIter::Prev()
for ( size_t i = 0; i < pObjs->size(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
- if ( bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
+ if ( m_bFlysOnly && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr )
continue;
sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nCurOrd && nTmp >= nOrd )
{
nOrd = nTmp;
- pCurrent = pObj;
+ m_pCurrent = pObj;
}
}
}
}
- return pCurrent;
+ return m_pCurrent;
}
/// Keep and restore the substructure of a layout frame for an action.
commit 47f1529ca3f193f64929a3f777c578f25f3613a6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Nov 4 09:07:05 2015 +0100
sw: prefix members of SwRegionRects
Change-Id: Ib59572c45a1404840c379318e4987f5223edca15
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
index b290e21..5a4d762 100644
--- a/sw/inc/swregion.hxx
+++ b/sw/inc/swregion.hxx
@@ -27,7 +27,7 @@ typedef std::vector<SwRect> SwRects;
class SwRegionRects : public SwRects
{
- SwRect aOrigin; // Copy of StartRect.
+ SwRect m_aOrigin; // Copy of StartRect.
inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, bool &rDel);
@@ -44,8 +44,8 @@ public:
// Combine adjacent rectangles.
void Compress( bool bFuzzy = true );
- inline const SwRect &GetOrigin() const { return aOrigin; }
- inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
+ inline const SwRect &GetOrigin() const { return m_aOrigin; }
+ inline void ChangeOrigin( const SwRect &rRect ) { m_aOrigin = rRect; }
};
#endif // INCLUDED_SW_INC_SWREGION_HXX
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index 5e5cc6d..922c1c9 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -23,10 +23,10 @@
SwRegionRects::SwRegionRects( const SwRect &rStartRect, sal_uInt16 nInit ) :
SwRects(),
- aOrigin( rStartRect )
+ m_aOrigin( rStartRect )
{
reserve(nInit);
- push_back( aOrigin );
+ push_back( m_aOrigin );
}
// If <rDel> is true then this Rect will be overwritten by <rRect> at
@@ -127,7 +127,7 @@ void SwRegionRects::Invert()
// To avoid unnecessary memory requirements, create a "useful" initial size:
// Number of rectangles in this area * 2 + 2 for the special case of a
// single hole (so four Rects in the inverse case).
- SwRegionRects aInvRegion( aOrigin, size()*2+2 );
+ SwRegionRects aInvRegion( m_aOrigin, size()*2+2 );
for( const_iterator it = begin(); it != end(); ++it )
aInvRegion -= *it;
commit c93db89a8f025a44ede88d16f01d11f41a818bbb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Nov 4 09:05:00 2015 +0100
sw: prefix members of SwSelUnion
Change-Id: I636454036f007dbf568f74b17e1c4c79fb36f40b
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index cf12758..b6c8950 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -121,17 +121,17 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
// For working on tab selection also for split tables.
class SwSelUnion
{
- SwRect aUnion; // The rectangle enclosing the selection.
- SwTabFrm *pTable; // The (Follow-)Table for the Union.
+ SwRect m_aUnion; // The rectangle enclosing the selection.
+ SwTabFrm *m_pTable; // The (Follow-)Table for the Union.
public:
SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) :
- aUnion( rRect ), pTable( pTab ) {}
+ m_aUnion( rRect ), m_pTable( pTab ) {}
- const SwRect& GetUnion() const { return aUnion; }
- SwRect& GetUnion() { return aUnion; }
- const SwTabFrm *GetTable() const { return pTable; }
- SwTabFrm *GetTable() { return pTable; }
+ const SwRect& GetUnion() const { return m_aUnion; }
+ SwRect& GetUnion() { return m_aUnion; }
+ const SwTabFrm *GetTable() const { return m_pTable; }
+ SwTabFrm *GetTable() { return m_pTable; }
};
// Determines tables affected by a table selection and union rectangles
More information about the Libreoffice-commits
mailing list