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:
@@ -201,7 +201,7 @@ public:
|
||||
|| name == "gFontPreviewVirDevs"
|
||||
//svtools/source/control/ctrlbox.cxx, empty at exit
|
||||
|| 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")
|
||||
.Class("ScAddInListener").GlobalNamespace()) // not owning
|
||||
|| (loplugin::DeclCheck(pVarDecl).Var("maThreadSpecific")
|
||||
|
@@ -259,7 +259,7 @@ class SW_DLLPUBLIC SwDBManager
|
||||
OUString m_sEmbeddedName;
|
||||
|
||||
/// 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.
|
||||
std::vector<OUString> m_aNotUsedConnections;
|
||||
|
@@ -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 {
|
||||
|
||||
@@ -2830,7 +2830,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -2909,7 +2909,7 @@ void SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const
|
||||
|
||||
// temp file - don't remember connection
|
||||
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,
|
||||
@@ -3226,7 +3226,7 @@ std::shared_ptr<SwMailMergeConfigItem> SwDBManager::PerformMailMerge(SwView cons
|
||||
|
||||
void SwDBManager::RevokeLastRegistrations()
|
||||
{
|
||||
if (m_aUncommittedRegistrations.empty())
|
||||
if (s_aUncommittedRegistrations.empty())
|
||||
return;
|
||||
|
||||
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)
|
||||
{
|
||||
RevokeDataSource(it->second);
|
||||
it = m_aUncommittedRegistrations.erase(it);
|
||||
it = s_aUncommittedRegistrations.erase(it);
|
||||
}
|
||||
else
|
||||
++it;
|
||||
@@ -3254,12 +3254,12 @@ void SwDBManager::RevokeLastRegistrations()
|
||||
|
||||
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)
|
||||
{
|
||||
m_aNotUsedConnections.push_back(aIt->second);
|
||||
aIt = m_aUncommittedRegistrations.erase(aIt);
|
||||
aIt = s_aUncommittedRegistrations.erase(aIt);
|
||||
}
|
||||
else
|
||||
aIt++;
|
||||
|
@@ -20,13 +20,13 @@ SwWordCountWrapper::SwWordCountWrapper(vcl::Window *pParentWindow,
|
||||
: SfxChildWindow(pParentWindow, nId)
|
||||
{
|
||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||
xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo));
|
||||
SetController(xAbstDlg->GetController());
|
||||
m_xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo));
|
||||
SetController(m_xAbstDlg->GetController());
|
||||
}
|
||||
|
||||
SwWordCountWrapper::~SwWordCountWrapper()
|
||||
{
|
||||
xAbstDlg.disposeAndClear();
|
||||
m_xAbstDlg.disposeAndClear();
|
||||
}
|
||||
|
||||
SfxChildWinInfo SwWordCountWrapper::GetInfo() const
|
||||
@@ -37,12 +37,12 @@ SfxChildWinInfo SwWordCountWrapper::GetInfo() const
|
||||
|
||||
void SwWordCountWrapper::UpdateCounts()
|
||||
{
|
||||
xAbstDlg->UpdateCounts();
|
||||
m_xAbstDlg->UpdateCounts();
|
||||
}
|
||||
|
||||
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: */
|
||||
|
@@ -51,9 +51,9 @@ public:
|
||||
|
||||
class SwWebGlosDocShell final : public SwWebDocShell
|
||||
{
|
||||
OUString aLongName;
|
||||
OUString aShortName;
|
||||
OUString aGroupName;
|
||||
OUString m_aLongName;
|
||||
OUString m_aShortName;
|
||||
OUString m_aGroupName;
|
||||
|
||||
virtual bool Save() override;
|
||||
|
||||
@@ -71,11 +71,11 @@ public:
|
||||
void Execute( SfxRequest& );
|
||||
void GetState( SfxItemSet& );
|
||||
void SetLongName( const OUString& rLongName )
|
||||
{ aLongName = rLongName; }
|
||||
{ m_aLongName = rLongName; }
|
||||
void SetShortName( const OUString& rShortName )
|
||||
{ aShortName = rShortName; }
|
||||
{ m_aShortName = rShortName; }
|
||||
void SetGroupName( const OUString& rGroupName )
|
||||
{ aGroupName = rGroupName; }
|
||||
{ m_aGroupName = rGroupName; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
class SwWordCountWrapper final : public SfxChildWindow
|
||||
{
|
||||
VclPtr<AbstractSwWordCountFloatDlg> xAbstDlg;
|
||||
VclPtr<AbstractSwWordCountFloatDlg> m_xAbstDlg;
|
||||
|
||||
public:
|
||||
SwWordCountWrapper( vcl::Window *pParentWindow,
|
||||
|
@@ -24,7 +24,7 @@
|
||||
class SwZoomControl final : public SvxZoomStatusBarControl
|
||||
{
|
||||
private:
|
||||
OUString sPreviewZoom;
|
||||
OUString m_sPreviewZoom;
|
||||
|
||||
public:
|
||||
virtual void Command(const CommandEvent& rCEvt) override;
|
||||
|
@@ -185,7 +185,7 @@ bool SwWebGlosDocShell::Save()
|
||||
{
|
||||
// same comment as in SwGlosDocShell::Save - see there
|
||||
if ( GetWrtShell() )
|
||||
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
|
||||
return ::lcl_Save( *GetWrtShell(), m_aGroupName, m_aShortName, m_aLongName );
|
||||
else
|
||||
{
|
||||
SetModified( false );
|
||||
|
@@ -42,12 +42,12 @@ void SwZoomControl::StateChangedAtStatusBarControl( sal_uInt16 nSID, SfxItemStat
|
||||
const SfxStringItem* pItem = nullptr;
|
||||
if (SfxItemState::DEFAULT == eState && (pItem = dynamic_cast<const SfxStringItem*>(pState)))
|
||||
{
|
||||
sPreviewZoom = pItem->GetValue();
|
||||
GetStatusBar().SetItemText(GetId(), sPreviewZoom);
|
||||
m_sPreviewZoom = pItem->GetValue();
|
||||
GetStatusBar().SetItemText(GetId(), m_sPreviewZoom);
|
||||
}
|
||||
else
|
||||
{
|
||||
sPreviewZoom.clear();
|
||||
m_sPreviewZoom.clear();
|
||||
SvxZoomStatusBarControl::StateChangedAtStatusBarControl(nSID, eState, pState);
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void SwZoomControl::Paint( const UserDrawEvent& )
|
||||
|
||||
void SwZoomControl::Command( const CommandEvent& rCEvt )
|
||||
{
|
||||
if (sPreviewZoom.isEmpty())
|
||||
if (m_sPreviewZoom.isEmpty())
|
||||
SvxZoomStatusBarControl::Command(rCEvt);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user