[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Jun 13 09:06:20 UTC 2016


 sw/source/core/bastyp/swcache.cxx   |   18 +++++++++---------
 sw/source/core/inc/swcache.hxx      |   32 ++++++++++++++++----------------
 sw/source/core/layout/frmtool.cxx   |    4 ++--
 sw/source/core/text/txtcache.cxx    |   10 +++++-----
 sw/source/core/txtnode/fntcache.cxx |   10 +++++-----
 sw/source/core/txtnode/swfntcch.cxx |    4 ++--
 6 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit 1d02beda2cc2867e693ddb8c3e6ad99ad77ae65c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 13 09:10:00 2016 +0200

    sw: prefix members of SwCacheAccess
    
    Change-Id: Ia18ad7e283898418118237c1997a6ee72c468341
    Reviewed-on: https://gerrit.libreoffice.org/26209
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index c1efc78..964eb96 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -450,29 +450,29 @@ void SwCacheObj::Unlock()
 
 SwCacheAccess::~SwCacheAccess()
 {
-    if ( pObj )
-        pObj->Unlock();
+    if ( m_pObj )
+        m_pObj->Unlock();
 }
 
 void SwCacheAccess::Get_()
 {
-    OSL_ENSURE( !pObj, "SwCacheAcces Obj already available." );
+    OSL_ENSURE( !m_pObj, "SwCacheAcces Obj already available." );
 
-    pObj = NewObj();
-    if ( !rCache.Insert( pObj ) )
+    m_pObj = NewObj();
+    if ( !m_rCache.Insert( m_pObj ) )
     {
-        delete pObj;
-        pObj = nullptr;
+        delete m_pObj;
+        m_pObj = nullptr;
     }
     else
     {
-        pObj->Lock();
+        m_pObj->Lock();
     }
 }
 
 bool SwCacheAccess::IsAvailable() const
 {
-    return pObj != nullptr;
+    return m_pObj != nullptr;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 0401562..7784e01 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -187,13 +187,13 @@ public:
  */
 class SwCacheAccess
 {
-    SwCache &rCache;
+    SwCache &m_rCache;
 
     void Get_();
 
 protected:
-    SwCacheObj *pObj;
-    const void *pOwner; /// Can be use in NewObj
+    SwCacheObj *m_pObj;
+    const void *m_pOwner; /// Can be use in NewObj
 
     virtual SwCacheObj *NewObj() = 0;
 
@@ -209,7 +209,7 @@ public:
 
     /// Shorthand for those who know that they did not override isAvailable()
     /// FIXME: wtf?
-    bool IsAvail() const { return pObj != nullptr; }
+    bool IsAvail() const { return m_pObj != nullptr; }
 };
 
 inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
@@ -242,29 +242,29 @@ inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
 }
 
 inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, bool bSeek ) :
-    rCache( rC ),
-    pObj( nullptr ),
-    pOwner( pOwn )
+    m_rCache( rC ),
+    m_pObj( nullptr ),
+    m_pOwner( pOwn )
 {
-    if ( bSeek && pOwner && nullptr != (pObj = rCache.Get( pOwner )) )
-        pObj->Lock();
+    if ( bSeek && m_pOwner && nullptr != (m_pObj = m_rCache.Get( m_pOwner )) )
+        m_pObj->Lock();
 }
 
 inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn,
                               const sal_uInt16 nIndex ) :
