summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-14 22:09:00 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:33 -0500
commit19c2b8c10b9c2a7e231ac39c4b9d7985acaf539f (patch)
treeee5ef218fc0eda7c11845939c9bb6f9e981d1059
parent0e31314d93662fe0f6173a4010f140cfcc34b25f (diff)
convert OClearableGuard(SolarMutex) to SolarMutex(Clearable)Guard.
Most OClearableGuard of the Solar Mutex could be converted to a simple SolarMutexGuard. a couple of site were converted to a SolarMutexClearableGuard, were converting to a SolarMutexGuard would have made the code more convoluted.
-rw-r--r--framework/source/dispatch/windowcommanddispatch.cxx14
-rw-r--r--framework/source/helper/persistentwindowstate.cxx28
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx2
-rw-r--r--framework/source/helper/tagwindowasmodified.cxx18
-rw-r--r--framework/source/helper/titlebarupdate.cxx18
-rw-r--r--framework/source/helper/vclstatusindicator.cxx114
-rw-r--r--framework/source/loadenv/loadenv.cxx14
-rw-r--r--framework/source/services/frame.cxx21
-rw-r--r--framework/source/services/taskcreatorsrv.cxx3
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--svx/source/form/fmscriptingenv.cxx2
-rw-r--r--svx/source/form/fmundo.cxx8
13 files changed, 119 insertions, 129 deletions
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx
index 5f824f2f6e..42d546f5c9 100644
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -106,15 +106,15 @@ void WindowCommandDispatch::impl_startListening()
return;
// SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
-
- Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
- if ( ! pWindow)
- return;
+ {
+ SolarMutexGuard aSolarLock;
- pWindow->AddEventListener( LINK(this, WindowCommandDispatch, impl_notifyCommand) );
+ Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
+ if ( ! pWindow)
+ return;
- aSolarLock.clear();
+ pWindow->AddEventListener( LINK(this, WindowCommandDispatch, impl_notifyCommand) );
+ }
// <- SYNCHRONIZED
}
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 93cf1c7274..f787150ba8 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -281,12 +281,12 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere
::rtl::OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::Reference< css::awt::XWindow >& xWindow)
{
::rtl::OUString sWindowState;
-
+
if (xWindow.is())
{
// SOLAR SAFE -> ------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
-
+ SolarMutexGuard aSolarGuard;
+
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
// check for system window is neccessary to guarantee correct pointer cast!
if (
@@ -300,14 +300,12 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere
((SystemWindow*)pWindow)->GetWindowState(nMask),
RTL_TEXTENCODING_UTF8);
}
-
- aSolarLock.clear();
// <- SOLAR SAFE ------------------------
}
-
+
return sWindowState;
}
-
+
//*********************************************************************************************************
void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Reference< css::awt::XWindow >& xWindow ,
@@ -320,29 +318,27 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
return;
// SOLAR SAFE -> ------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
-
+ SolarMutexGuard aSolarGuard;
+
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
if (!pWindow)
return;
-
+
// check for system and work window - its neccessary to guarantee correct pointer cast!
- sal_Bool bSystemWindow = pWindow->IsSystemWindow();
- sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ sal_Bool bSystemWindow = pWindow->IsSystemWindow();
+ sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
SystemWindow* pSystemWindow = (SystemWindow*)pWindow;
WorkWindow* pWorkWindow = (WorkWindow* )pWindow;
-
+
// dont save this special state!
if (pWorkWindow->IsMinimized())
return;
-
+
pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
-
- aSolarLock.clear();
// <- SOLAR SAFE ------------------------
}
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 7de14a39ef..d0be245c9a 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -428,7 +428,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
// is visible too.
impl_showProgress();
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Window* pWindow = VCLUnoHelper::GetWindow(xParentWindow);
if ( pWindow )
{
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 068a18bd89..67444537af 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -134,21 +134,21 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
(aEvent.Source != xModel)
)
return;
-
+
aReadLock.unlock();
// <- SAFE ----------------------------------
-
+
::sal_Bool bModified = xModel->isModified ();
-
+
// SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
-
+ SolarMutexGuard aSolarGuard;
+
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
if ( ! pWindow)
return;
-
- sal_Bool bSystemWindow = pWindow->IsSystemWindow();
- sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+
+ sal_Bool bSystemWindow = pWindow->IsSystemWindow();
+ sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
@@ -156,8 +156,6 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
pWindow->SetExtendedStyle(WB_EXT_DOCMODIFIED);
else
pWindow->SetExtendedStyle( ! WB_EXT_DOCMODIFIED);
-
- aSolarGuard.clear();
// <- SYNCHRONIZED
}
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 4f72a3ca36..db477e2c4a 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -308,10 +308,10 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
// e) set icon on container window now
// Don't forget SolarMutex! We use vcl directly :-(
// Check window pointer for right WorkWindow class too!!!
-
+
// VCL SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarLock( Application::GetSolarMutex() );
-
+ SolarMutexGuard aSolarGuard;
+
Window* pWindow = (VCLUnoHelper::GetWindow( xWindow ));
if (
( pWindow ) &&
@@ -320,15 +320,13 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
{
WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
pWorkWindow->SetIcon( (sal_uInt16)nIcon );
-
+
css::uno::Reference< css::frame::XModel > xModel = xController->getModel();
rtl::OUString aURL;
if( xModel.is() )
aURL = xModel->getURL();
pWorkWindow->SetRepresentedURL( aURL );
}
-
- aSolarLock.clear();
// <- VCL SYNCHRONIZED
}
@@ -339,7 +337,7 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
css::uno::Reference< css::awt::XWindow > xWindow = xFrame->getContainerWindow ();
if ( ! xWindow.is() )
return;
-
+
css::uno::Reference< css::frame::XTitle > xTitle(xFrame, css::uno::UNO_QUERY);
if ( ! xTitle.is() )
return;
@@ -347,8 +345,8 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
const ::rtl::OUString sTitle = xTitle->getTitle ();
// VCL SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarLock( Application::GetSolarMutex() );
-
+ SolarMutexGuard aSolarGuard;
+
Window* pWindow = (VCLUnoHelper::GetWindow( xWindow ));
if (
( pWindow ) &&
@@ -358,8 +356,6 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
pWorkWindow->SetText( sTitle );
}
-
- aSolarLock.clear();
// <- VCL SYNCHRONIZED
}
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index c23d2529fb..1578b3d454 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,17 +65,17 @@ VCLStatusIndicator::VCLStatusIndicator(const css::uno::Reference< css::lang::XMu
, m_xSMGR (xSMGR )
, m_xParentWindow (xParentWindow )
, m_pStatusBar (0 )
- , m_nRange (0 )
- , m_nValue (0 )
+ , m_nRange (0 )
+ , m_nValue (0 )
{
if (!m_xParentWindow.is())
throw css::uno::RuntimeException(
::rtl::OUString::createFromAscii("Cant work without a parent window!"),
static_cast< css::task::XStatusIndicator* >(this));
}
-
+
//-----------------------------------------------
-VCLStatusIndicator::~VCLStatusIndicator()
+VCLStatusIndicator::~VCLStatusIndicator()
{
}
@@ -89,28 +89,28 @@ void SAL_CALL VCLStatusIndicator::start(const ::rtl::OUString& sText ,
css::uno::Reference< css::awt::XWindow > xParentWindow = m_xParentWindow;
aReadLock.unlock();
// <- SAFE ----------------------------------
-
+
// SOLAR SAFE -> ----------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
-
- Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
- if (!m_pStatusBar)
- m_pStatusBar = new StatusBar(pParentWindow, WB_3DLOOK|WB_BORDER);
-
- VCLStatusIndicator::impl_recalcLayout(m_pStatusBar, pParentWindow);
-
- m_pStatusBar->Show();
- m_pStatusBar->StartProgressMode(sText);
- m_pStatusBar->SetProgressValue(0);
-
- // force repaint!
- pParentWindow->Show();
- pParentWindow->Invalidate(INVALIDATE_CHILDREN);
- pParentWindow->Flush();
-
- aSolarLock.clear();
+ {
+ SolarMutexGuard aSolarGuard;
+
+ Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
+ if (!m_pStatusBar)
+ m_pStatusBar = new StatusBar(pParentWindow, WB_3DLOOK|WB_BORDER);
+
+ VCLStatusIndicator::impl_recalcLayout(m_pStatusBar, pParentWindow);
+
+ m_pStatusBar->Show();
+ m_pStatusBar->StartProgressMode(sText);
+ m_pStatusBar->SetProgressValue(0);
+
+ // force repaint!
+ pParentWindow->Show();
+ pParentWindow->Invalidate(INVALIDATE_CHILDREN);
+ pParentWindow->Flush();
+ }
// <- SOLAR SAFE ----------------------------
-
+
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
m_sText = sText;
@@ -119,22 +119,21 @@ void SAL_CALL VCLStatusIndicator::start(const ::rtl::OUString& sText ,
aWriteLock.unlock();
// <- SAFE ----------------------------------
}
-
+
//-----------------------------------------------
void SAL_CALL VCLStatusIndicator::reset()
throw(css::uno::RuntimeException)
{
// SOLAR SAFE -> ----------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
if (m_pStatusBar)
{
m_pStatusBar->SetProgressValue(0);
m_pStatusBar->SetText(String());
}
- aSolarLock.clear();
// <- SOLAR SAFE ----------------------------
}
-
+
//-----------------------------------------------
void SAL_CALL VCLStatusIndicator::end()
throw(css::uno::RuntimeException)
@@ -146,21 +145,22 @@ void SAL_CALL VCLStatusIndicator::end()
m_nValue = 0;
aWriteLock.unlock();
// <- SAFE ----------------------------------
-
+
// SOLAR SAFE -> ----------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
- if (m_pStatusBar)
{
- m_pStatusBar->EndProgressMode();
- m_pStatusBar->Show(sal_False);
-
- delete m_pStatusBar;
- m_pStatusBar = 0;
+ SolarMutexGuard aSolarGuard;
+ if (m_pStatusBar)
+ {
+ m_pStatusBar->EndProgressMode();
+ m_pStatusBar->Show(sal_False);
+
+ delete m_pStatusBar;
+ m_pStatusBar = 0;
+ }
}
- aSolarLock.clear();
// <- SOLAR SAFE ----------------------------
}
-
+
//-----------------------------------------------
void SAL_CALL VCLStatusIndicator::setText(const ::rtl::OUString& sText)
throw(css::uno::RuntimeException)
@@ -170,30 +170,31 @@ void SAL_CALL VCLStatusIndicator::setText(const ::rtl::OUString& sText)
m_sText = sText;
aWriteLock.unlock();
// <- SAFE ----------------------------------
-
+
// SOLAR SAFE -> ----------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
- if (m_pStatusBar)
- m_pStatusBar->SetText(sText);
- aSolarLock.clear();
+ {
+ SolarMutexGuard aSolarGuard;
+ if (m_pStatusBar)
+ m_pStatusBar->SetText(sText);
+ }
// <- SOLAR SAFE ----------------------------
}
-
+
//-----------------------------------------------
void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue)
throw(css::uno::RuntimeException)
{
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
-
+
if (nValue <= m_nRange)
m_nValue = nValue;
else
m_nValue = m_nRange;
-
+
sal_Int32 nRange = m_nRange;
nValue = m_nValue;
-
+
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -201,15 +202,16 @@ void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue)
USHORT nPercent = sal::static_int_cast< USHORT >(
::std::min(
((nValue*100) / ::std::max(nRange,(sal_Int32)1)), (sal_Int32)100));
-
+
// SOLAR SAFE -> ----------------------------
- ::vos::OClearableGuard aSolarLock(Application::GetSolarMutex());
- if (m_pStatusBar)
- m_pStatusBar->SetProgressValue(nPercent);
- aSolarLock.clear();
+ {
+ SolarMutexGuard aSolarGuard;
+ if (m_pStatusBar)
+ m_pStatusBar->SetProgressValue(nPercent);
+ }
// <- SOLAR SAFE ----------------------------
}
-
+
//-----------------------------------------------
void VCLStatusIndicator::impl_recalcLayout(Window* pStatusBar ,
Window* pParentWindow)
@@ -219,14 +221,14 @@ void VCLStatusIndicator::impl_recalcLayout(Window* pStatusBar ,
(!pParentWindow)
)
return;
-
+
Size aParentSize = pParentWindow->GetSizePixel();
pStatusBar->SetPosSizePixel(0,
0,
aParentSize.Width(),
aParentSize.Height());
}
-
+
} // namespace framework
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 95d436e0d5..a09936d8c9 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1639,7 +1639,7 @@ void LoadEnv::impl_reactForLoadingState()
if (bMinimized)
{
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
// check for system window is neccessary to guarantee correct pointer cast!
if (pWindow && pWindow->IsSystemWindow())
@@ -1750,7 +1750,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X
aReadLock.unlock();
// <- SAFE ----------------------------------
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
if ( pWindow )
{
@@ -1768,7 +1768,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X
else
pWindow->Show(sal_True, (bForceFrontAndFocus || bForceToFront) ? SHOW_FOREGROUNDTASK : 0 );
}
-
+
/* #i19976#
We tried to prevent a toFront() call in case the user putted the
loading document into the background ..
@@ -1818,7 +1818,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
return;
// SOLAR SAFE ->
- ::vos::OClearableGuard aSolarLock1(Application::GetSolarMutex());
+ SolarMutexClearableGuard aSolarGuard1;
Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
if (!pWindow)
@@ -1835,7 +1835,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
if (pWorkWindow->IsMinimized())
return;
- aSolarLock1.clear();
+ aSolarGuard1.clear();
// <- SOLAR SAFE
// SAFE ->
@@ -1877,7 +1877,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
if (sWindowState.getLength())
{
// SOLAR SAFE ->
- ::vos::OClearableGuard aSolarLock2(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
// We have to retrieve the window pointer again. Because nobody can guarantee
// that the XWindow was not disposed inbetween .-)
@@ -1890,8 +1890,6 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
SystemWindow* pSystemWindow = (SystemWindow*)pWindowCheck;
pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
-
- aSolarLock2.clear();
// <- SOLAR SAFE
}
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 87c2a98d07..03f1f367d0 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2304,7 +2304,7 @@ aEvent
// Deactivation is always done implicitely by activation of another frame.
// Only if no activation is done, deactivations have to be processed if the activated window
// is a parent window of the last active Window!
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexClearableGuard aSolarGuard;
// CheckMenuCloser_Impl();
Window* pFocusWindow = Application::GetFocusWindow();
if (
@@ -2910,17 +2910,18 @@ void Frame::implts_setIconOnWindow()
// Don't forget SolarMutex! We use vcl directly :-(
// Check window pointer for right WorkWindow class too!!!
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
- Window* pWindow = (VCLUnoHelper::GetWindow( xContainerWindow ));
- if(
- ( pWindow != NULL ) &&
- ( pWindow->GetType() == WINDOW_WORKWINDOW )
- )
{
- WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
- pWorkWindow->SetIcon( (sal_uInt16)nIcon );
+ SolarMutexGuard aSolarGuard;
+ Window* pWindow = (VCLUnoHelper::GetWindow( xContainerWindow ));
+ if(
+ ( pWindow != NULL ) &&
+ ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ )
+ {
+ WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
+ pWorkWindow->SetIcon( (sal_uInt16)nIcon );
+ }
}
- aSolarGuard.clear();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
}
}
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index cc1d485242..67ba0e590e 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -227,11 +227,10 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
void TaskCreatorService::implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const
{
// SYNCHRONIZED ->
- ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
Window* pVCLWindow = VCLUnoHelper::GetWindow(xWindow);
if (pVCLWindow)
pVCLWindow->SetExtendedStyle(WB_EXT_DOCUMENT);
- aSolarGuard.clear();
// <- SYNCHRONIZED
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 47fe44a0e6..0d1f60b0ed 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -471,7 +471,7 @@ void SfxDocTplService_Impl::init_Impl()
if ( bNeedsUpdate )
{
aGuard.clear();
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexClearableGuard aSolarGuard;
WaitWindow_Impl* pWin = new WaitWindow_Impl();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index a5d66f7f05..d37c8a0171 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1812,7 +1812,7 @@ ErrCode SfxObjectShell::CallStarBasicScript( const String& _rMacroName, const St
const void* _pArguments, void* _pReturn )
{
OSL_TRACE("in CallSBS");
- ::vos::OClearableGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// the arguments for the call
SbxArrayRef xMacroArguments = lcl_translateUno2Basic( _pArguments );
@@ -1848,7 +1848,7 @@ ErrCode SfxObjectShell::CallScript(
void *pRet
)
{
- ::vos::OClearableGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
ErrCode nErr = ERRCODE_NONE;
if( rScriptType.EqualsAscii( "StarBasic" ) )
{
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index ebf7632058..6bc003b72e 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -492,7 +492,7 @@ namespace svxform
//--------------------------------------------------------------------
void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSyncronousResult )
{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexClearableGuard aSolarGuard;
::osl::ClearableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index c760ec8008..a4359aa917 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -754,7 +754,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
// TODO: this is a potential race condition: two threads here could in theory
// add their undo actions out-of-order
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
rModel.AddUndo(new FmUndoPropertyAction(rModel, evt));
}
}
@@ -776,7 +776,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
void SAL_CALL FmXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementInserted" );
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
// neues Object zum lauschen
@@ -802,7 +802,7 @@ void FmXUndoEnvironment::implSetModified()
void SAL_CALL FmXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementReplaced" );
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
Reference< XInterface > xIface;
@@ -820,7 +820,7 @@ void SAL_CALL FmXUndoEnvironment::elementReplaced(const ContainerEvent& evt) thr
void SAL_CALL FmXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementRemoved" );
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
Reference< XInterface > xIface( evt.Element, UNO_QUERY );