diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-20 09:11:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-20 09:48:22 +0100 |
commit | 6771778d2e5423c7b2d3d6f81669b5d0d0925c63 (patch) | |
tree | bcbfcc681c69db32c1e345d598edcfa580bf6c75 | |
parent | 67f378565044355d50aab69b05799adb7c3027bc (diff) |
Use SolarMutexGuard directly
Change-Id: If09abe4dd6191efa5f92bf3af7cc6e119f401ab8
-rw-r--r-- | framework/inc/tabwin/tabwinfactory.hxx | 4 | ||||
-rw-r--r-- | framework/source/tabwin/tabwinfactory.cxx | 13 |
2 files changed, 6 insertions, 11 deletions
diff --git a/framework/inc/tabwin/tabwinfactory.hxx b/framework/inc/tabwin/tabwinfactory.hxx index 5f40b2772667..25f63f411596 100644 --- a/framework/inc/tabwin/tabwinfactory.hxx +++ b/framework/inc/tabwin/tabwinfactory.hxx @@ -21,7 +21,6 @@ #define INCLUDED_FRAMEWORK_INC_TABWIN_TABWINFACTORY_HXX #include <stdtypes.h> -#include <threadhelp/threadhelpbase.hxx> #include <macros/generic.hxx> #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> @@ -41,8 +40,7 @@ namespace framework { -class TabWinFactory : protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleComponentFactory, com::sun::star::lang::XServiceInfo> +class TabWinFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleComponentFactory, com::sun::star::lang::XServiceInfo> { public: TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx index 373a48df59e8..41f724672e5c 100644 --- a/framework/source/tabwin/tabwinfactory.cxx +++ b/framework/source/tabwin/tabwinfactory.cxx @@ -20,8 +20,6 @@ #include <tabwin/tabwinfactory.hxx> #include <tabwin/tabwindow.hxx> -#include <threadhelp/guard.hxx> - #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/awt/Toolkit.hpp> @@ -55,8 +53,7 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( TabWinFactory DEFINE_INIT_SERVICE ( TabWinFactory, {} ) TabWinFactory::TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ) : - ThreadHelpBase( &Application::GetSolarMutex() ) - , m_xContext( xContext ) + m_xContext( xContext ) { } @@ -80,10 +77,10 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) const OUString aTopWindowArgName( "TopWindow"); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - Guard aLock( m_aLock ); + SolarMutexResettableGuard aLock; css::uno::Reference< css::awt::XToolkit2 > xToolkit = m_xToolkit; css::uno::Reference< css::uno::XComponentContext > xContext( m_xContext ); - aLock.unlock(); + aLock.clear(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ css::uno::Reference< css::uno::XInterface > xReturn; @@ -103,9 +100,9 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) { xToolkit = css::awt::Toolkit::create( xContext ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - aLock.lock(); + aLock.reset(); m_xToolkit = xToolkit; - aLock.unlock(); + aLock.clear(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ } |