diff options
-rw-r--r-- | basic/source/classes/eventatt.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 10 | ||||
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 2 | ||||
-rw-r--r-- | framework/source/inc/pattern/window.hxx | 33 | ||||
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/recoveryui.cxx | 2 |
6 files changed, 25 insertions, 26 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 08714e34d2..4703647b7a 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -255,7 +255,7 @@ Any BasicScriptListener_Impl::approveFiring( const ScriptEvent& aScriptEvent ) void BasicScriptListener_Impl::disposing(const EventObject& ) throw ( RuntimeException ) { // TODO: ??? - //NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + //SolarMutexGuard aGuard; //xSbxObj.Clear(); } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 2158bdc8ef..e22cb142f0 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3905,7 +3905,7 @@ BasicAllListener_Impl::~BasicAllListener_Impl() void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet ) { - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + SolarMutexGuard guard; if( xSbxObj.Is() ) { @@ -3970,7 +3970,7 @@ Any BasicAllListener_Impl::approveFiring( const AllEventObject& Event ) throw ( // Methods of XEventListener void BasicAllListener_Impl ::disposing(const EventObject& ) throw ( RuntimeException ) { - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + SolarMutexGuard guard; xSbxObj.Clear(); } @@ -4344,7 +4344,7 @@ void SAL_CALL ModuleInvocationProxy::setValue( const ::rtl::OUString& rProperty, if( !m_bProxyIsClassModuleObject ) throw UnknownPropertyException(); - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + SolarMutexGuard guard; ::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Set ") ); aPropertyFunctionName += m_aPrefix; @@ -4385,7 +4385,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue( const ::rtl::OUString& rProperty ) if( !m_bProxyIsClassModuleObject ) throw UnknownPropertyException(); - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + SolarMutexGuard guard; ::rtl::OUString aPropertyFunctionName( RTL_CONSTASCII_USTRINGPARAM( "Property Get ") ); aPropertyFunctionName += m_aPrefix; @@ -4423,7 +4423,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, Sequence< Any >& ) throw( CannotConvertException, InvocationTargetException ) { - NAMESPACE_VOS(OGuard) guard( Application::GetSolarMutex() ); + SolarMutexGuard guard; Any aRet; if( !m_xScopeObj.Is() ) diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index ba9a5ace1b..6d52adb010 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -630,7 +630,7 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig // Attention ! Checking Window->GetParent() isnt the right approach here. // Because sometimes VCL create "implicit border windows" as parents even we created // a simple XWindow using the toolkit only .-( - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + SolarMutexGuard aSolarLock; Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( (pWindow ) && diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx index a1fa0af0ec..2a9bbec451 100644 --- a/framework/source/inc/pattern/window.hxx +++ b/framework/source/inc/pattern/window.hxx @@ -71,20 +71,20 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind if (!xWindow.is()) return ::rtl::OUString(); - // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex()); - ByteString sWindowState; - Window* pWindow = VCLUnoHelper::GetWindow(xWindow); - // check for system window is neccessary to guarantee correct pointer cast! - if (pWindow!=NULL && pWindow->IsSystemWindow()) + // SOLAR SAFE -> ---------------------------- { - ULONG nMask = WINDOWSTATE_MASK_ALL; - nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); - sWindowState = ((SystemWindow*)pWindow)->GetWindowState(nMask); + SolarMutexGuard aSolarGuard; + + Window* pWindow = VCLUnoHelper::GetWindow(xWindow); + // check for system window is neccessary to guarantee correct pointer cast! + if (pWindow!=NULL && pWindow->IsSystemWindow()) + { + ULONG nMask = WINDOWSTATE_MASK_ALL; + nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); + sWindowState = ((SystemWindow*)pWindow)->GetWindowState(nMask); + } } - - aSolarGuard.clear(); // <- SOLAR SAFE ---------------------------- return B2U_ENC(sWindowState,RTL_TEXTENCODING_UTF8); @@ -101,8 +101,8 @@ static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWind return; // SOLAR SAFE -> ---------------------------- - ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex()); - + SolarMutexGuard aSolarGuard; + Window* pWindow = VCLUnoHelper::GetWindow(xWindow); // check for system window is neccessary to guarantee correct pointer cast! if ( @@ -114,11 +114,10 @@ static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWind (!((WorkWindow*)pWindow)->IsMinimized() ) ) ) - { + { ((SystemWindow*)pWindow)->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8)); } - - aSolarGuard.clear(); + // <- SOLAR SAFE ---------------------------- } @@ -134,7 +133,7 @@ static ::sal_Bool isTopWindow(const css::uno::Reference< css::awt::XWindow >& xW // Attention ! Checking Window->GetParent() isnt the right approach here. // Because sometimes VCL create "implicit border windows" as parents even we created // a simple XWindow using the toolkit only .-( - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( (pWindow ) && diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 5cdf7f8059..ac9052a6f0 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -293,7 +293,7 @@ static sal_Bool implts_isFrameOrWindowTop( const css::uno::Reference< css::frame if (xWindowCheck.is()) { // --> PB 2007-06-18 #i76867# top and system window is required. - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + SolarMutexGuard aGuard; css::uno::Reference< css::awt::XWindow > xWindow( xWindowCheck, UNO_QUERY ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); return ( pWindow && pWindow->IsSystemWindow() ); diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 4b1a1cf66f..e03ff7b3b7 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -110,7 +110,7 @@ css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& { // Internaly we use VCL ... every call into vcl based code must // be guarded by locking the global solar mutex. - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + SolarMutexGuard aSolarLock; css::uno::Any aRet; RecoveryUI::EJob eJob = impl_classifyJob(aURL); |