sw: prefix members of SwDBManager, SwWebGlosDocShell, SwWordCountWrapper ...

... and SwZoomControl

See tdf#94879 for motivation.

Change-Id: I74f31e45a8c215d406371a23b64d548fbb851d28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125641
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna
2021-11-22 08:04:23 +01:00
parent 7b0f5178d8
commit e6b75a22df
9 changed files with 28 additions and 28 deletions

View File

@@ -201,7 +201,7 @@ public:
|| name == "gFontPreviewVirDevs" || name == "gFontPreviewVirDevs"
//svtools/source/control/ctrlbox.cxx, empty at exit //svtools/source/control/ctrlbox.cxx, empty at exit
|| name == "aLogger" // FormulaLogger& FormulaLogger::get() in sc/source/core/tool/formulalogger.cxx || name == "aLogger" // FormulaLogger& FormulaLogger::get() in sc/source/core/tool/formulalogger.cxx
|| name == "m_aUncommittedRegistrations" // sw/source/uibase/dbui/dbmgr.cxx || name == "s_aUncommittedRegistrations" // sw/source/uibase/dbui/dbmgr.cxx
|| (loplugin::DeclCheck(pVarDecl).Var("aAllListeners") || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners")
.Class("ScAddInListener").GlobalNamespace()) // not owning .Class("ScAddInListener").GlobalNamespace()) // not owning
|| (loplugin::DeclCheck(pVarDecl).Var("maThreadSpecific") || (loplugin::DeclCheck(pVarDecl).Var("maThreadSpecific")

View File

@@ -259,7 +259,7 @@ class SW_DLLPUBLIC SwDBManager
OUString m_sEmbeddedName; OUString m_sEmbeddedName;
/// Store last registrations to revoke or commit /// Store last registrations to revoke or commit
static std::vector<std::pair<SwDocShell*, OUString>> m_aUncommittedRegistrations; static std::vector<std::pair<SwDocShell*, OUString>> s_aUncommittedRegistrations;
/// Not used connections. /// Not used connections.
std::vector<OUString> m_aNotUsedConnections; std::vector<OUString> m_aNotUsedConnections;

View File

@@ -138,7 +138,7 @@ void lcl_emitEvent(SfxEventHintId nEventId, sal_Int32 nStrId, SfxObjectShell* pD
} }
std::vector<std::pair<SwDocShell*, OUString>> SwDBManager::m_aUncommittedRegistrations; std::vector<std::pair<SwDocShell*, OUString>> SwDBManager::s_aUncommittedRegistrations;
namespace { namespace {
@@ -2830,7 +2830,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel
} }
sFind = LoadAndRegisterDataSource_Impl( type, DBConnURIType::FLAT == type ? &aSettings : nullptr, aURL, nullptr, pDocShell ); sFind = LoadAndRegisterDataSource_Impl( type, DBConnURIType::FLAT == type ? &aSettings : nullptr, aURL, nullptr, pDocShell );
m_aUncommittedRegistrations.push_back(std::pair<SwDocShell*, OUString>(pDocShell, sFind)); s_aUncommittedRegistrations.push_back(std::pair<SwDocShell*, OUString>(pDocShell, sFind));
} }
return sFind; return sFind;
} }
@@ -2909,7 +2909,7 @@ void SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const
// temp file - don't remember connection // temp file - don't remember connection
if (rData.sDataSource.isEmpty()) if (rData.sDataSource.isEmpty())
m_aUncommittedRegistrations.push_back(std::pair<SwDocShell*, OUString>(nullptr, sDataSource)); s_aUncommittedRegistrations.push_back(std::pair<SwDocShell*, OUString>(nullptr, sDataSource));
} }
void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
@@ -3226,7 +3226,7 @@ std::shared_ptr<SwMailMergeConfigItem> SwDBManager::PerformMailMerge(SwView cons
void SwDBManager::RevokeLastRegistrations() void SwDBManager::RevokeLastRegistrations()
{ {
if (m_aUncommittedRegistrations.empty()) if (s_aUncommittedRegistrations.empty())
return; return;
SwView* pView = ( m_pDoc && m_pDoc->GetDocShell() ) ? m_pDoc->GetDocShell()->GetView() : nullptr; SwView* pView = ( m_pDoc && m_pDoc->GetDocShell() ) ? m_pDoc->GetDocShell()->GetView() : nullptr;
@@ -3240,12 +3240,12 @@ void SwDBManager::RevokeLastRegistrations()
} }
} }
for (auto it = m_aUncommittedRegistrations.begin(); it != m_aUncommittedRegistrations.end();) for (auto it = s_aUncommittedRegistrations.begin(); it != s_aUncommittedRegistrations.end();)
{ {
if ((m_pDoc && it->first == m_pDoc->GetDocShell()) || it->first == nullptr) if ((m_pDoc && it->first == m_pDoc->GetDocShell()) || it->first == nullptr)
{ {
RevokeDataSource(it->second); RevokeDataSource(it->second);
it = m_aUncommittedRegistrations.erase(it); it = s_aUncommittedRegistrations.erase(it);
} }
else else
++it; ++it;
@@ -3254,12 +3254,12 @@ void SwDBManager::RevokeLastRegistrations()
void SwDBManager::CommitLastRegistrations() void SwDBManager::CommitLastRegistrations()
{ {
for (auto aIt = m_aUncommittedRegistrations.begin(); aIt != m_aUncommittedRegistrations.end();) for (auto aIt = s_aUncommittedRegistrations.begin(); aIt != s_aUncommittedRegistrations.end();)
{ {
if (aIt->first == m_pDoc->GetDocShell() || aIt->first == nullptr) if (aIt->first == m_pDoc->GetDocShell() || aIt->first == nullptr)
{ {
m_aNotUsedConnections.push_back(aIt->second); m_aNotUsedConnections.push_back(aIt->second);
aIt = m_aUncommittedRegistrations.erase(aIt); aIt = s_aUncommittedRegistrations.erase(aIt);
} }
else else
aIt++; aIt++;

View File

@@ -20,13 +20,13 @@ SwWordCountWrapper::SwWordCountWrapper(vcl::Window *pParentWindow,
: SfxChildWindow(pParentWindow, nId) : SfxChildWindow(pParentWindow, nId)
{ {
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo)); m_xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo));
SetController(xAbstDlg->GetController()); SetController(m_xAbstDlg->GetController());
} }
SwWordCountWrapper::~SwWordCountWrapper() SwWordCountWrapper::~SwWordCountWrapper()
{ {
xAbstDlg.disposeAndClear(); m_xAbstDlg.disposeAndClear();
} }
SfxChildWinInfo SwWordCountWrapper::GetInfo() const SfxChildWinInfo SwWordCountWrapper::GetInfo() const
@@ -37,12 +37,12 @@ SfxChildWinInfo SwWordCountWrapper::GetInfo() const
void SwWordCountWrapper::UpdateCounts() void SwWordCountWrapper::UpdateCounts()
{ {
xAbstDlg->UpdateCounts(); m_xAbstDlg->UpdateCounts();
} }
void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat) void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
{ {
xAbstDlg->SetCounts(rCurrCnt, rDocStat); m_xAbstDlg->SetCounts(rCurrCnt, rDocStat);
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -51,9 +51,9 @@ public:
class SwWebGlosDocShell final : public SwWebDocShell class SwWebGlosDocShell final : public SwWebDocShell
{ {
OUString aLongName; OUString m_aLongName;
OUString aShortName; OUString m_aShortName;
OUString aGroupName; OUString m_aGroupName;
virtual bool Save() override; virtual bool Save() override;
@@ -71,11 +71,11 @@ public:
void Execute( SfxRequest& ); void Execute( SfxRequest& );
void GetState( SfxItemSet& ); void GetState( SfxItemSet& );
void SetLongName( const OUString& rLongName ) void SetLongName( const OUString& rLongName )
{ aLongName = rLongName; } { m_aLongName = rLongName; }
void SetShortName( const OUString& rShortName ) void SetShortName( const OUString& rShortName )
{ aShortName = rShortName; } { m_aShortName = rShortName; }
void SetGroupName( const OUString& rGroupName ) void SetGroupName( const OUString& rGroupName )
{ aGroupName = rGroupName; } { m_aGroupName = rGroupName; }
}; };
#endif #endif

View File

@@ -57,7 +57,7 @@ public:
class SwWordCountWrapper final : public SfxChildWindow class SwWordCountWrapper final : public SfxChildWindow
{ {
VclPtr<AbstractSwWordCountFloatDlg> xAbstDlg; VclPtr<AbstractSwWordCountFloatDlg> m_xAbstDlg;
public: public:
SwWordCountWrapper( vcl::Window *pParentWindow, SwWordCountWrapper( vcl::Window *pParentWindow,

View File

@@ -24,7 +24,7 @@
class SwZoomControl final : public SvxZoomStatusBarControl class SwZoomControl final : public SvxZoomStatusBarControl
{ {
private: private:
OUString sPreviewZoom; OUString m_sPreviewZoom;
public: public:
virtual void Command(const CommandEvent& rCEvt) override; virtual void Command(const CommandEvent& rCEvt) override;

View File

@@ -185,7 +185,7 @@ bool SwWebGlosDocShell::Save()
{ {
// same comment as in SwGlosDocShell::Save - see there // same comment as in SwGlosDocShell::Save - see there
if ( GetWrtShell() ) if ( GetWrtShell() )
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); return ::lcl_Save( *GetWrtShell(), m_aGroupName, m_aShortName, m_aLongName );
else else
{ {
SetModified( false ); SetModified( false );

View File

@@ -42,12 +42,12 @@ void SwZoomControl::StateChangedAtStatusBarControl( sal_uInt16 nSID, SfxItemStat
const SfxStringItem* pItem = nullptr; const SfxStringItem* pItem = nullptr;
if (SfxItemState::DEFAULT == eState && (pItem = dynamic_cast<const SfxStringItem*>(pState))) if (SfxItemState::DEFAULT == eState && (pItem = dynamic_cast<const SfxStringItem*>(pState)))
{ {
sPreviewZoom = pItem->GetValue(); m_sPreviewZoom = pItem->GetValue();
GetStatusBar().SetItemText(GetId(), sPreviewZoom); GetStatusBar().SetItemText(GetId(), m_sPreviewZoom);
} }
else else
{ {
sPreviewZoom.clear(); m_sPreviewZoom.clear();
SvxZoomStatusBarControl::StateChangedAtStatusBarControl(nSID, eState, pState); SvxZoomStatusBarControl::StateChangedAtStatusBarControl(nSID, eState, pState);
} }
} }
@@ -58,7 +58,7 @@ void SwZoomControl::Paint( const UserDrawEvent& )
void SwZoomControl::Command( const CommandEvent& rCEvt ) void SwZoomControl::Command( const CommandEvent& rCEvt )
{ {
if (sPreviewZoom.isEmpty()) if (m_sPreviewZoom.isEmpty())
SvxZoomStatusBarControl::Command(rCEvt); SvxZoomStatusBarControl::Command(rCEvt);
} }