diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-24 09:55:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-24 11:06:07 +0200 |
commit | 19251d0a9690a746e50b24742c5b92c150c434e6 (patch) | |
tree | 8aa48ebbfb4bb5ef170bb14be829318b6bae87f5 /filter | |
parent | 3e21c3c037134054195946720da8548ebb07c57b (diff) |
m_xRefreshBroadcaster in BaseContainer is dead code
because we are assigning a newly created object to a weak reference,
which means the newly created object is destroyed just after it is
created (verified in a debugger).
This was introduced in
commit e03dd544aec890a6fdf4638380c95104430752a3
Date: Wed Jul 20 08:27:45 2005 +0000
INTEGRATION: CWS fwk18 (1.5.224); FILE MERGED
2005/07/06 09:29:56 as 1.5.224.1: #123808# update sfx filter cache
at runtime
and
commit 49a28fd6309011ba71c8efe1c37c4a585b06f20f
Date: Wed Jul 20 08:27:31 2005 +0000
INTEGRATION: CWS fwk18 (1.4.224); FILE MERGED
2005/07/14 12:22:13 as 1.4.224.2: #123808# listen on config to be
informed about changes
2005/07/06 09:29:56 as 1.4.224.1: #123808# update sfx filter cache
at runtime
Change-Id: Ic27cae4a499439009e89b003635067df440d4cf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134853
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 | 10 | ||||
-rw-r--r-- | filter/source/config/cache/basecontainer.hxx | 10 | ||||
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.cxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/filterfactory.cxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.cxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 3 |
6 files changed, 8 insertions, 24 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index c5c9ff939443..dbbb9bcc23da 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -21,7 +21,6 @@ #include "basecontainer.hxx" #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> -#include <com/sun/star/document/FilterConfigRefresh.hpp> #include <com/sun/star/uno/Type.h> #include <comphelper/enumhelper.hxx> #include <comphelper/sequence.hxx> @@ -45,8 +44,7 @@ BaseContainer::~BaseContainer() } -void BaseContainer::init(const css::uno::Reference< css::uno::XComponentContext >& rxContext , - const OUString& sImplementationName, +void BaseContainer::init(const OUString& sImplementationName, const css::uno::Sequence< OUString >& lServiceNames , FilterCache::EItemType eType ) { @@ -56,7 +54,6 @@ void BaseContainer::init(const css::uno::Reference< css::uno::XComponentContext m_sImplementationName = sImplementationName; m_lServiceNames = lServiceNames ; m_eType = eType ; - m_xRefreshBroadcaster = css::document::FilterConfigRefresh::create(rxContext); // <- SAFE } @@ -427,14 +424,9 @@ void SAL_CALL BaseContainer::flush() m_pFlushCache.reset(); - css::uno::Reference< css::util::XRefreshable > xRefreshBroadcaster = m_xRefreshBroadcaster; - aLock.clear(); // <- SAFE - if (xRefreshBroadcaster.is()) - xRefreshBroadcaster->refresh(); - // notify listener outside the lock! // The used listener helper lives if we live // and is threadsafe by itself. diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx index 4ed14d4f603a..6691c1b49380 100644 --- a/filter/source/config/cache/basecontainer.hxx +++ b/filter/source/config/cache/basecontainer.hxx @@ -60,9 +60,6 @@ class BaseContainer : public cppu::BaseMutex protected: - // TODO - css::uno::WeakReference< css::util::XRefreshable > m_xRefreshBroadcaster; - /** @short the implementation name of our derived class, which we provide at the interface XServiceInfo of our class... */ OUString m_sImplementationName; @@ -145,10 +142,9 @@ class BaseContainer : public cppu::BaseMutex specify, which sub container of the used filter cache must be wrapped by this container interface. */ - void init(const css::uno::Reference< css::uno::XComponentContext >& rxContext , - const OUString& sImplementationName, - const css::uno::Sequence< OUString >& lServiceNames , - FilterCache::EItemType eType ); + void init( const OUString& sImplementationName, + const css::uno::Sequence< OUString >& lServiceNames , + FilterCache::EItemType eType ); // helper diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index 7e2ec4fc23cc..089f8db5ff62 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -29,8 +29,7 @@ namespace filter::config{ ContentHandlerFactory::ContentHandlerFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext) : m_xContext(rxContext) { - BaseContainer::init(rxContext , - "com.sun.star.comp.filter.config.ContentHandlerFactory" , + BaseContainer::init("com.sun.star.comp.filter.config.ContentHandlerFactory" , { "com.sun.star.frame.ContentHandlerFactory" }, FilterCache::E_CONTENTHANDLER ); } diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 586229cb78c5..54225db86d7c 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -55,8 +55,7 @@ FilterCache& GetTheFilterCache() FilterFactory::FilterFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext) : m_xContext(rxContext) { - BaseContainer::init(rxContext , - "com.sun.star.comp.filter.config.FilterFactory" , + BaseContainer::init("com.sun.star.comp.filter.config.FilterFactory" , { "com.sun.star.document.FilterFactory" }, FilterCache::E_FILTER ); } diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index af03dbec96f2..ebe4823666ad 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -29,8 +29,7 @@ namespace filter::config{ FrameLoaderFactory::FrameLoaderFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext) : m_xContext(rxContext) { - BaseContainer::init(rxContext , - "com.sun.star.comp.filter.config.FrameLoaderFactory" , + BaseContainer::init("com.sun.star.comp.filter.config.FrameLoaderFactory" , { "com.sun.star.frame.FrameLoaderFactory" }, FilterCache::E_FRAMELOADER ); } diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 88402fbfc672..1aae850fd535 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -55,8 +55,7 @@ TypeDetection::TypeDetection(const css::uno::Reference< css::uno::XComponentCont , m_bCancel(false) { css::frame::Desktop::create(m_xContext)->addTerminateListener(m_xTerminateListener); - BaseContainer::init(rxContext , - "com.sun.star.comp.filter.config.TypeDetection" , + BaseContainer::init("com.sun.star.comp.filter.config.TypeDetection" , { "com.sun.star.document.TypeDetection" }, FilterCache::E_TYPE ); } |