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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 16 12:05:40 UTC 2019


 sw/source/core/doc/acmplwrd.cxx |   78 ++++++++++++++++++++--------------------
 sw/source/core/doc/docedt.cxx   |   14 +++----
 sw/source/core/inc/mvsave.hxx   |    4 +-
 3 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit cbcb7f0d193bd79e8366838111855f4b51cf72ef
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Dec 16 08:32:49 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Dec 16 13:04:52 2019 +0100

    sw: prefix members of SaveRedlEndPosForRestore, SwAutoCompleteClient, ...
    
    ... SwAutoCompleteString and SwAutoCompleteWord_Impl
    
    Change-Id: I8e82f38340cd78ce6fd88830ccb5f48338a936c2
    Reviewed-on: https://gerrit.libreoffice.org/85196
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 47948632614d..619faef05aa4 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -38,10 +38,10 @@
 
 class SwAutoCompleteClient : public SwClient
 {
-    SwAutoCompleteWord* pAutoCompleteWord;
-    SwDoc*              pDoc;
+    SwAutoCompleteWord* m_pAutoCompleteWord;
+    SwDoc*              m_pDoc;
 #if OSL_DEBUG_LEVEL > 0
-    static sal_uLong nSwAutoCompleteClientCount;
+    static sal_uLong s_nSwAutoCompleteClientCount;
 #endif
 public:
     SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc);
@@ -50,9 +50,9 @@ public:
 
     SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient);
 
-    const SwDoc& GetDoc() const {return *pDoc;}
+    const SwDoc& GetDoc() const {return *m_pDoc;}
 #if OSL_DEBUG_LEVEL > 0
-    static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
+    static sal_uLong GetElementCount() {return s_nSwAutoCompleteClientCount;}
 #endif
 protected:
     virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
@@ -62,11 +62,11 @@ typedef std::vector<SwAutoCompleteClient> SwAutoCompleteClientVector;
 
 class SwAutoCompleteWord_Impl
 {
-    SwAutoCompleteClientVector  aClientVector;
-    SwAutoCompleteWord&         rAutoCompleteWord;
+    SwAutoCompleteClientVector  m_aClientVector;
+    SwAutoCompleteWord&         m_rAutoCompleteWord;
 public:
     explicit SwAutoCompleteWord_Impl(SwAutoCompleteWord& rParent) :
-        rAutoCompleteWord(rParent){}
+        m_rAutoCompleteWord(rParent){}
     void AddDocument(SwDoc& rDoc);
     void RemoveDocument(const SwDoc& rDoc);
 };
@@ -76,9 +76,9 @@ class SwAutoCompleteString
     : public editeng::IAutoCompleteString
 {
 #if OSL_DEBUG_LEVEL > 0
-    static sal_uLong nSwAutoCompleteStringCount;
+    static sal_uLong s_nSwAutoCompleteStringCount;
 #endif
-    SwDocPtrVector aSourceDocs;
+    SwDocPtrVector m_aSourceDocs;
     public:
         SwAutoCompleteString(const OUString& rStr, sal_Int32 nLen);
 
@@ -87,39 +87,39 @@ class SwAutoCompleteString
         //returns true if last document reference has been removed
         bool        RemoveDocument(const SwDoc& rDoc);
 #if OSL_DEBUG_LEVEL > 0
-    static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;}
+    static sal_uLong GetElementCount() {return s_nSwAutoCompleteStringCount;}
 #endif
 };
 #if OSL_DEBUG_LEVEL > 0
-    sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
-    sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
+    sal_uLong SwAutoCompleteClient::s_nSwAutoCompleteClientCount = 0;
+    sal_uLong SwAutoCompleteString::s_nSwAutoCompleteStringCount = 0;
 #endif
 
 SwAutoCompleteClient::SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc) :
