diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-17 22:42:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-19 11:19:12 +0100 |
commit | 3152f5a33e787e33ec0dfef8c75d7bbf95194c00 (patch) | |
tree | cc1049cdf9424a5891ca5e255374ef9ca0ff57f5 /filter | |
parent | 729834abac1618aa2f0dcc6d774deb74f7c42bb3 (diff) |
use more cppu::BaseMutex
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/basecontainer.cxx | 31 | ||||
-rw-r--r-- | filter/source/config/cache/basecontainer.hxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/cacheitem.hxx | 13 | ||||
-rw-r--r-- | filter/source/config/cache/cacheupdatelistener.cxx | 11 | ||||
-rw-r--r-- | filter/source/config/cache/cacheupdatelistener.hxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/configflush.cxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/configflush.hxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 49 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.hxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/filterfactory.cxx | 12 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 26 |
13 files changed, 72 insertions, 87 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 10dd76d82d3e..97e7b7f22bea 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -33,9 +33,8 @@ namespace filter::config{ BaseContainer::BaseContainer() - : BaseLock ( ) - , m_eType() - , m_lListener (m_aLock) + : m_eType() + , m_lListener (m_aMutex) { GetTheFilterCache().load(FilterCache::E_CONTAINS_STANDARD); } @@ -52,7 +51,7 @@ void BaseContainer::init(const css::uno::Reference< css::uno::XComponentContext FilterCache::EItemType eType ) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); m_sImplementationName = sImplementationName; m_lServiceNames = lServiceNames ; @@ -66,7 +65,7 @@ void BaseContainer::impl_loadOnDemand() { #ifdef LOAD_IMPLICIT // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // A generic container needs all items of a set of our cache! // Of course it can block for a while, till the cache is really filled. @@ -101,7 +100,7 @@ void BaseContainer::impl_loadOnDemand() void BaseContainer::impl_initFlushMode() { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); if (!m_pFlushCache) m_pFlushCache = GetTheFilterCache().clone(); if (!m_pFlushCache) @@ -114,7 +113,7 @@ void BaseContainer::impl_initFlushMode() FilterCache* BaseContainer::impl_getWorkingCache() const { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); if (m_pFlushCache) return m_pFlushCache.get(); else @@ -161,7 +160,7 @@ void SAL_CALL BaseContainer::insertByName(const OUString& sItem , impl_loadOnDemand(); // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // create write copy of used cache on demand ... impl_initFlushMode(); @@ -179,7 +178,7 @@ void SAL_CALL BaseContainer::removeByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // create write copy of used cache on demand ... impl_initFlushMode(); @@ -211,7 +210,7 @@ void SAL_CALL BaseContainer::replaceByName(const OUString& sItem , impl_loadOnDemand(); // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // create write copy of used cache on demand ... impl_initFlushMode(); @@ -235,7 +234,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); CacheItem aItem; try @@ -268,7 +267,7 @@ css::uno::Sequence< OUString > SAL_CALL BaseContainer::getElementNames() impl_loadOnDemand(); // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); try { @@ -295,7 +294,7 @@ sal_Bool SAL_CALL BaseContainer::hasByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); try { @@ -329,7 +328,7 @@ sal_Bool SAL_CALL BaseContainer::hasElements() impl_loadOnDemand(); // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); try { @@ -363,7 +362,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea impl_loadOnDemand(); // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); try { @@ -403,7 +402,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea void SAL_CALL BaseContainer::flush() { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); if (!m_pFlushCache) throw css::lang::WrappedTargetRuntimeException( diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx index dee054d90731..4ed14d4f603a 100644 --- a/filter/source/config/cache/basecontainer.hxx +++ b/filter/source/config/cache/basecontainer.hxx @@ -49,7 +49,7 @@ namespace filter::config { present by this base class!) was full initialized inside our own ctor as first! */ -class BaseContainer : public BaseLock +class BaseContainer : public cppu::BaseMutex , public ::cppu::WeakImplHelper< css::lang::XServiceInfo , css::container::XNameContainer , // => XNameReplace => XNameAccess => XElementAccess css::container::XContainerQuery , diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx index f0c3558da856..4caf8eea324a 100644 --- a/filter/source/config/cache/cacheitem.hxx +++ b/filter/source/config/cache/cacheitem.hxx @@ -30,19 +30,6 @@ namespace filter::config { -/** @short Must be used as first derived base class - to get a full initialized mutex member, - which can be used during the ctor runs too! - */ -struct BaseLock -{ - public: - - // must be mutable to be usable in const environments too! - mutable ::osl::Mutex m_aLock; -}; - - /** @short represent an item of a FilterCache instance. diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx index 9616d7373df1..14331a190c2d 100644 --- a/filter/source/config/cache/cacheupdatelistener.cxx +++ b/filter/source/config/cache/cacheupdatelistener.cxx @@ -33,8 +33,7 @@ namespace filter::config{ CacheUpdateListener::CacheUpdateListener(FilterCache &rFilterCache, const css::uno::Reference< css::uno::XInterface >& xConfigAccess, FilterCache::EItemType eConfigType) - : BaseLock() - , m_rCache(rFilterCache) + : m_rCache(rFilterCache) , m_xConfig(xConfigAccess) , m_eConfigType(eConfigType) { @@ -47,7 +46,7 @@ CacheUpdateListener::~CacheUpdateListener() void CacheUpdateListener::startListening() { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY); aLock.clear(); // <- SAFE @@ -63,7 +62,7 @@ void CacheUpdateListener::startListening() void CacheUpdateListener::stopListening() { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY); aLock.clear(); // <- SAFE @@ -79,7 +78,7 @@ void CacheUpdateListener::stopListening() void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEvent& aEvent) { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); // disposed ? if ( ! m_xConfig.is()) @@ -173,7 +172,7 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven void SAL_CALL CacheUpdateListener::disposing(const css::lang::EventObject& aEvent) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); if (aEvent.Source == m_xConfig) m_xConfig.clear(); // <- SAFE diff --git a/filter/source/config/cache/cacheupdatelistener.hxx b/filter/source/config/cache/cacheupdatelistener.hxx index 9567b3bd3042..ff7e02759363 100644 --- a/filter/source/config/cache/cacheupdatelistener.hxx +++ b/filter/source/config/cache/cacheupdatelistener.hxx @@ -30,7 +30,7 @@ namespace filter::config { global filter cache, if the underlying configuration wa changed by other processes. */ -class CacheUpdateListener : public BaseLock // must be the first one to guarantee right initialized mutex member! +class CacheUpdateListener : public cppu::BaseMutex // must be the first one to guarantee right initialized mutex member! , public ::cppu::WeakImplHelper< css::util::XChangesListener > { diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx index 017fd8b19bb1..34ac28782b79 100644 --- a/filter/source/config/cache/configflush.cxx +++ b/filter/source/config/cache/configflush.cxx @@ -26,8 +26,7 @@ namespace filter::config{ ConfigFlush::ConfigFlush() - : BaseLock ( ) - , m_lListener(m_aLock) + : m_lListener(m_aMutex) { } diff --git a/filter/source/config/cache/configflush.hxx b/filter/source/config/cache/configflush.hxx index 20b1c14caae6..d5a9e53966c3 100644 --- a/filter/source/config/cache/configflush.hxx +++ b/filter/source/config/cache/configflush.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <comphelper/multicontainer2.hxx> #include <cppuhelper/implbase.hxx> +#include <cppuhelper/basemutex.hxx> namespace filter::config { @@ -34,7 +35,7 @@ namespace filter::config { @descr Such refresh listener will be called in case the type/filter configuration will be changed at runtime. */ -class ConfigFlush final : public BaseLock +class ConfigFlush final : public cppu::BaseMutex , public ::cppu::WeakImplHelper< css::util::XRefreshable, css::lang::XServiceInfo diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index a3bf71cf22ed..864911798dfd 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -53,7 +53,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea css::uno::Reference< css::uno::XInterface > xHandler; // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); auto & cache = GetTheFilterCache(); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 6ac9791129ba..4cfda1dc8b10 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -56,8 +56,7 @@ namespace filter::config{ FilterCache::FilterCache() - : BaseLock ( ) - , m_eFillState(E_CONTAINS_NOTHING ) + : m_eFillState(E_CONTAINS_NOTHING ) { int i = 0; OUString sStandardProps[10]; @@ -119,7 +118,7 @@ FilterCache::~FilterCache() std::unique_ptr<FilterCache> FilterCache::clone() const { // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); auto pClone = std::make_unique<FilterCache>(); @@ -151,7 +150,7 @@ std::unique_ptr<FilterCache> FilterCache::clone() const void FilterCache::takeOver(const FilterCache& rClone) { // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // a) // Don't copy the configuration access points here! @@ -199,7 +198,7 @@ void FilterCache::takeOver(const FilterCache& rClone) void FilterCache::load(EFillState eRequired) { // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // check if required fill state is already reached ... // There is nothing to do then. @@ -238,7 +237,7 @@ void FilterCache::load(EFillState eRequired) bool FilterCache::isFillState(FilterCache::EFillState eState) const { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); return ((m_eFillState & eState) == eState); // <- SAFE } @@ -249,7 +248,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp const CacheItem& lEProps) const { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -279,7 +278,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp bool FilterCache::hasItems(EItemType eType) const { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -294,7 +293,7 @@ bool FilterCache::hasItems(EItemType eType) const std::vector<OUString> FilterCache::getItemNames(EItemType eType) const { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -315,7 +314,7 @@ bool FilterCache::hasItem( EItemType eType, const OUString& sItem) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -347,7 +346,7 @@ CacheItem FilterCache::getItem( EItemType eType, const OUString& sItem) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown if "eType" is unknown. @@ -397,7 +396,7 @@ void FilterCache::removeItem( EItemType eType, const OUString& sItem) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -418,7 +417,7 @@ void FilterCache::setItem( EItemType eType , const CacheItem& aValue) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // search for right list // An exception is thrown - "eType" is unknown. @@ -445,7 +444,7 @@ void FilterCache::refreshItem( EItemType eType, const OUString& sItem) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); impl_loadItemOnDemand(eType, sItem); } @@ -455,7 +454,7 @@ void FilterCache::addStatePropsToItem( EItemType eType, CacheItem& rItem) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // Note: Opening of the configuration layer throws some exceptions // if it failed. So we mustn't check any reference here... @@ -559,7 +558,7 @@ void FilterCache::removeStatePropsFromItem(CacheItem& rItem) void FilterCache::flush() { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // renew all dependencies and optimizations impl_validateAndOptimize(); @@ -661,7 +660,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL , sExtension = sExtension.toAsciiLowerCase(); // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // i) Step over all well known URL pattern @@ -710,7 +709,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL , const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const { // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); switch(eType) { @@ -729,7 +728,7 @@ const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const CacheItemList& FilterCache::impl_getItemList(EItemType eType) { // SAFE -> ---------------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); switch(eType) { @@ -747,7 +746,7 @@ CacheItemList& FilterCache::impl_getItemList(EItemType eType) css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfigProvider eProvider) { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); OUString sPath ; css::uno::Reference< css::uno::XInterface >* pConfig = nullptr; @@ -873,7 +872,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess bool bLocalesMode) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); css::uno::Reference< css::uno::XInterface > xCfg; @@ -933,7 +932,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess void FilterCache::impl_validateAndOptimize() { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // First check if any filter or type could be read // from the underlying configuration! @@ -1260,7 +1259,7 @@ FilterCache::EItemFlushState FilterCache::impl_specifyFlushOperation(const css:: void FilterCache::impl_load(EFillState eRequiredState) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // Attention: Detect services are part of the standard set! // So there is no need to handle it separately. @@ -1473,7 +1472,7 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe { // SAFE -> ---------------------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); OUString sActLocale = m_sActLocale ; aLock.clear(); // <- SAFE ---------------------------------- @@ -2204,7 +2203,7 @@ bool FilterCache::impl_isModuleInstalled(const OUString& sModule) // SAFE -> { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); if (!m_xModuleCfg.is()) { m_xModuleCfg = officecfg::Setup::Office::Factories::get(); diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx index a0ef79c93931..42be4314cb38 100644 --- a/filter/source/config/cache/filtercache.hxx +++ b/filter/source/config/cache/filtercache.hxx @@ -29,6 +29,7 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Any.h> #include <comphelper/documentconstants.hxx> +#include <cppuhelper/basemutex.hxx> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> @@ -54,7 +55,7 @@ class CacheUpdateListener; Further we make it public. So any user of this class can lock us from outside too. */ -class FilterCache : public BaseLock +class FilterCache : public cppu::BaseMutex { // public types diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 8832330d5a04..6bcb0cc4e326 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -77,7 +77,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan const css::uno::Sequence< css::uno::Any >& lArguments) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); auto & cache = GetTheFilterCache(); @@ -167,7 +167,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea { // SAFE -> ---------------------- { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // May be not all filters was loaded ... // But we need it now! impl_loadOnDemand(); @@ -253,7 +253,7 @@ std::vector<OUString> FilterFactory::impl_queryMatchByDocumentService(const Quer nEFlags = pIt->second.toInt32(); // SAFE -> ---------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); // search suitable filters FilterCache* pCache = impl_getWorkingCache(); @@ -409,7 +409,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterList(const QueryTokeniz std::vector<OUString> FilterFactory::impl_getListOfInstalledModules() const { // SAFE -> ---------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; aLock.clear(); // <- SAFE ---------------------- @@ -431,7 +431,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS lIProps[PROPNAME_DOCUMENTSERVICE] <<= sModule; // SAFE -> ---------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); FilterCache* pCache = impl_getWorkingCache(); std::vector<OUString> lOtherFilters = pCache->getMatchingItemsByProps(FilterCache::E_FILTER, lIProps); aLock.clear(); @@ -472,7 +472,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS std::vector<OUString> FilterFactory::impl_readSortedFilterListFromConfig(const OUString& sModule) const { // SAFE -> ---------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; aLock.clear(); // <- SAFE ---------------------- diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index a3aef82e4c6c..3627ea93faa1 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -51,7 +51,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI const css::uno::Sequence< css::uno::Any >& lArguments) { // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); auto & cache = GetTheFilterCache(); diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 9f80798a8cb7..ac4d9aed9f2a 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -72,7 +72,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL) OUString sType; // SAFE -> - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); css::util::URL aURL; aURL.Complete = sURL; @@ -377,7 +377,7 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: try { // SAFE -> ---------------------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); // parse given URL to split it into e.g. main and jump marks ... sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL, OUString()); @@ -487,7 +487,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes OUString sRealType = sType; // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + ::osl::ResettableMutexGuard aLock(m_aMutex); // Attention: For executing next lines of code, We must be sure that // all filters already loaded :-( @@ -545,7 +545,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes try { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); CacheItem aType = cache.getItem(FilterCache::E_TYPE, sType); aType[PROPNAME_PREFERREDFILTER] >>= sFilter; @@ -568,7 +568,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes try { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + ::osl::ResettableMutexGuard aLock(m_aMutex); // Attention: For executing next lines of code, We must be sure that // all filters already loaded :-( @@ -640,7 +640,7 @@ bool TypeDetection::impl_getPreselectionForType( try { // SAFE -> -------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); aType = GetTheFilterCache().getItem(FilterCache::E_TYPE, sType); // <- SAFE -------------------------- } @@ -726,7 +726,7 @@ void TypeDetection::impl_getPreselectionForDocumentService( try { // SAFE -> -------------------------- - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); // Attention: For executing next lines of code, We must be sure that // all filters already loaded :-( @@ -764,7 +764,7 @@ OUString TypeDetection::impl_getTypeFromFilter(const OUString& rFilterName) CacheItem aFilter; try { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); aFilter = GetTheFilterCache().getItem(FilterCache::E_FILTER, rFilterName); } catch (const container::NoSuchElementException&) @@ -786,7 +786,7 @@ void TypeDetection::impl_getAllFormatTypes( std::vector<OUString> aFilterNames; try { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); auto & cache = GetTheFilterCache(); cache.load(FilterCache::E_CONTAINS_FILTERS); aFilterNames = cache.getItemNames(FilterCache::E_FILTER); @@ -896,7 +896,7 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r try { // SAFE -> ---------------------------------- - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); CacheItem aType = GetTheFilterCache().getItem(FilterCache::E_TYPE, sFlatType); aLock.clear(); @@ -974,7 +974,7 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet // SAFE -> { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); xContext = m_xContext; } // <- SAFE @@ -1147,7 +1147,7 @@ bool TypeDetection::impl_validateAndSetTypeOnDescriptor( utl::MediaDescript { // SAFE -> { - osl::MutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aMutex); if (GetTheFilterCache().hasItem(FilterCache::E_TYPE, sType)) { rDescriptor[utl::MediaDescriptor::PROP_TYPENAME] <<= sType; @@ -1168,7 +1168,7 @@ bool TypeDetection::impl_validateAndSetFilterOnDescriptor( utl::MediaDescri try { // SAFE -> - osl::ClearableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aMutex); auto & cache = GetTheFilterCache(); CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sFilter); |