diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-14 16:43:53 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:37 -0500 |
commit | 7223ecb528c9883bae835ae5b47f7306efa2e256 (patch) | |
tree | 03715319790af474ba8305c0806e89cb2f95bf5d /toolkit | |
parent | 18a9a87a805b94ad8f7b8a67d63a8568bfd295e7 (diff) |
Use SolarMutexGuard where appropriate
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxgraphics.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 18 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index b88cea692ef4..ae8bc088f2e3 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -110,7 +110,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) { if(mpOutputDevice) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; if ( nFlags & INITOUTDEV_FONT ) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 9374d1aae336..3a80494bb979 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -441,8 +441,8 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) if( bInitedByVCLToolkit ) { { - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); - Application::Execute(); + SolarMutexGuard aGuard; + Application::Execute(); } try { @@ -596,7 +596,7 @@ void SAL_CALL VCLXToolkit::disposing() ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > xRef; VCLXVirtualDevice* pVDev = new VCLXVirtualDevice; - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; VirtualDevice* pV = new VirtualDevice; pV->SetOutputSizePixel( Size( Width, Height ) ); @@ -656,7 +656,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, if ( nType ) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; switch ( (WindowType)nType ) { case WINDOW_CANCELBUTTON: @@ -1011,7 +1011,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( { ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xRef; @@ -1165,7 +1165,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( #elif defined OS2 aParentData.hWnd = (HWND)nWindowHandle; #endif - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { pChildWindow = new WorkWindow( &aParentData ); @@ -1183,7 +1183,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( } else if (nSystemType == com::sun::star::lang::SystemDependent::SYSTEM_JAVA) { - osl::Guard< vos::IMutex > aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; pChildWindow = new WorkWindow(0, Parent); } @@ -1191,7 +1191,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( if ( pChildWindow ) { VCLXTopWindow* pPeer = new VCLXTopWindow(true); - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pPeer->SetWindow( pChildWindow ); xPeer = pPeer; } @@ -1258,7 +1258,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( Window * pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) { - osl::Guard< vos::IMutex > aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; xMsgBox->setCaptionText( aTitle ); xMsgBox->setMessageText( aMessage ); } diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 8286bd3d203b..872b80be1e32 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -219,7 +219,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer( sal_Bool bAcceptE WorkWindow* pWW; { - osl::Guard< vos::IMutex > aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pWW = lcl_GetDefaultWindow(); } try @@ -652,7 +652,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent // #82300# - 2000-12-21 - fs@openoffice.org if (bNeedNewPeer && xParent.is()) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; // and now this is the final withdrawal: // With 83561, I have no other idea than locking the SolarMutex here .... // I really hate the fact that VCL is not theadsafe .... |