-        pAutoCompleteWord(&rToTell),
-        pDoc(&rSwDoc)
+        m_pAutoCompleteWord(&rToTell),
+        m_pDoc(&rSwDoc)
 {
-    pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
+    m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
 #if OSL_DEBUG_LEVEL > 0
-    ++nSwAutoCompleteClientCount;
+    ++s_nSwAutoCompleteClientCount;
 #endif
 }
 
 SwAutoCompleteClient::SwAutoCompleteClient(const SwAutoCompleteClient& rClient) :
     SwClient(),
-    pAutoCompleteWord(rClient.pAutoCompleteWord),
-    pDoc(rClient.pDoc)
+    m_pAutoCompleteWord(rClient.m_pAutoCompleteWord),
+    m_pDoc(rClient.m_pDoc)
 {
-    pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
+    m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
 #if OSL_DEBUG_LEVEL > 0
-    ++nSwAutoCompleteClientCount;
+    ++s_nSwAutoCompleteClientCount;
 #endif
 }
 
 SwAutoCompleteClient::~SwAutoCompleteClient()
 {
 #if OSL_DEBUG_LEVEL > 0
-    --nSwAutoCompleteClientCount;
+    --s_nSwAutoCompleteClientCount;
 #else
     (void) this;
 #endif
@@ -127,8 +127,8 @@ SwAutoCompleteClient::~SwAutoCompleteClient()
 
 SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient& rClient)
 {
-    pAutoCompleteWord = rClient.pAutoCompleteWord;
-    pDoc = rClient.pDoc;
+    m_pAutoCompleteWord = rClient.m_pAutoCompleteWord;
+    m_pDoc = rClient.m_pDoc;
     StartListeningToSameModifyAs(rClient);
     return *this;
 }
@@ -141,25 +141,25 @@ void SwAutoCompleteClient::Modify( const SfxPoolItem* pOld, const SfxPoolItem *)
     case RES_OBJECTDYING:
         if( static_cast<void*>(GetRegisteredIn()) == static_cast<const SwPtrMsgPoolItem *>(pOld)->pObject )
             EndListeningAll();
