summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-13 04:35:41 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:29 -0500
commit0d1f3a8577c56d162de09478cc3c358beb8683a7 (patch)
tree19a7987d6c26b8a37bd7e58d79a63d7007b10e4e /extensions
parentd166c4a022a4219eb488f6c0dbd3a6defdc974f7 (diff)
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibload.cxx4
-rw-r--r--extensions/source/bibliography/framectr.cxx4
-rw-r--r--extensions/source/bibliography/toolbar.cxx8
-rw-r--r--extensions/source/oooimprovecore/core.cxx2
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx8
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx8
-rw-r--r--extensions/source/resource/resource.cxx12
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx32
8 files changed, 39 insertions, 39 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index c2f8f46491ca..db46e5d9f8d6 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -287,7 +287,7 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const rtl::OUS
{
//!
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
m_pBibMod = OpenBibModul();
String aURLStr( rURL );
@@ -310,7 +310,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const rtl:
const Sequence< PropertyValue >& /*rArgs*/,
const Reference< XLoadEventListener > & rListener)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
//!
if(!m_pBibMod)
m_pBibMod = OpenBibModul();
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 14ccb60b4a0c..74882f812493 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -186,7 +186,7 @@ void BibFrameCtrl_Impl::frameAction(const FrameActionEvent& aEvent) throw( uno::
void BibFrameCtrl_Impl::disposing( const lang::EventObject& /*Source*/ )
throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( pController )
pController->getFrame()->removeFrameActionListener( this );
}
@@ -441,7 +441,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
{
if ( !bDisposing )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
Window* pParent = VCLUnoHelper::GetWindow( xWindow );
WaitObject aWaitObject( pParent );
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index cc24bd56eca7..e019b7b50392 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -74,7 +74,7 @@ void BibToolBarListener::statusChanged(const ::com::sun::star::frame::FeatureSta
{
if(rEvt.FeatureURL.Complete == aCommand)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
pToolBar->EnableItem(nIndex,rEvt.IsEnabled);
::com::sun::star::uno::Any aState=rEvt.State;
@@ -109,7 +109,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS
{
if(rEvt.FeatureURL.Complete == GetCommand())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
pToolBar->EnableSourceList(rEvt.IsEnabled);
Any aState = rEvt.State;
@@ -149,7 +149,7 @@ void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt)
{
if(rEvt.FeatureURL.Complete == GetCommand())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
pToolBar->EnableSourceList(rEvt.IsEnabled);
uno::Any aState=rEvt.State;
@@ -187,7 +187,7 @@ void BibTBEditListener::statusChanged(const frame::FeatureStateEvent& rEvt)throw
{
if(rEvt.FeatureURL.Complete == GetCommand())
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
pToolBar->EnableQuery(rEvt.IsEnabled);
uno::Any aState=rEvt.State;
diff --git a/extensions/source/oooimprovecore/core.cxx b/extensions/source/oooimprovecore/core.cxx
index 2caac938de28..8310c5164128 100644
--- a/extensions/source/oooimprovecore/core.cxx
+++ b/extensions/source/oooimprovecore/core.cxx
@@ -133,7 +133,7 @@ namespace oooimprovecore
else
help_url = OUString::createFromAscii("http://www.openoffice.org");
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SfxAllItemSet aSet( SFX_APP()->GetPool() );
aSet.Put( SfxStringItem( SID_CURRENT_URL, help_url ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index ad44f2585b2c..6ba05e432185 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -244,7 +244,7 @@ namespace pcr
//--------------------------------------------------------------------
void SAL_CALL PropertyControlContext_Impl::dispose()
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( impl_isDisposed_nothrow() )
return;
@@ -255,7 +255,7 @@ namespace pcr
//--------------------------------------------------------------------
void PropertyControlContext_Impl::setNotificationMode( NotifcationMode _eMode )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
m_eMode = _eMode;
}
@@ -265,7 +265,7 @@ namespace pcr
::comphelper::AnyEventRef pEvent;
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
impl_checkAlive_throw();
pEvent = new ControlEvent( _rxControl, _eType );
@@ -315,7 +315,7 @@ namespace pcr
//--------------------------------------------------------------------
void PropertyControlContext_Impl::processEvent( const ::comphelper::AnyEvent& _rEvent )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( impl_isDisposed_nothrow() )
return;
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index f4791a316137..16fedd434cad 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -283,7 +283,7 @@ namespace pcr
//--------------------------------------------------------------------
void SAL_CALL OPropertyBrowserController::inspect( const Sequence< Reference< XInterface > >& _rObjects ) throw (com::sun::star::util::VetoException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
if ( m_bSuspendingPropertyHandlers || !suspendAll_nothrow() )
@@ -371,7 +371,7 @@ namespace pcr
//------------------------------------------------------------------------
void SAL_CALL OPropertyBrowserController::attachFrame( const Reference< XFrame >& _rxFrame ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
if (_rxFrame.is() && haveView())
@@ -536,7 +536,7 @@ namespace pcr
//------------------------------------------------------------------------
void SAL_CALL OPropertyBrowserController::dispose( ) throw(RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
// stop inspecting the current object
stopInspection( false );
@@ -1724,7 +1724,7 @@ namespace pcr
//------------------------------------------------------------------------
void SAL_CALL OPropertyBrowserController::setHelpSectionText( const ::rtl::OUString& _rHelpText ) throw (NoSupportException, RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
if ( !haveView() )
diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx
index 946f24ddec16..0da4c9d68779 100644
--- a/extensions/source/resource/resource.cxx
+++ b/extensions/source/resource/resource.cxx
@@ -157,7 +157,7 @@ Sequence< OUString > ResourceService::getSupportedServiceNames_Static(void) thro
// ResourceService
Reference< XTypeConverter > ResourceService::getTypeConverter() const
{
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if( xSMgr.is() )
{
Reference< XTypeConverter > xConv( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter" ))), UNO_QUERY );
@@ -169,7 +169,7 @@ Reference< XTypeConverter > ResourceService::getTypeConverter() const
// ResourceService
Reference< XInvocation > ResourceService::getDefaultInvocation() const
{
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
/* f�hrt zur Zeit noch zu einer rekursion
if( xSMgr.is() )
{
@@ -256,7 +256,7 @@ Any SAL_CALL ResourceService::invoke
Reference< XTypeConverter > xC = getTypeConverter();
bool bGetBranch = FunctionName.equalsAscii( "getString" ) || FunctionName.equalsAscii( "getStrings" );
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
for( sal_Int32 n = 0; n < nElements; n++ )
{
sal_Int32 nId = 0;
@@ -310,7 +310,7 @@ Any SAL_CALL ResourceService::invoke
if( Params.getLength() != 1 )
throw IllegalArgumentException();
Reference< XTypeConverter > xC = getTypeConverter();
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
sal_Int32 nId = 0;
if( !(Params.getConstArray()[0] >>= nId) )
@@ -384,7 +384,7 @@ void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any&
throw CannotConvertException();
}
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
OStringBuffer aBuf( aName.getLength()+8 );
aBuf.append( OUStringToOString( aName, osl_getThreadTextEncoding() ) );
ResMgr * pRM = ResMgr::CreateResMgr( aBuf.getStr() );
@@ -409,7 +409,7 @@ void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any&
Any SAL_CALL ResourceService::getValue(const OUString& PropertyName)
throw(UnknownPropertyException, RuntimeException)
{
- OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if( PropertyName.equalsAscii("FileName" ))
return makeAny( aFileName );
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 2ebaa0feac93..e14d490f5bb0 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -376,7 +376,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl )
if ( ! mbShowMenuIcon )
return;
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
MenuBar *pActiveMBar = pSysWin->GetMenuBar();
if ( ( pSysWin != mpIconSysWin ) || ( pActiveMBar != mpIconMBar ) )
@@ -428,7 +428,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl )
void SAL_CALL UpdateCheckUI::notifyEvent(const document::EventObject& rEvent)
throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if( rEvent.EventName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("OnPrepareViewClosing") ) == 0 )
{
@@ -455,7 +455,7 @@ void UpdateCheckUI::setPropertyValue(const rtl::OUString& rPropertyName,
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
rtl::OUString aString;
@@ -519,7 +519,7 @@ void UpdateCheckUI::setPropertyValue(const rtl::OUString& rPropertyName,
uno::Any UpdateCheckUI::getPropertyValue(const rtl::OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Any aRet;
@@ -612,7 +612,7 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow()
//------------------------------------------------------------------------------
void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
maWaitTimer.Stop();
maTimeoutTimer.Stop();
@@ -645,7 +645,7 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon )
// -----------------------------------------------------------------------
IMPL_LINK( UpdateCheckUI, ClickHdl, USHORT*, EMPTYARG )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
maWaitTimer.Stop();
if ( mpBubbleWin )
@@ -679,7 +679,7 @@ IMPL_LINK( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg*, pDat
// -----------------------------------------------------------------------
IMPL_LINK( UpdateCheckUI, WaitTimeOutHdl, Timer*, EMPTYARG )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpBubbleWin = GetBubbleWindow();
@@ -702,7 +702,7 @@ IMPL_LINK( UpdateCheckUI, TimeOutHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
IMPL_LINK( UpdateCheckUI, UserEventHdl, UpdateCheckUI*, EMPTYARG )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Window *pTopWin = Application::GetFirstTopLevelWindow();
Window *pActiveWin = Application::GetActiveTopWindow();
@@ -739,7 +739,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
if ( VCLEVENT_OBJECT_DYING == nEventID )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( mpIconSysWin == pEvent->GetWindow() )
{
mpIconSysWin->RemoveEventListener( maWindowEventHdl );
@@ -748,7 +748,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
}
else if ( VCLEVENT_WINDOW_MENUBARADDED == nEventID )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Window *pWindow = pEvent->GetWindow();
if ( pWindow )
{
@@ -761,7 +761,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
}
else if ( VCLEVENT_WINDOW_MENUBARREMOVED == nEventID )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
MenuBar *pMBar = (MenuBar*) pEvent->GetData();
if ( pMBar && ( pMBar == mpIconMBar ) )
RemoveBubbleWindow( true );
@@ -769,7 +769,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent )
else if ( ( nEventID == VCLEVENT_WINDOW_MOVE ) ||
( nEventID == VCLEVENT_WINDOW_RESIZE ) )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( ( mpIconSysWin == pEvent->GetWindow() ) &&
( mpBubbleWin != NULL ) && ( mpIconMBar != NULL ) )
{
@@ -792,7 +792,7 @@ IMPL_LINK( UpdateCheckUI, ApplicationEventHdl, VclSimpleEvent *, pEvent)
case VCLEVENT_WINDOW_SHOW:
case VCLEVENT_WINDOW_ACTIVATE:
case VCLEVENT_WINDOW_GETFOCUS: {
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Window *pWindow = static_cast< VclWindowEvent * >(pEvent)->GetWindow();
if ( pWindow && pWindow->IsTopWindow() )
@@ -845,7 +845,7 @@ BubbleWindow::~BubbleWindow()
//------------------------------------------------------------------------------
void BubbleWindow::Resize()
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
FloatingWindow::Resize();
@@ -888,7 +888,7 @@ void BubbleWindow::SetTitleAndText( const XubString& rTitle,
//------------------------------------------------------------------------------
void BubbleWindow::Paint( const Rectangle& )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
LineInfo aThickLine( LINE_SOLID, 2 );
@@ -934,7 +934,7 @@ void BubbleWindow::MouseButtonDown( const MouseEvent& )
//------------------------------------------------------------------------------
void BubbleWindow::Show( BOOL bVisible, USHORT nFlags )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( !bVisible )
{