diff options
author | Pranav Kant <pranav913@gmail.com> | 2015-03-17 12:56:54 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-20 12:18:02 +0000 |
commit | 33de587e95dddfc8e3c89b84f90b3d1bca823dae (patch) | |
tree | c65ada218c27ae4f2e80b4e3476b67c8e4554ef8 /framework | |
parent | 9e2e9453cbca9399e1c670b354cfc3c23d70307f (diff) |
tdf#88230: cleanup solar mutex yielding
Use SolarMutexReleaser, instead.
Change-Id: I276459c42b688813ea168d6fc80466a07a5ecba4
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/complextoolbarcontroller.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/generictoolbarcontroller.cxx | 3 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 49026882bddb..871c7b2bba6a 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -198,7 +198,7 @@ throw ( RuntimeException, std::exception ) IMPL_STATIC_LINK_NOINSTANCE( ComplexToolbarController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) { - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; try { // Asynchronous execution as this can lead to our own destruction! @@ -210,14 +210,13 @@ IMPL_STATIC_LINK_NOINSTANCE( ComplexToolbarController, ExecuteHdl_Impl, ExecuteI { } - Application::AcquireSolarMutex( nRef ); delete pExecuteInfo; return 0; } IMPL_STATIC_LINK_NOINSTANCE( ComplexToolbarController, Notify_Impl, NotifyInfo*, pNotifyInfo ) { - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; try { // Asynchronous execution: As this can lead to our own destruction! @@ -233,7 +232,6 @@ IMPL_STATIC_LINK_NOINSTANCE( ComplexToolbarController, Notify_Impl, NotifyInfo*, { } - Application::AcquireSolarMutex( nRef ); delete pNotifyInfo; return 0; } diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index f72ae03d5e16..f59982a729cd 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -271,7 +271,7 @@ throw ( RuntimeException, std::exception ) IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo ) { - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; try { // Asynchronous execution as this can lead to our own destruction! @@ -283,7 +283,6 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteI { } - Application::AcquireSolarMutex( nRef ); delete pExecuteInfo; return 0; } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 8cfe80c5ce45..af103c3c6fd9 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1019,9 +1019,8 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) if ( xDispatch.is() ) { - const sal_uInt32 nRef = Application::ReleaseSolarMutex(); + SolarMutexReleaser aReleaser; xDispatch->dispatch( aTargetURL, aArgs ); - Application::AcquireSolarMutex( nRef ); } return 1; |