From dd7b477e9dea0af0e23b5ac51f41421ad9af43cc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 20 Mar 2014 11:39:54 +0100 Subject: [PATCH] Access safe members directly Change-Id: Ib1195f4704de845448e280fabbe40580de46a97d --- framework/inc/helper/statusindicator.hxx | 4 +-- framework/source/helper/statusindicator.cxx | 33 ++++----------------- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/framework/inc/helper/statusindicator.hxx b/framework/inc/helper/statusindicator.hxx index a5ddac56d32b..adda81a29b72 100644 --- a/framework/inc/helper/statusindicator.hxx +++ b/framework/inc/helper/statusindicator.hxx @@ -24,7 +24,6 @@ // include files of own module #include -#include #include #include #include @@ -59,8 +58,7 @@ namespace framework{ @devstatus ready to use @threadsafe yes */ -class StatusIndicator : private ThreadHelpBase // Order of baseclasses is necessary for right initializaton! - , public ::cppu::WeakImplHelper1< css::task::XStatusIndicator > +class StatusIndicator : public ::cppu::WeakImplHelper1< css::task::XStatusIndicator > { // member diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx index 61d25212c9bd..ab9e4cc86142 100644 --- a/framework/source/helper/statusindicator.cxx +++ b/framework/source/helper/statusindicator.cxx @@ -28,8 +28,7 @@ namespace framework{ StatusIndicator::StatusIndicator(StatusIndicatorFactory* pFactory) - : ThreadHelpBase ( ) - , m_xFactory (pFactory) + : m_xFactory (pFactory) { } @@ -47,11 +46,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText , (void) sText; (void) nRange; #else - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY); - aReadLock.unlock(); - // <- SAFE + css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory); if (xFactory.is()) { StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get(); @@ -65,11 +60,7 @@ void SAL_CALL StatusIndicator::end() throw(css::uno::RuntimeException, std::exception) { #if HAVE_FEATURE_DESKTOP - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY); - aReadLock.unlock(); - // <- SAFE + css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory); if (xFactory.is()) { StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get(); @@ -83,11 +74,7 @@ void SAL_CALL StatusIndicator::reset() throw(css::uno::RuntimeException, std::exception) { #if HAVE_FEATURE_DESKTOP - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY); - aReadLock.unlock(); - // <- SAFE + css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory); if (xFactory.is()) { StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get(); @@ -103,11 +90,7 @@ void SAL_CALL StatusIndicator::setText(const OUString& sText) #if !HAVE_FEATURE_DESKTOP (void) sText; #else - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY); - aReadLock.unlock(); - // <- SAFE + css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory); if (xFactory.is()) { StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get(); @@ -123,11 +106,7 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue) #if !HAVE_FEATURE_DESKTOP (void) nValue; #else - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY); - aReadLock.unlock(); - // <- SAFE + css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory); if (xFactory.is()) { StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();