diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-13 08:04:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-09-13 09:01:37 +0200 |
commit | e7a40c0ded1ba26b6b8f3da5a0b894e9c7ee7a96 (patch) | |
tree | f48648a827db4544b3df73f5a7f93a201d069114 | |
parent | f76f2fc99dcb4a6a250835ec1d52e7c3f6a73321 (diff) |
sw: prefix members of SwChapterNumRules, SwDBConfig, SwGlossaryList and ...
... SwModule
See tdf#94879 for motivation.
Change-Id: I0bf6d2cf5fdaed76eadc801d654a2cea7700f046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122018
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | include/sfx2/shell.hxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/config/dbconfig.cxx | 34 | ||||
-rw-r--r-- | sw/source/uibase/config/uinums.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/inc/dbconfig.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/gloslst.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/uinums.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/gloslst.cxx | 74 |
7 files changed, 72 insertions, 72 deletions
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 0a2d1f7682d5..2da1472a800f 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -530,7 +530,7 @@ inline void SfxShell::SetPool } #define SFX_DECL_INTERFACE(nId) \ - static SfxInterface* pInterface; \ + static SfxInterface* s_pInterface; \ static SfxInterface* GetStaticInterface(); \ static SfxInterfaceId GetInterfaceId() {return nId;} \ static void RegisterInterface(const SfxModule* pMod=nullptr); \ @@ -538,12 +538,12 @@ inline void SfxShell::SetPool #define SFX_TMPL_INTERFACE(Class,SuperClass,Abstract) \ \ - SfxInterface* Class::pInterface = nullptr; \ + SfxInterface* Class::s_pInterface = nullptr; \ SfxInterface* Class::GetStaticInterface() \ { \ - if ( !pInterface ) \ + if ( !s_pInterface ) \ { \ - pInterface = \ + s_pInterface = \ new SfxInterface( \ #Class, Abstract, GetInterfaceId(), \ SuperClass::GetStaticInterface(), \ @@ -551,7 +551,7 @@ inline void SfxShell::SetPool sal_uInt16(sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \ InitInterface_Impl(); \ } \ - return pInterface; \ + return s_pInterface; \ } \ \ SfxInterface* Class::GetInterface() const \ diff --git a/sw/source/uibase/config/dbconfig.cxx b/sw/source/uibase/config/dbconfig.cxx index 8c2f04f48a26..863593163d3b 100644 --- a/sw/source/uibase/config/dbconfig.cxx +++ b/sw/source/uibase/config/dbconfig.cxx @@ -45,19 +45,19 @@ SwDBConfig::SwDBConfig() : SwDBConfig::~SwDBConfig() { - pAdrImpl.reset(); - pBibImpl.reset(); + m_pAdrImpl.reset(); + m_pBibImpl.reset(); } void SwDBConfig::Load() { const Sequence<OUString>& rNames = GetPropertyNames(); - if(!pAdrImpl) + if(!m_pAdrImpl) { - pAdrImpl.reset(new SwDBData); - pAdrImpl->nCommandType = 0; - pBibImpl.reset(new SwDBData); - pBibImpl->nCommandType = 0; + m_pAdrImpl.reset(new SwDBData); + m_pAdrImpl->nCommandType = 0; + m_pBibImpl.reset(new SwDBData); + m_pBibImpl->nCommandType = 0; } Sequence<Any> aValues = GetProperties(rNames); const Any* pValues = aValues.getConstArray(); @@ -69,28 +69,28 @@ void SwDBConfig::Load() { switch(nProp) { - case 0: pValues[nProp] >>= pAdrImpl->sDataSource; break; - case 1: pValues[nProp] >>= pAdrImpl->sCommand; break; - case 2: pValues[nProp] >>= pAdrImpl->nCommandType; break; - case 3: pValues[nProp] >>= pBibImpl->sDataSource; break; - case 4: pValues[nProp] >>= pBibImpl->sCommand; break; - case 5: pValues[nProp] >>= pBibImpl->nCommandType; break; + case 0: pValues[nProp] >>= m_pAdrImpl->sDataSource; break; + case 1: pValues[nProp] >>= m_pAdrImpl->sCommand; break; + case 2: pValues[nProp] >>= m_pAdrImpl->nCommandType; break; + case 3: pValues[nProp] >>= m_pBibImpl->sDataSource; break; + case 4: pValues[nProp] >>= m_pBibImpl->sCommand; break; + case 5: pValues[nProp] >>= m_pBibImpl->nCommandType; break; } } } const SwDBData& SwDBConfig::GetAddressSource() { - if(!pAdrImpl) + if(!m_pAdrImpl) Load(); - return *pAdrImpl; + return *m_pAdrImpl; } const SwDBData& SwDBConfig::GetBibliographySource() { - if(!pBibImpl) + if(!m_pBibImpl) Load(); - return *pBibImpl; + return *m_pBibImpl; } void SwDBConfig::ImplCommit() {} diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index b1fbc22a6884..51fd9127859b 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -73,7 +73,7 @@ SwChapterNumRules::~SwChapterNumRules() void SwChapterNumRules::Init() { - for(auto & rpNumRule : pNumRules) + for(auto & rpNumRule : m_pNumRules) rpNumRule.reset(); OUString sNm(CHAPTER_FILENAME); @@ -89,17 +89,17 @@ void SwChapterNumRules::Init() void SwChapterNumRules::CreateEmptyNumRule(sal_uInt16 const nIndex) { assert(nIndex < nMaxRules); - assert(!pNumRules[nIndex]); - pNumRules[nIndex].reset(new SwNumRulesWithName); + assert(!m_pNumRules[nIndex]); + m_pNumRules[nIndex].reset(new SwNumRulesWithName); } void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { assert(nIdx < nMaxRules); - if( !pNumRules[nIdx] ) - pNumRules[nIdx].reset(new SwNumRulesWithName( rCopy )); + if( !m_pNumRules[nIdx] ) + m_pNumRules[nIdx].reset(new SwNumRulesWithName( rCopy )); else - *pNumRules[nIdx] = rCopy; + *m_pNumRules[nIdx] = rCopy; Save(); // store it immediately } diff --git a/sw/source/uibase/inc/dbconfig.hxx b/sw/source/uibase/inc/dbconfig.hxx index a21319690a9a..66ebfc2b908d 100644 --- a/sw/source/uibase/inc/dbconfig.hxx +++ b/sw/source/uibase/inc/dbconfig.hxx @@ -30,8 +30,8 @@ private: SAL_DLLPRIVATE static const css::uno::Sequence<OUString>& GetPropertyNames(); virtual void ImplCommit() override; - std::unique_ptr<SwDBData> pAdrImpl; - std::unique_ptr<SwDBData> pBibImpl; + std::unique_ptr<SwDBData> m_pAdrImpl; + std::unique_ptr<SwDBData> m_pBibImpl; public: SwDBConfig(); diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx index bd6954bfa2ff..65e09f5cf150 100644 --- a/sw/source/uibase/inc/gloslst.hxx +++ b/sw/source/uibase/inc/gloslst.hxx @@ -46,9 +46,9 @@ struct AutoTextGroup class SwGlossaryList final : public AutoTimer { - std::vector<std::unique_ptr<AutoTextGroup>> aGroupArr; - OUString sPath; - bool bFilled; + std::vector<std::unique_ptr<AutoTextGroup>> m_aGroupArr; + OUString m_sPath; + bool m_bFilled; AutoTextGroup* FindGroup(std::u16string_view rGroupName); static void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss); diff --git a/sw/source/uibase/inc/uinums.hxx b/sw/source/uibase/inc/uinums.hxx index 0ba7d3f59525..37e36feae634 100644 --- a/sw/source/uibase/inc/uinums.hxx +++ b/sw/source/uibase/inc/uinums.hxx @@ -82,7 +82,7 @@ class SW_DLLPUBLIC SwChapterNumRules final public: enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms private: - std::unique_ptr<SwNumRulesWithName> pNumRules[ MAX_NUM_RULES ]; + std::unique_ptr<SwNumRulesWithName> m_pNumRules[ MAX_NUM_RULES ]; void Init(); void Save(); @@ -100,7 +100,7 @@ public: inline const SwNumRulesWithName *SwChapterNumRules::GetRules(sal_uInt16 nIdx) const { assert(nIdx < nMaxRules); - return pNumRules[nIdx].get(); + return m_pNumRules[nIdx].get(); } diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 3bcc3ea299c9..06658da32de4 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -85,10 +85,10 @@ IMPL_LINK_NOARG(SwGlossDecideDlg, SelectHdl, weld::TreeView&, void) } SwGlossaryList::SwGlossaryList() : - bFilled(false) + m_bFilled(false) { SvtPathOptions aPathOpt; - sPath = aPathOpt.GetAutoTextPath(); + m_sPath = aPathOpt.GetAutoTextPath(); SetTimeout(GLOS_TIMEOUT); } @@ -104,15 +104,15 @@ SwGlossaryList::~SwGlossaryList() bool SwGlossaryList::GetShortName(std::u16string_view rLongName, OUString& rShortName, OUString& rGroupName ) { - if(!bFilled) + if(!m_bFilled) Update(); std::vector<TripleString> aTripleStrings; - size_t nCount = aGroupArr.size(); + size_t nCount = m_aGroupArr.size(); for(size_t i = 0; i < nCount; i++ ) { - AutoTextGroup* pGroup = aGroupArr[i].get(); + AutoTextGroup* pGroup = m_aGroupArr[i].get(); if(!rGroupName.isEmpty() && rGroupName != pGroup->sName) continue; @@ -167,17 +167,17 @@ bool SwGlossaryList::GetShortName(std::u16string_view rLongName, size_t SwGlossaryList::GetGroupCount() { - if(!bFilled) + if(!m_bFilled) Update(); - return aGroupArr.size(); + return m_aGroupArr.size(); } OUString SwGlossaryList::GetGroupName(size_t nPos) { - OSL_ENSURE(aGroupArr.size() > nPos, "group not available"); - if(nPos < aGroupArr.size()) + OSL_ENSURE(m_aGroupArr.size() > nPos, "group not available"); + if(nPos < m_aGroupArr.size()) { - AutoTextGroup* pGroup = aGroupArr[nPos].get(); + AutoTextGroup* pGroup = m_aGroupArr[nPos].get(); OUString sRet = pGroup->sName; return sRet; } @@ -186,10 +186,10 @@ OUString SwGlossaryList::GetGroupName(size_t nPos) OUString SwGlossaryList::GetGroupTitle(size_t nPos) { - OSL_ENSURE(aGroupArr.size() > nPos, "group not available"); - if(nPos < aGroupArr.size()) + OSL_ENSURE(m_aGroupArr.size() > nPos, "group not available"); + if(nPos < m_aGroupArr.size()) { - AutoTextGroup* pGroup = aGroupArr[nPos].get(); + AutoTextGroup* pGroup = m_aGroupArr[nPos].get(); return pGroup->sTitle; } return OUString(); @@ -197,10 +197,10 @@ OUString SwGlossaryList::GetGroupTitle(size_t nPos) sal_uInt16 SwGlossaryList::GetBlockCount(size_t nGroup) { - OSL_ENSURE(aGroupArr.size() > nGroup, "group not available"); - if(nGroup < aGroupArr.size()) + OSL_ENSURE(m_aGroupArr.size() > nGroup, "group not available"); + if(nGroup < m_aGroupArr.size()) { - AutoTextGroup* pGroup = aGroupArr[nGroup].get(); + AutoTextGroup* pGroup = m_aGroupArr[nGroup].get(); return pGroup->nCount; } return 0; @@ -208,10 +208,10 @@ sal_uInt16 SwGlossaryList::GetBlockCount(size_t nGroup) OUString SwGlossaryList::GetBlockLongName(size_t nGroup, sal_uInt16 nBlock) { - OSL_ENSURE(aGroupArr.size() > nGroup, "group not available"); - if(nGroup < aGroupArr.size()) + OSL_ENSURE(m_aGroupArr.size() > nGroup, "group not available"); + if(nGroup < m_aGroupArr.size()) { - AutoTextGroup* pGroup = aGroupArr[nGroup].get(); + AutoTextGroup* pGroup = m_aGroupArr[nGroup].get(); return pGroup->sLongNames.getToken(nBlock, STRING_DELIM); } return OUString(); @@ -219,10 +219,10 @@ OUString SwGlossaryList::GetBlockLongName(size_t nGroup, sal_uInt16 nBlock) OUString SwGlossaryList::GetBlockShortName(size_t nGroup, sal_uInt16 nBlock) { - OSL_ENSURE(aGroupArr.size() > nGroup, "group not available"); - if(nGroup < aGroupArr.size()) + OSL_ENSURE(m_aGroupArr.size() > nGroup, "group not available"); + if(nGroup < m_aGroupArr.size()) { - AutoTextGroup* pGroup = aGroupArr[nGroup].get(); + AutoTextGroup* pGroup = m_aGroupArr[nGroup].get(); return pGroup->sShortNames.getToken(nBlock, STRING_DELIM); } return OUString(); @@ -235,16 +235,16 @@ void SwGlossaryList::Update() SvtPathOptions aPathOpt; const OUString& sTemp( aPathOpt.GetAutoTextPath() ); - if(sTemp != sPath) + if(sTemp != m_sPath) { - sPath = sTemp; - bFilled = false; + m_sPath = sTemp; + m_bFilled = false; ClearGroups(); } SwGlossaries* pGlossaries = ::GetGlossaries(); const std::vector<OUString> & rPathArr = pGlossaries->GetPathArray(); const OUString sExt( SwGlossaries::GetExtension() ); - if(!bFilled) + if(!m_bFilled) { const size_t nGroupCount = pGlossaries->GetGroupCnt(); for(size_t i = 0; i < nGroupCount; ++i) @@ -264,10 +264,10 @@ void SwGlossaryList::Update() &pGroup->aDateModified, &pGroup->aDateModified ); - aGroupArr.insert( aGroupArr.begin(), std::move(pGroup) ); + m_aGroupArr.insert( m_aGroupArr.begin(), std::move(pGroup) ); } } - bFilled = true; + m_bFilled = true; } else { @@ -296,7 +296,7 @@ void SwGlossaryList::Update() FillGroup( pFound, pGlossaries ); pFound->aDateModified = rDT; - aGroupArr.push_back(std::unique_ptr<AutoTextGroup>(pFound)); + m_aGroupArr.push_back(std::unique_ptr<AutoTextGroup>(pFound)); } else if( pFound->aDateModified < rDT ) { @@ -305,11 +305,11 @@ void SwGlossaryList::Update() } } - for( size_t i = aGroupArr.size(); i>0; ) + for( size_t i = m_aGroupArr.size(); i>0; ) { --i; // maybe remove deleted groups - AutoTextGroup* pGroup = aGroupArr[i].get(); + AutoTextGroup* pGroup = m_aGroupArr[i].get(); const size_t nGroupPath = static_cast<size_t>( pGroup->sName.getToken( 1, GLOS_DELIM).toInt32()); // Only the groups will be checked which are registered @@ -322,7 +322,7 @@ void SwGlossaryList::Update() if(!bFound) { - aGroupArr.erase(aGroupArr.begin() + i); + m_aGroupArr.erase(m_aGroupArr.begin() + i); } } } @@ -339,7 +339,7 @@ void SwGlossaryList::Invoke() AutoTextGroup* SwGlossaryList::FindGroup(std::u16string_view rGroupName) { - for(const auto & pRet : aGroupArr) + for(const auto & pRet : m_aGroupArr) { if(pRet->sName == rGroupName) return pRet.get(); @@ -371,7 +371,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) void SwGlossaryList::HasLongName(const std::vector<OUString>& rBeginCandidates, std::vector<std::pair<OUString, sal_uInt16>>& rLongNames) { - if(!bFilled) + if(!m_bFilled) Update(); const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); // We store results for all candidate words in separate lists, so that later @@ -380,7 +380,7 @@ void SwGlossaryList::HasLongName(const std::vector<OUString>& rBeginCandidates, // We can't break after FIND_MAX_GLOS items found, since first items may have ended up in // lower-priority lists, and those from higher-priority lists are yet to come. So process all. - for (const auto& pGroup : aGroupArr) + for (const auto& pGroup : m_aGroupArr) { sal_Int32 nIdx{ 0 }; for(sal_uInt16 j = 0; j < pGroup->nCount; j++) @@ -435,8 +435,8 @@ void SwGlossaryList::HasLongName(const std::vector<OUString>& rBeginCandidates, void SwGlossaryList::ClearGroups() { - aGroupArr.clear(); - bFilled = false; + m_aGroupArr.clear(); + m_bFilled = false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |