summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-06-16 15:24:29 +0200
committerMichael Stahl <mstahl@redhat.com>2016-06-16 15:26:54 +0200
commited8a2341b9631ad312ff40d23331c66d537aad20 (patch)
treed0958ffee6239ce97cb52c5a53ed1d63b82161a8 /svtools
parentf04c48a7e764775bdd98715e5d17845f1786bd44 (diff)
properly prefix various global variables and hide them
Change-Id: I6b97e6a4c6ac4c0e26bcbb2b132b333920c16f19
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/menuoptions.cxx10
-rw-r--r--svtools/source/config/miscopt.cxx10
2 files changed, 14 insertions, 6 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index be735a618ec2..c0fcaefb0491 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -315,18 +315,22 @@ Sequence< OUString > SvtMenuOptions_Impl::impl_GetPropertyNames()
return seqPropertyNames;
}
-std::weak_ptr<SvtMenuOptions_Impl> m_pMenuOptions;
+namespace {
+
+std::weak_ptr<SvtMenuOptions_Impl> g_pMenuOptions;
+
+}
SvtMenuOptions::SvtMenuOptions()
{
// Global access, must be guarded (multithreading!).
MutexGuard aGuard( GetOwnStaticMutex() );
- m_pImpl = m_pMenuOptions.lock();
+ m_pImpl = g_pMenuOptions.lock();
if( !m_pImpl )
{
m_pImpl = std::make_shared<SvtMenuOptions_Impl>();
- m_pMenuOptions = m_pImpl;
+ g_pMenuOptions = m_pImpl;
svtools::ItemHolder2::holdConfigItem(E_MENUOPTIONS);
}
}
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index e0ecfd82f1b4..2d30403096a3 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -643,18 +643,22 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
return seqPropertyNames;
}
-std::weak_ptr<SvtMiscOptions_Impl> m_pMiscOptions;
+namespace {
+
+std::weak_ptr<SvtMiscOptions_Impl> g_pMiscOptions;
+
+}
SvtMiscOptions::SvtMiscOptions()
{
// Global access, must be guarded (multithreading!).
MutexGuard aGuard( GetInitMutex() );
- m_pImpl = m_pMiscOptions.lock();
+ m_pImpl = g_pMiscOptions.lock();
if( !m_pImpl )
{
m_pImpl = std::make_shared<SvtMiscOptions_Impl>();
- m_pMiscOptions = m_pImpl;
+ g_pMiscOptions = m_pImpl;
svtools::ItemHolder2::holdConfigItem(E_MISCOPTIONS);
}
}