diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-01-16 13:35:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-01-16 17:27:00 +0100 |
commit | 882aaee5ff76dbcba74ecea615393628519e14e1 (patch) | |
tree | 85134b3e19bebcae95fbde99ae2a4f0d53dcdc2a /cppuhelper | |
parent | 3d6d07a7e34e0e767c653008c0eb16ce7ffe5f19 (diff) |
UNO methods are no longer called directly on ServiceManager
Change-Id: I037ed9899873e614e9e10c89f1f8a74efa73d737
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 56 | ||||
-rw-r--r-- | cppuhelper/source/servicemanager.hxx | 10 |
2 files changed, 33 insertions, 33 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index a389fd70f728..bdf1b1a39474 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -656,6 +656,34 @@ void cppuhelper::ServiceManager::loadImplementation( } } +void cppuhelper::ServiceManager::disposing() { + std::vector< css::uno::Reference< css::lang::XComponent > > comps; + Data clear; + { + osl::MutexGuard g(rBHelper.rMutex); + for (Data::DynamicImplementations::const_iterator i( + data_.dynamicImplementations.begin()); + i != data_.dynamicImplementations.end(); ++i) + { + assert(i->second.get() != 0); + if (i->second->component.is()) { + comps.push_back(i->second->component); + } + } + data_.namedImplementations.swap(clear.namedImplementations); + data_.dynamicImplementations.swap(clear.dynamicImplementations); + data_.services.swap(clear.services); + data_.singletons.swap(clear.singletons); + } + for (std::vector< + css::uno::Reference< css::lang::XComponent > >::const_iterator i( + comps.begin()); + i != comps.end(); ++i) + { + removeEventListenerFromComponent(*i); + } +} + rtl::OUString cppuhelper::ServiceManager::getImplementationName() throw (css::uno::RuntimeException) { @@ -1102,34 +1130,6 @@ void cppuhelper::ServiceManager::disposing( false); } -void cppuhelper::ServiceManager::disposing() { - std::vector< css::uno::Reference< css::lang::XComponent > > comps; - Data clear; - { - osl::MutexGuard g(rBHelper.rMutex); - for (Data::DynamicImplementations::const_iterator i( - data_.dynamicImplementations.begin()); - i != data_.dynamicImplementations.end(); ++i) - { - assert(i->second.get() != 0); - if (i->second->component.is()) { - comps.push_back(i->second->component); - } - } - data_.namedImplementations.swap(clear.namedImplementations); - data_.dynamicImplementations.swap(clear.dynamicImplementations); - data_.services.swap(clear.services); - data_.singletons.swap(clear.singletons); - } - for (std::vector< - css::uno::Reference< css::lang::XComponent > >::const_iterator i( - comps.begin()); - i != comps.end(); ++i) - { - removeEventListenerFromComponent(*i); - } -} - void cppuhelper::ServiceManager::removeEventListenerFromComponent( css::uno::Reference< css::lang::XComponent > const & component) { diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx index e4a9dfaa9055..013bef0493e1 100644 --- a/cppuhelper/source/servicemanager.hxx +++ b/cppuhelper/source/servicemanager.hxx @@ -155,6 +155,11 @@ public: css::uno::Reference< css::lang::XSingleComponentFactory > * factory1, css::uno::Reference< css::lang::XSingleServiceFactory > * factory2); +private: + virtual ~ServiceManager() {} + + virtual void SAL_CALL disposing(); + virtual rtl::OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException); @@ -278,11 +283,6 @@ public: virtual void SAL_CALL disposing(css::lang::EventObject const & Source) throw (css::uno::RuntimeException); -private: - virtual ~ServiceManager() {} - - virtual void SAL_CALL disposing(); - // needs to be called with rBHelper.rMutex locked: bool isDisposed() { return rBHelper.bDisposed || rBHelper.bInDispose; } |