-        pAutoCompleteWord->DocumentDying(*pDoc);
+        m_pAutoCompleteWord->DocumentDying(*m_pDoc);
         break;
     }
 }
 
 void SwAutoCompleteWord_Impl::AddDocument(SwDoc& rDoc)
 {
-    if (std::any_of(aClientVector.begin(), aClientVector.end(),
+    if (std::any_of(m_aClientVector.begin(), m_aClientVector.end(),
             [&rDoc](SwAutoCompleteClient& rClient) { return &rClient.GetDoc() == &rDoc; }))
         return;
-    aClientVector.emplace_back(rAutoCompleteWord, rDoc);
+    m_aClientVector.emplace_back(m_rAutoCompleteWord, rDoc);
 }
 
 void SwAutoCompleteWord_Impl::RemoveDocument(const SwDoc& rDoc)
 {
-    auto aIt = std::find_if(aClientVector.begin(), aClientVector.end(),
+    auto aIt = std::find_if(m_aClientVector.begin(), m_aClientVector.end(),
         [&rDoc](SwAutoCompleteClient& rClient) { return &rClient.GetDoc() == &rDoc; });
-    if (aIt != aClientVector.end())
-        aClientVector.erase(aIt);
+    if (aIt != m_aClientVector.end())
+        m_aClientVector.erase(aIt);
 }
 
 SwAutoCompleteString::SwAutoCompleteString(
@@ -167,14 +167,14 @@ SwAutoCompleteString::SwAutoCompleteString(
     : editeng::IAutoCompleteString(rStr.copy(0, nLen))
 {
 #if OSL_DEBUG_LEVEL > 0
-    ++nSwAutoCompleteStringCount;
+    ++s_nSwAutoCompleteStringCount;
 #endif
 }
 
 SwAutoCompleteString::~SwAutoCompleteString()
 {
 #if OSL_DEBUG_LEVEL > 0
-    --nSwAutoCompleteStringCount;
+    --s_nSwAutoCompleteStringCount;
 #else
     (void) this;
 #endif
@@ -182,19 +182,19 @@ SwAutoCompleteString::~SwAutoCompleteString()
 
 void SwAutoCompleteString::AddDocument(const SwDoc& rDoc)
 {
-    auto aIt = std::find(aSourceDocs.begin(), aSourceDocs.end(), &rDoc);
-    if (aIt != aSourceDocs.end())
+    auto aIt = std::find(m_aSourceDocs.begin(), m_aSourceDocs.end(), &rDoc);
+    if (aIt != m_aSourceDocs.end())
         return;
-    aSourceDocs.push_back(&rDoc);
+    m_aSourceDocs.push_back(&rDoc);
 }
 
 bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
 {
-    auto aIt = std::find(aSourceDocs.begin(), aSourceDocs.end(), &rDoc);
-    if (aIt != aSourceDocs.end())
+    auto aIt = std::find(m_aSourceDocs.begin(), m_aSourceDocs.end(), &rDoc);
+    if (aIt != m_aSourceDocs.end())
     {
-        aSourceDocs.erase(aIt);
-        return aSourceDocs.empty();
+        m_aSourceDocs.erase(aIt);
+        return m_aSourceDocs.empty();
     }
     return false;
 }
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d881ca1d3d40..28dfb4990468 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -257,7 +257,7 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
 // From now on this class saves the redline positions of all redlines which ends exact at the
 // insert position (node _and_ content index)
 SaveRedlEndPosForRestore::SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nCnt )
-    : nSavContent( nCnt )
+    : mnSaveContent( nCnt )
 {
     SwNode& rNd = rInsIdx.GetNode();
     SwDoc* pDest = rNd.GetDoc();
@@ -272,9 +272,9 @@ SaveRedlEndPosForRestore::SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx,
               && *( pEnd = ( pRedl = pDest->getIDocumentRedlineAccess().GetRedlineTable()[ nFndPos ] )->End() ) == aSrcPos
               && *pRedl->Start() < aSrcPos )
         {
-            if( !pSavIdx )
+            if( !mpSaveIndex )
             {
-                pSavIdx.reset(new SwNodeIndex( rInsIdx, -1 ));
+                mpSaveIndex.reset(new SwNodeIndex( rInsIdx, -1 ));
             }
             mvSavArr.push_back( const_cast<SwPosition*>(pEnd) );
         }
@@ -283,20 +283,20 @@ SaveRedlEndPosForRestore::SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx,
 
 SaveRedlEndPosForRestore::~SaveRedlEndPosForRestore()
 {
-    pSavIdx.reset();
+    mpSaveIndex.reset();
 }
 
 void SaveRedlEndPosForRestore::Restore()
 {
     if (mvSavArr.empty())
         return;
-    ++(*pSavIdx);
-    SwContentNode* pNode = pSavIdx->GetNode().GetContentNode();
+    ++(*mpSaveIndex);
+    SwContentNode* pNode = mpSaveIndex->GetNode().GetContentNode();
     // If there's no content node at the remembered position, we will not restore the old position
     // This may happen if a table (or section?) will be inserted.
     if( pNode )
     {
-        SwPosition aPos( *pSavIdx, SwIndex( pNode, nSavContent ));
+        SwPosition aPos( *mpSaveIndex, SwIndex( pNode, mnSaveContent ));
         for( auto n = mvSavArr.size(); n; )
             *mvSavArr[ --n ] = aPos;
     }
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index bdbab23f08ab..b44bd555256f 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -185,8 +185,8 @@ public:
 class SaveRedlEndPosForRestore
 {
     std::vector<SwPosition*> mvSavArr;
-    std::unique_ptr<SwNodeIndex> pSavIdx;
-    sal_Int32 const nSavContent;
+    std::unique_ptr<SwNodeIndex> mpSaveIndex;
+    sal_Int32 const mnSaveContent;
 
 public:
     SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nContent );


More information about the Libreoffice-commits mailing list