summaryrefslogtreecommitdiff
path: root/svtools/source/hatchwindow
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-12-03 10:58:55 +0100
committerMikhail Voytenko <mav@openoffice.org>2010-12-03 10:58:55 +0100
commite18dd74baf6de811ce41ab15377800d923bdc0c2 (patch)
tree70ce065737bc54e1df98aeb0efe73e2efb86ab66 /svtools/source/hatchwindow
parent8dc3743ca56382374183bec5cd1a11d53f3085b8 (diff)
fwk162: #i115726# support activation of object from other threads
Diffstat (limited to 'svtools/source/hatchwindow')
-rw-r--r--svtools/source/hatchwindow/hatchwindow.cxx6
-rw-r--r--svtools/source/hatchwindow/hatchwindowfactory.cxx2
2 files changed, 7 insertions, 1 deletions
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index 1b84206d6696..b26f7bbf091b 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -33,6 +33,8 @@
#include "ipwin.hxx"
#include <toolkit/helper/convert.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -50,6 +52,8 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer >
const awt::Rectangle& aBounds,
const awt::Size& aSize )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
Window* pParent = NULL;
VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
@@ -117,7 +121,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType )
throw( uno::RuntimeException )
{
// Attention:
- // Don't use mutex or guard in this method!!! Is a method of XInterface.
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
uno::Any aReturn( ::cppu::queryInterface( rType,
static_cast< embed::XHatchWindow* >( this ) ) );
diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx
index 0eec027167c2..1222013372f7 100644
--- a/svtools/source/hatchwindow/hatchwindowfactory.cxx
+++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx
@@ -31,6 +31,7 @@
#include "hatchwindowfactory.hxx"
#include "hatchwindow.hxx"
#include "cppuhelper/factory.hxx"
+#include <vcl/svapp.hxx>
#include "documentcloser.hxx"
@@ -69,6 +70,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW
if ( !xParent.is() )
throw lang::IllegalArgumentException(); // TODO
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
VCLXHatchWindow* pResult = new VCLXHatchWindow();
pResult->initializeWindow( xParent, aBounds, aHandlerSize );
return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) );