diff options
Diffstat (limited to 'unotools/source/config/fontoptions.cxx')
-rw-r--r-- | unotools/source/config/fontoptions.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index 4aa7732e7135..61b9c54e9948 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -243,18 +243,22 @@ Sequence< OUString > SvtFontOptions_Impl::impl_GetPropertyNames() return seqPropertyNames; } -std::weak_ptr<SvtFontOptions_Impl> m_pFontOptions; +namespace { + +std::weak_ptr<SvtFontOptions_Impl> g_pFontOptions; + +} SvtFontOptions::SvtFontOptions() { // Global access, must be guarded (multithreading!). MutexGuard aGuard( impl_GetOwnStaticMutex() ); - m_pImpl = m_pFontOptions.lock(); + m_pImpl = g_pFontOptions.lock(); if( !m_pImpl ) { m_pImpl = std::make_shared<SvtFontOptions_Impl>(); - m_pFontOptions = m_pImpl; + g_pFontOptions = m_pImpl; ItemHolder1::holdConfigItem(E_FONTOPTIONS); } } |