summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-18 14:39:22 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-18 15:27:06 +0100
commit82f79abae5cf92940d8c2d642792da8b44e155d1 (patch)
treef4efd731f4ce5b1f877c38ac4c41755e2e205608
parente28207718cf83fa93bb1010a047fcb526d504e95 (diff)
Use SolarMutexGuard directly
...and access safe members directly Change-Id: I46fa7683922b0604118f6da219f44204767f4618
-rw-r--r--framework/inc/helper/dockingareadefaultacceptor.hxx4
-rw-r--r--framework/source/helper/dockingareadefaultacceptor.cxx23
2 files changed, 8 insertions, 19 deletions
diff --git a/framework/inc/helper/dockingareadefaultacceptor.hxx b/framework/inc/helper/dockingareadefaultacceptor.hxx
index 8c302e67d52c..7d2f7c0b9e0f 100644
--- a/framework/inc/helper/dockingareadefaultacceptor.hxx
+++ b/framework/inc/helper/dockingareadefaultacceptor.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_FRAMEWORK_INC_HELPER_DOCKINGAREADEFAULTACCEPTOR_HXX
#include <classes/framecontainer.hxx>
-#include <threadhelp/threadhelpbase.hxx>
#include <macros/generic.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
@@ -37,8 +36,7 @@ namespace framework{
-class DockingAreaDefaultAcceptor : private ThreadHelpBase ,
- public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XDockingAreaAcceptor >
+class DockingAreaDefaultAcceptor : public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XDockingAreaAcceptor >
{
public:
diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx
index f0746eec3b4e..a1c9acb7e95a 100644
--- a/framework/source/helper/dockingareadefaultacceptor.cxx
+++ b/framework/source/helper/dockingareadefaultacceptor.cxx
@@ -18,7 +18,6 @@
*/
#include <helper/dockingareadefaultacceptor.hxx>
-#include <threadhelp/guard.hxx>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/PosSize.hpp>
@@ -39,10 +38,7 @@ using namespace ::osl ;
// constructor
DockingAreaDefaultAcceptor::DockingAreaDefaultAcceptor( const css::uno::Reference< XFrame >& xOwner )
- // Init baseclasses first
- : ThreadHelpBase ( &Application::GetSolarMutex() )
- // Init member
- , m_xOwner ( xOwner )
+ : m_xOwner ( xOwner )
{
}
@@ -57,11 +53,11 @@ DockingAreaDefaultAcceptor::~DockingAreaDefaultAcceptor()
// XDockingAreaAcceptor
css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::getContainerWindow() throw (css::uno::RuntimeException, std::exception)
{
- // Ready for multithreading
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
// Try to "lock" the frame for access to taskscontainer.
- css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY );
+ css::uno::Reference< XFrame > xFrame( m_xOwner );
+ //TODO: check xFrame for null?
css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() );
return xContainerWindow;
@@ -69,12 +65,8 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::ge
sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css::awt::Rectangle& RequestedSpace ) throw (css::uno::RuntimeException, std::exception)
{
- // Ready for multithreading
- Guard aGuard( m_aLock );
-
// Try to "lock" the frame for access to taskscontainer.
- css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY );
- aGuard.unlock();
+ css::uno::Reference< XFrame > xFrame( m_xOwner );
if ( xFrame.is() )
{
@@ -106,11 +98,10 @@ sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css
void SAL_CALL DockingAreaDefaultAcceptor::setDockingAreaSpace( const css::awt::Rectangle& BorderSpace ) throw (css::uno::RuntimeException, std::exception)
{
- // Ready for multithreading
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
// Try to "lock" the frame for access to taskscontainer.
- css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY );
+ css::uno::Reference< XFrame > xFrame( m_xOwner );
if ( xFrame.is() )
{
css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() );