summaryrefslogtreecommitdiff
path: root/basic/source/basmgr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-17 11:38:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-17 22:40:40 +0200
commit4dc40659044566280c202e26cab97d682ae6ab54 (patch)
treed97f0e436aac00a5f52624959b0662eb21a534a0 /basic/source/basmgr
parent889df64fbb9534491b76140d63b4340091c763e4 (diff)
rtl::Static -> thread-safe static local
Change-Id: I9f8fe250813f4f376dc46c6f3d7e25e90fdbb50e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/basmgr')
-rw-r--r--basic/source/basmgr/vbahelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx
index 83165374a8f1..7fa101a8259e 100644
--- a/basic/source/basmgr/vbahelper.cxx
+++ b/basic/source/basmgr/vbahelper.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <comphelper/processfactory.hxx>
-#include <rtl/instance.hxx>
namespace basic::vba {
@@ -145,8 +144,6 @@ struct CurrDirPool
std::map< OUString, OUString > maCurrDirs;
};
-struct StaticCurrDirPool : public ::rtl::Static< CurrDirPool, StaticCurrDirPool > {};
-
} // namespace
@@ -167,7 +164,9 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c
if( rPath.isEmpty() )
return;
- CurrDirPool& rPool = StaticCurrDirPool::get();
+ static CurrDirPool StaticCurrDirPool;
+
+ CurrDirPool& rPool = StaticCurrDirPool;
::osl::MutexGuard aGuard( rPool.maMutex );
try
{