summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-05 09:01:47 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-06 09:27:52 +0100
commit3cf64b9d57198c42d6cef4d78fc563f69ad4c503 (patch)
treec76ddbb14e3ec38c42cc3222451c9d73c8a7b8a2 /scripting
parent52357eefa7abdf4f648e311ce6ce9fd25b14f65e (diff)
cid#1608064 silence Data race condition
Change-Id: Ib8fa1a1027bef3516665f17c8c4c19b6d571e7ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176096 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/stringresource/stringresource.cxx8
-rw-r--r--scripting/source/stringresource/stringresource.hxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index f144fd3bcb32..244063ba3a5e 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -697,7 +697,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
throw IllegalArgumentException( u"XInitialization::initialize: Expected Comment string"_ustr, Reference< XInterface >(), 4 );
}
- implScanLocales();
+ implScanLocales(rGuard);
implSetCurrentLocale( rGuard, aCurrentLocale, true/*FindClosestMatch*/, true/*bUseDefaultIfNoMatch*/ );
}
@@ -1527,7 +1527,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin
}
// Scan locale properties files
-void StringResourcePersistenceImpl::implScanLocales()
+void StringResourcePersistenceImpl::implScanLocales(std::unique_lock<std::mutex>& /*rGuard*/)
{
// Dummy implementation, method not called for this
// base class, but pure virtual not possible-
@@ -2229,7 +2229,7 @@ void StringResourceWithStorageImpl::setStorage( const Reference< XStorage >& Sto
// Scan locale properties files
-void StringResourceWithStorageImpl::implScanLocales()
+void StringResourceWithStorageImpl::implScanLocales(std::unique_lock<std::mutex>& /*rGuard*/)
{
if( m_xStorage.is() )
{
@@ -2528,7 +2528,7 @@ void StringResourceWithLocationImpl::setURL( const OUString& URL )
// Scan locale properties files
-void StringResourceWithLocationImpl::implScanLocales()
+void StringResourceWithLocationImpl::implScanLocales(std::unique_lock<std::mutex>& /*rGuard*/)
{
const Reference< ucb::XSimpleFileAccess3 > xFileAccess = getFileAccessImpl();
if( xFileAccess->isFolder( m_aLocation ) )
diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx
index 50fd8567e0e6..d03e1d7bde06 100644
--- a/scripting/source/stringresource/stringresource.hxx
+++ b/scripting/source/stringresource/stringresource.hxx
@@ -200,7 +200,7 @@ protected:
void implInitializeCommonParameters( std::unique_lock<std::mutex>& rGuard, const css::uno::Sequence< css::uno::Any >& aArguments );
// Scan locale properties files
- virtual void implScanLocales();
+ virtual void implScanLocales(std::unique_lock<std::mutex>& rGuard);
// Method to load a locale if necessary, returns true if loading was successful
virtual bool loadLocale( LocaleItem* pLocaleItem ) override;
@@ -333,7 +333,7 @@ class StringResourceWithStorageImpl : public StringResourceWithStorageImpl_BASE
css::uno::Reference< css::embed::XStorage > m_xStorage;
bool m_bStorageChanged;
- virtual void implScanLocales() override;
+ virtual void implScanLocales(std::unique_lock<std::mutex>& rGuard) override;
virtual bool implLoadLocale( LocaleItem* pLocaleItem ) override;
public:
@@ -415,7 +415,7 @@ class StringResourceWithLocationImpl : public StringResourceWithLocationImpl_BAS
const css::uno::Reference< css::ucb::XSimpleFileAccess3 > & getFileAccessImpl();
- virtual void implScanLocales() override;
+ virtual void implScanLocales(std::unique_lock<std::mutex>& rGuard) override;
virtual bool implLoadLocale( LocaleItem* pLocaleItem ) override;
public: