diff options
Diffstat (limited to 'filter/source/config')
-rw-r--r-- | filter/source/config/cache/basecontainer.cxx | 32 | ||||
-rw-r--r-- | filter/source/config/cache/cacheupdatelistener.cxx | 9 | ||||
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 58 | ||||
-rw-r--r-- | filter/source/config/cache/filterfactory.cxx | 21 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 35 |
7 files changed, 76 insertions, 83 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 53e04e68ecf5..22565b276f65 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -55,7 +55,7 @@ void BaseContainer::init(const css::uno::Reference< css::uno::XComponentContext FilterCache::EItemType eType ) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); m_sImplementationName = sImplementationName; m_lServiceNames = lServiceNames ; @@ -69,7 +69,7 @@ void BaseContainer::impl_loadOnDemand() { #ifdef LOAD_IMPLICIT // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // 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. @@ -104,7 +104,7 @@ void BaseContainer::impl_loadOnDemand() void BaseContainer::impl_initFlushMode() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); if (!m_pFlushCache) m_pFlushCache = TheFilterCache::get().clone(); if (!m_pFlushCache) @@ -117,7 +117,7 @@ void BaseContainer::impl_initFlushMode() FilterCache* BaseContainer::impl_getWorkingCache() const { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); if (m_pFlushCache) return m_pFlushCache.get(); else @@ -164,7 +164,7 @@ void SAL_CALL BaseContainer::insertByName(const OUString& sItem , impl_loadOnDemand(); // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // create write copy of used cache on demand ... impl_initFlushMode(); @@ -173,8 +173,6 @@ void SAL_CALL BaseContainer::insertByName(const OUString& sItem , if (pCache->hasItem(m_eType, sItem)) throw css::container::ElementExistException(OUString(), static_cast< css::container::XNameContainer* >(this)); pCache->setItem(m_eType, sItem, aItem); - - aLock.clear(); // <- SAFE ---------------------------------- } @@ -184,15 +182,13 @@ void SAL_CALL BaseContainer::removeByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // create write copy of used cache on demand ... impl_initFlushMode(); FilterCache* pCache = impl_getWorkingCache(); pCache->removeItem(m_eType, sItem); // throw exceptions automatically - - aLock.clear(); // <- SAFE ---------------------------------- } @@ -218,7 +214,7 @@ void SAL_CALL BaseContainer::replaceByName(const OUString& sItem , impl_loadOnDemand(); // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // create write copy of used cache on demand ... impl_initFlushMode(); @@ -227,8 +223,6 @@ void SAL_CALL BaseContainer::replaceByName(const OUString& sItem , if (!pCache->hasItem(m_eType, sItem)) throw css::container::NoSuchElementException(OUString(), static_cast< css::container::XNameContainer* >(this)); pCache->setItem(m_eType, sItem, aItem); - - aLock.clear(); // <- SAFE ---------------------------------- } @@ -244,7 +238,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); CacheItem aItem; try @@ -277,7 +271,7 @@ css::uno::Sequence< OUString > SAL_CALL BaseContainer::getElementNames() impl_loadOnDemand(); // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); try { @@ -304,7 +298,7 @@ sal_Bool SAL_CALL BaseContainer::hasByName(const OUString& sItem) impl_loadOnDemand(); // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); try { @@ -338,7 +332,7 @@ sal_Bool SAL_CALL BaseContainer::hasElements() impl_loadOnDemand(); // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); try { @@ -373,7 +367,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea impl_loadOnDemand(); // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); try { @@ -414,7 +408,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea void SAL_CALL BaseContainer::flush() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); if (!m_pFlushCache) throw css::lang::WrappedTargetRuntimeException( diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx index e380407eda3a..6625d4ee9286 100644 --- a/filter/source/config/cache/cacheupdatelistener.cxx +++ b/filter/source/config/cache/cacheupdatelistener.cxx @@ -50,7 +50,7 @@ CacheUpdateListener::~CacheUpdateListener() void CacheUpdateListener::startListening() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY); aLock.clear(); // <- SAFE @@ -66,7 +66,7 @@ void CacheUpdateListener::startListening() void CacheUpdateListener::stopListening() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); css::uno::Reference< css::util::XChangesNotifier > xNotifier(m_xConfig, css::uno::UNO_QUERY); aLock.clear(); // <- SAFE @@ -82,7 +82,7 @@ void CacheUpdateListener::stopListening() void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEvent& aEvent) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); // disposed ? if ( ! m_xConfig.is()) @@ -176,10 +176,9 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven void SAL_CALL CacheUpdateListener::disposing(const css::lang::EventObject& aEvent) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); if (aEvent.Source == m_xConfig) m_xConfig.clear(); - aLock.clear(); // <- SAFE } diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index ae7b03c7cec9..11ad89a99474 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -57,7 +57,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea css::uno::Reference< css::uno::XInterface > xHandler; // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); auto & cache = TheFilterCache::get(); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 5a1fba1ed651..f717f109a26f 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -121,7 +121,7 @@ FilterCache::~FilterCache() std::unique_ptr<FilterCache> FilterCache::clone() const { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); auto pClone = std::make_unique<FilterCache>(); @@ -153,7 +153,7 @@ std::unique_ptr<FilterCache> FilterCache::clone() const void FilterCache::takeOver(const FilterCache& rClone) { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // a) // Don't copy the configuration access points here! @@ -201,7 +201,7 @@ void FilterCache::takeOver(const FilterCache& rClone) void FilterCache::load(EFillState eRequired) { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // check if required fill state is already reached ... // There is nothing to do then. @@ -240,7 +240,7 @@ void FilterCache::load(EFillState eRequired) bool FilterCache::isFillState(FilterCache::EFillState eState) const { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); return ((m_eFillState & eState) == eState); // <- SAFE } @@ -251,7 +251,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp const CacheItem& lEProps) const { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -281,7 +281,7 @@ std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eTyp bool FilterCache::hasItems(EItemType eType) const { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -296,7 +296,7 @@ bool FilterCache::hasItems(EItemType eType) const std::vector<OUString> FilterCache::getItemNames(EItemType eType) const { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -317,7 +317,7 @@ bool FilterCache::hasItem( EItemType eType, const OUString& sItem) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -349,7 +349,7 @@ CacheItem FilterCache::getItem( EItemType eType, const OUString& sItem) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown if "eType" is unknown. @@ -399,7 +399,7 @@ void FilterCache::removeItem( EItemType eType, const OUString& sItem) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -420,7 +420,7 @@ void FilterCache::setItem( EItemType eType , const CacheItem& aValue) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // search for right list // An exception is thrown - "eType" is unknown. @@ -447,7 +447,7 @@ void FilterCache::refreshItem( EItemType eType, const OUString& sItem) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); impl_loadItemOnDemand(eType, sItem); } @@ -457,7 +457,7 @@ void FilterCache::addStatePropsToItem( EItemType eType, CacheItem& rItem) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // Note: Opening of the configuration layer throws some exceptions // if it failed. So we mustn't check any reference here... @@ -562,7 +562,7 @@ void FilterCache::removeStatePropsFromItem(CacheItem& rItem) void FilterCache::flush() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // renew all dependencies and optimizations impl_validateAndOptimize(); @@ -664,7 +664,7 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL , sExtension = sExtension.toAsciiLowerCase(); // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // i) Step over all well known URL pattern @@ -707,14 +707,13 @@ void FilterCache::detectFlatForURL(const css::util::URL& aURL , } } - aLock.clear(); // <- SAFE ---------------------------------- } const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); switch(eType) { @@ -733,7 +732,7 @@ const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const CacheItemList& FilterCache::impl_getItemList(EItemType eType) { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); switch(eType) { @@ -751,7 +750,7 @@ CacheItemList& FilterCache::impl_getItemList(EItemType eType) css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfigProvider eProvider) { - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); OUString sPath ; css::uno::Reference< css::uno::XInterface >* pConfig = nullptr; @@ -877,7 +876,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess bool bLocalesMode) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); css::uno::Reference< css::uno::XInterface > xCfg; @@ -937,7 +936,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess void FilterCache::impl_validateAndOptimize() { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // First check if any filter or type could be read // from the underlying configuration! @@ -1254,7 +1253,7 @@ FilterCache::EItemFlushState FilterCache::impl_specifyFlushOperation(const css:: void FilterCache::impl_load(EFillState eRequiredState) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // Attention: Detect services are part of the standard set! // So there is no need to handle it separately. @@ -1467,7 +1466,7 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); OUString sActLocale = m_sActLocale ; aLock.clear(); // <- SAFE ---------------------------------- @@ -2203,14 +2202,15 @@ bool FilterCache::impl_isModuleInstalled(const OUString& sModule) css::uno::Reference< css::container::XNameAccess > xCfg; // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); - if (! m_xModuleCfg.is()) { - m_xModuleCfg = officecfg::Setup::Office::Factories::get(); - } + osl::MutexGuard aLock(m_aLock); + if (!m_xModuleCfg.is()) + { + m_xModuleCfg = officecfg::Setup::Office::Factories::get(); + } - xCfg = m_xModuleCfg; - aLock.clear(); + xCfg = m_xModuleCfg; + } // <- SAFE if (xCfg.is()) diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 8e559f2de666..743131a75313 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -74,7 +74,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan const css::uno::Sequence< css::uno::Any >& lArguments) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); auto & cache = TheFilterCache::get(); @@ -164,11 +164,12 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL FilterFactory::crea if (lTokens.valid()) { // SAFE -> ---------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); - // May be not all filters was loaded ... - // But we need it now! - impl_loadOnDemand(); - aLock.clear(); + { + osl::MutexGuard aLock(m_aLock); + // May be not all filters was loaded ... + // But we need it now! + impl_loadOnDemand(); + } // <- SAFE ---------------------- if (lTokens.find(QUERY_IDENTIFIER_GETPREFERREDFILTERFORTYPE) != lTokens.end()) @@ -251,7 +252,7 @@ std::vector<OUString> FilterFactory::impl_queryMatchByDocumentService(const Quer nEFlags = pIt->second.toInt32(); // SAFE -> ---------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); // search suitable filters FilterCache* pCache = impl_getWorkingCache(); @@ -406,7 +407,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterList(const QueryTokeniz std::vector<OUString> FilterFactory::impl_getListOfInstalledModules() const { // SAFE -> ---------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; aLock.clear(); // <- SAFE ---------------------- @@ -428,7 +429,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS lIProps[PROPNAME_DOCUMENTSERVICE] <<= sModule; // SAFE -> ---------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); FilterCache* pCache = impl_getWorkingCache(); std::vector<OUString> lOtherFilters = pCache->getMatchingItemsByProps(FilterCache::E_FILTER, lIProps); aLock.clear(); @@ -469,7 +470,7 @@ std::vector<OUString> FilterFactory::impl_getSortedFilterListForModule(const OUS std::vector<OUString> FilterFactory::impl_readSortedFilterListFromConfig(const OUString& sModule) const { // SAFE -> ---------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); 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 abf51d859baf..14b09a5fdb5a 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -54,7 +54,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI const css::uno::Sequence< css::uno::Any >& lArguments) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); auto & cache = TheFilterCache::get(); diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 278f53eea11a..738f09a671c8 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -74,7 +74,7 @@ OUString SAL_CALL TypeDetection::queryTypeByURL(const OUString& sURL) OUString sType; // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); css::util::URL aURL; aURL.Complete = sURL; @@ -379,7 +379,7 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: try { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); // parse given URL to split it into e.g. main and jump marks ... sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString()); @@ -549,7 +549,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes try { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); CacheItem aType = cache.getItem(FilterCache::E_TYPE, sType); aType[PROPNAME_PREFERREDFILTER] >>= sFilter; @@ -644,9 +644,8 @@ bool TypeDetection::impl_getPreselectionForType( try { // SAFE -> -------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); aType = TheFilterCache::get().getItem(FilterCache::E_TYPE, sType); - aLock.clear(); // <- SAFE -------------------------- } catch(const css::container::NoSuchElementException&) @@ -731,7 +730,7 @@ void TypeDetection::impl_getPreselectionForDocumentService( try { // SAFE -> -------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::MutexGuard aLock(m_aLock); // Attention: For executing next lines of code, We must be sure that // all filters already loaded :-( @@ -742,8 +741,6 @@ void TypeDetection::impl_getPreselectionForDocumentService( CacheItem lIProps; lIProps[PROPNAME_DOCUMENTSERVICE] <<= sPreSelDocumentService; lFilters = cache.getMatchingItemsByProps(FilterCache::E_FILTER, lIProps); - - aLock.clear(); // <- SAFE -------------------------- } catch (const css::container::NoSuchElementException&) @@ -905,7 +902,7 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r try { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); CacheItem aType = TheFilterCache::get().getItem(FilterCache::E_TYPE, sFlatType); aLock.clear(); @@ -986,9 +983,10 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet css::uno::Reference< css::uno::XComponentContext > xContext; // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); - xContext = m_xContext; - aLock.clear(); + { + osl::MutexGuard aLock(m_aLock); + xContext = m_xContext; + } // <- SAFE try @@ -1158,13 +1156,14 @@ bool TypeDetection::impl_validateAndSetTypeOnDescriptor( utl::MediaDescript const OUString& sType ) { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); - if (TheFilterCache::get().hasItem(FilterCache::E_TYPE, sType)) { - rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; - return true; + osl::MutexGuard aLock(m_aLock); + if (TheFilterCache::get().hasItem(FilterCache::E_TYPE, sType)) + { + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; + return true; + } } - aLock.clear(); // <- SAFE // remove all related information from the descriptor @@ -1179,7 +1178,7 @@ bool TypeDetection::impl_validateAndSetFilterOnDescriptor( utl::MediaDescri try { // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); + osl::ClearableMutexGuard aLock(m_aLock); auto & cache = TheFilterCache::get(); CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sFilter); |