-    rCache( rC ),
-    pObj( nullptr ),
-    pOwner( pOwn )
+    m_rCache( rC ),
+    m_pObj( nullptr ),
+    m_pOwner( pOwn )
 {
-    if ( pOwner && nullptr != (pObj = rCache.Get( pOwner, nIndex )) )
-        pObj->Lock();
+    if ( m_pOwner && nullptr != (m_pObj = m_rCache.Get( m_pOwner, nIndex )) )
+        m_pObj->Lock();
 }
 
 inline SwCacheObj *SwCacheAccess::Get()
 {
-    if ( !pObj )
+    if ( !m_pObj )
         Get_();
-    return pObj;
+    return m_pObj;
 }
 
 #endif
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 2f6980f..9ff86a0 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2213,8 +2213,8 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrame *pFrame )
 
 SwCacheObj *SwBorderAttrAccess::NewObj()
 {
-    const_cast<SwModify *>(static_cast<SwModify const *>(pOwner))->SetInCache( true );
-    return new SwBorderAttrs( static_cast<SwModify const *>(pOwner), pConstructor );
+    const_cast<SwModify *>(static_cast<SwModify const *>(m_pOwner))->SetInCache( true );
+    return new SwBorderAttrs( static_cast<SwModify const *>(m_pOwner), pConstructor );
 }
 
 SwBorderAttrs *SwBorderAttrAccess::Get()
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 9f3a3df..4cc22f2 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -34,18 +34,18 @@ SwTextLine::~SwTextLine()
 
 SwCacheObj *SwTextLineAccess::NewObj()
 {
-    return new SwTextLine( const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner)) );
+    return new SwTextLine( const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(m_pOwner)) );
 }
 
 SwParaPortion *SwTextLineAccess::GetPara()
 {
     SwTextLine *pRet;
-    if ( pObj )
-        pRet = static_cast<SwTextLine*>(pObj);
+    if ( m_pObj )
+        pRet = static_cast<SwTextLine*>(m_pObj);
     else
     {
         pRet = static_cast<SwTextLine*>(Get());
-        const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(pOwner))->SetCacheIdx( pRet->GetCachePos() );
+        const_cast<SwTextFrame *>(static_cast<SwTextFrame const *>(m_pOwner))->SetCacheIdx( pRet->GetCachePos() );
     }
     if ( !pRet->GetPara() )
         pRet->SetPara( new SwParaPortion );
@@ -59,7 +59,7 @@ SwTextLineAccess::SwTextLineAccess( const SwTextFrame *pOwn ) :
 
 bool SwTextLineAccess::IsAvailable() const
 {
-    return pObj && static_cast<SwTextLine*>(pObj)->GetPara();
+    return m_pObj && static_cast<SwTextLine*>(m_pObj)->GetPara();
 }
 
 bool SwTextFrame::HasPara_() const
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 94bb661..13791d2 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2265,7 +2265,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
                 return; // result of Check: Drucker+Zoom okay.
             }
             pFntObj->Unlock(); // forget this object, printer/zoom differs
-            pObj = nullptr;
+            m_pObj = nullptr;
         }
 
         // Search by font comparison, quite expensive!
@@ -2296,7 +2296,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
         {
             // Have to create new Object, hence Owner must be a SwFont, later
             // the Owner will be the "MagicNumber"
-            SwCacheAccess::pOwner = pOwn;
+            SwCacheAccess::m_pOwner = pOwn;
             pFntObj = Get(); // will create via NewObj() and lock
             OSL_ENSURE(pFntObj, "No Font, no Fun.");
         }
@@ -2314,14 +2314,14 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
                 pFntObj->nPrtAscent = USHRT_MAX;
                 pFntObj->nPrtHeight = USHRT_MAX;
             }
-            pObj = pFntObj;
+            m_pObj = pFntObj;
         }
 
         // no matter if new or found, now the Owner of the Object is a
         // MagicNumber, and will be given to the SwFont, as well as the Index
         // for later direct access
         rMagic = pFntObj->GetOwner();
-        SwCacheAccess::pOwner = rMagic;
+        SwCacheAccess::m_pOwner = rMagic;
         rIndex = pFntObj->GetCachePos();
     }
 }
@@ -2329,7 +2329,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
 SwCacheObj *SwFntAccess::NewObj( )
 {
     // a new Font, a new "MagicNumber".
-    return new SwFntObj( *static_cast<SwSubFont const *>(pOwner), ++pMagicNo, pShell );
+    return new SwFntObj( *static_cast<SwSubFont const *>(m_pOwner), ++pMagicNo, pShell );
 }
 
 sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index f32358b..a3bd774 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -57,8 +57,8 @@ SwFontObj *SwFontAccess::Get( )
 
 SwCacheObj *SwFontAccess::NewObj( )
 {
-    const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(pOwner))->SetInSwFntCache( true );
-    return new SwFontObj( pOwner, pShell );
+    const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(m_pOwner))->SetInSwFntCache( true );
+    return new SwFontObj( m_pOwner, pShell );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list