diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-13 02:47:36 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:33 -0500 |
commit | f4f4a8ed4f56035cc9f536d00f62a552af974cf0 (patch) | |
tree | e247bfb2431e1413704de1286952e8e5d6eb1bfd /svx | |
parent | 3a81649a55a49705d907a6ee72c92e26d2d4f2ee (diff) |
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'svx')
50 files changed, 380 insertions, 380 deletions
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index d6481437b7ee..d1a63b5dfd27 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -121,7 +121,7 @@ Reference< XAccessibleContext > AccFrameSelector::getAccessibleContext( ) sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return (meBorder == FRAMEBORDER_NONE) ? mpFrameSel->GetEnabledBorderCount() : 0; } @@ -131,7 +131,7 @@ sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException) Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Reference< XAccessible > xRet; if( meBorder == FRAMEBORDER_NONE ) @@ -146,7 +146,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i ) Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Reference< XAccessible > xRet; if(meBorder == FRAMEBORDER_NONE) @@ -161,7 +161,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) sal_Int32 AccFrameSelector::getAccessibleIndexInParent( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); sal_Int32 nIdx = 0; @@ -193,7 +193,7 @@ sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException) OUString AccFrameSelector::getAccessibleDescription( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return maDescriptions.GetString(meBorder); } @@ -203,7 +203,7 @@ OUString AccFrameSelector::getAccessibleDescription( ) OUString AccFrameSelector::getAccessibleName( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return maNames.GetString(meBorder); } @@ -213,7 +213,7 @@ OUString AccFrameSelector::getAccessibleName( ) Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); utl::AccessibleRelationSetHelper* pHelper; Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; @@ -238,7 +238,7 @@ Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; Reference< XAccessibleStateSet > xRet = pStateSetHelper; @@ -311,7 +311,7 @@ void AccFrameSelector::removePropertyChangeListener( const Reference< XPropertyC sal_Bool AccFrameSelector::containsPoint( const AwtPoint& aPt ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); //aPt is relative to the frame selector return mpFrameSel->ContainsClickPoint( Point( aPt.X, aPt.Y ) ); @@ -323,7 +323,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint( const AwtPoint& aPt ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); //aPt is relative to the frame selector return mpFrameSel->GetChildAccessible( Point( aPt.X, aPt.Y ) ); @@ -331,7 +331,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint( AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Size aSz; Point aPos; @@ -358,7 +358,7 @@ AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException) AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Point aPos; switch(meBorder) @@ -378,7 +378,7 @@ AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException) AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Point aPos; switch(meBorder) @@ -399,7 +399,7 @@ AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException) AwtSize AccFrameSelector::getSize( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Size aSz; switch(meBorder) @@ -419,7 +419,7 @@ AwtSize AccFrameSelector::getSize( ) throw (RuntimeException) sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -428,7 +428,7 @@ sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException) sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -437,7 +437,7 @@ sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException) sal_Bool AccFrameSelector::isFocusTraversable( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -460,7 +460,7 @@ void AccFrameSelector::removeFocusListener( const Reference< XFocusListener >& x void AccFrameSelector::grabFocus( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); mpFrameSel->GrabFocus(); } @@ -470,7 +470,7 @@ void AccFrameSelector::grabFocus( ) throw (RuntimeException) Any AccFrameSelector::getAccessibleKeyBinding( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); utl::AccessibleRelationSetHelper* pHelper; Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; @@ -508,7 +508,7 @@ sal_Int32 AccFrameSelector::getForeground( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return mpFrameSel->GetControlForeground().GetColor(); } @@ -519,7 +519,7 @@ sal_Int32 AccFrameSelector::getBackground( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return mpFrameSel->GetControlBackground().GetColor(); } @@ -528,7 +528,7 @@ sal_Int32 AccFrameSelector::getBackground( ) void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( xListener.is() ) { @@ -544,7 +544,7 @@ void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListen void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( xListener.is() && mnClientId != 0 && ::comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ) == 0 ) @@ -605,7 +605,7 @@ void AccFrameSelector::IsValid() throw (RuntimeException) void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; AwtFocusEvent aEvent; aEvent.FocusFlags = 0; if(bGetFocus) diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 5c2211eb36ae..d3712e0a397a 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -481,7 +481,7 @@ uno::Reference<XAccessible > SAL_CALL awt::Rectangle SAL_CALL AccessibleShape::getBounds (void) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed (); @@ -878,7 +878,7 @@ void SAL_CALL AccessibleShape::disposing (const lang::EventObject& aEvent) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); try @@ -1143,7 +1143,7 @@ uno::Reference< drawing::XShape > AccessibleShape::GetXShape() // protected void AccessibleShape::disposing (void) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); // Make sure to send an event that this object looses the focus in the diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 2211f20ac708..d416bffc767c 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -294,7 +294,7 @@ namespace accessibility { DBG_DTOR( AccessibleTextHelper_Impl, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1743,7 +1743,7 @@ namespace accessibility AccessibleTextHelper::AccessibleTextHelper( ::std::auto_ptr< SvxEditSource > pEditSource ) : mpImpl( new AccessibleTextHelper_Impl() ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SetEditSource( pEditSource ); } @@ -1964,7 +1964,7 @@ namespace accessibility // As Dispose calls ShutdownEditSource, which in turn // deregisters as listener on the edit source, have to lock // here - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -1979,7 +1979,7 @@ namespace accessibility sal_Bool AccessibleTextHelper::IsSelected() const { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -1997,7 +1997,7 @@ namespace accessibility // XAccessibleContext sal_Int32 AccessibleTextHelper::GetChildCount() SAL_THROW((uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -2014,7 +2014,7 @@ namespace accessibility uno::Reference< XAccessible > AccessibleTextHelper::GetChild( sal_Int32 i ) SAL_THROW((lang::IndexOutOfBoundsException, uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -2058,7 +2058,7 @@ namespace accessibility // XAccessibleComponent uno::Reference< XAccessible > AccessibleTextHelper::GetAt( const awt::Point& aPoint ) SAL_THROW((uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); diff --git a/svx/source/accessibility/DGColorNameLookUp.cxx b/svx/source/accessibility/DGColorNameLookUp.cxx index 25fdaf8b9bed..d8d7f7fdbb2f 100644 --- a/svx/source/accessibility/DGColorNameLookUp.cxx +++ b/svx/source/accessibility/DGColorNameLookUp.cxx @@ -52,7 +52,7 @@ DGColorNameLookUp& DGColorNameLookUp::Instance (void) // the shape type handler is instantiated. if (mpInstance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; if (mpInstance == NULL) { // Create the single instance of the color name look up. @@ -108,7 +108,7 @@ DGColorNameLookUp::DGColorNameLookUp (void) { // Look the solar mutex here as workarround for missing lock in // called function. - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; aNames = xNA->getElementNames(); } } diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index b6b4698d932c..795b2913377c 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -92,7 +92,7 @@ void DescriptionGenerator::Initialize (sal_Int32 nResourceId) // Get the string from the resource for the specified id. OUString sPrefix; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sPrefix = OUString (SVX_RESSTR (nResourceId)); } @@ -109,7 +109,7 @@ void DescriptionGenerator::Initialize (::rtl::OUString sPrefix) if (mxSet.is()) { { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; msDescription.append (sal_Unicode (' ')); msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); @@ -160,7 +160,7 @@ void DescriptionGenerator::AddProperty ( { OUString sLocalizedName; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sLocalizedName = SVX_RESSTR (nLocalizedNameId); } AddProperty (sPropertyName, aType, sLocalizedName, nWhichId); @@ -182,7 +182,7 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, msDescription.append (sal_Unicode (',')); else { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; msDescription.append (sal_Unicode (' ')); msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); @@ -355,7 +355,7 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, if (nWhichId >= 0) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; String sLocalizedValue; SvxUnogetInternalNameForItem (sal::static_int_cast<sal_Int16>(nWhichId), sValue, sLocalizedValue); @@ -392,7 +392,7 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, // Get the fill style name from the resource. OUString sFillStyleName; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; switch (aFillStyle) { case drawing::FillStyle_NONE: diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 0bac64c67ae2..002a66610bb8 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -116,7 +116,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( } else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; msName = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); } @@ -126,7 +126,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( } else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; msDescription = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); } @@ -286,7 +286,7 @@ awt::Size SAL_CALL SvxGraphCtrlAccessibleContext::getSize() throw( RuntimeExcept sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChildCount( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpPage ) throw DisposedException(); @@ -300,7 +300,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChildCount( void SdrObject* SvxGraphCtrlAccessibleContext::getSdrObject( sal_Int32 nIndex ) throw( RuntimeException, lang::IndexOutOfBoundsException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpPage ) throw DisposedException(); @@ -340,7 +340,7 @@ void SvxGraphCtrlAccessibleContext::FireEvent (const AccessibleEventObject& aEve Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChild( sal_Int32 nIndex ) throw( RuntimeException, lang::IndexOutOfBoundsException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getAccessible( getSdrObject( nIndex ) ); } @@ -356,7 +356,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessiblePa sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleIndexInParent( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Use a simple but slow solution for now. Optimize later. // Iterate over all the parent's children and search for this object. @@ -395,7 +395,7 @@ sal_Int16 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleRole( void ) thro OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleDescription( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return msDescription; } @@ -403,7 +403,7 @@ OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleDescription( void OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleName( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return msName; } @@ -421,7 +421,7 @@ Reference< XAccessibleRelationSet > SAL_CALL SvxGraphCtrlAccessibleContext::getA Reference< XAccessibleStateSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; @@ -448,7 +448,7 @@ Reference< XAccessibleStateSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAcce lang::Locale SAL_CALL SvxGraphCtrlAccessibleContext::getLocale( void ) throw( IllegalAccessibleComponentStateException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mxParent.is() ) { @@ -468,7 +468,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::addEventListener( const Reference< { if (xListener.is()) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (!mnClientId) mnClientId = comphelper::AccessibleEventNotifier::registerClient( ); comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener ); @@ -482,7 +482,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeEventListener( const Referenc { if (xListener.is()) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ); if ( !nListenerCount ) @@ -502,7 +502,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeEventListener( const Referenc void SAL_CALL SvxGraphCtrlAccessibleContext::addFocusListener( const Reference< awt::XFocusListener >& xListener ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( xListener.is() ) { @@ -517,7 +517,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::addFocusListener( const Reference< void SAL_CALL SvxGraphCtrlAccessibleContext::removeFocusListener( const Reference< awt::XFocusListener >& xListener ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( xListener.is() ) { @@ -531,7 +531,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeFocusListener( const Referenc void SAL_CALL SvxGraphCtrlAccessibleContext::grabFocus() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpControl ) throw DisposedException(); @@ -581,7 +581,7 @@ OUString SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationName( void ) t sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString& sServiceName ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Iterate over all supported service names and return true if on of them // matches the given name. Sequence< OUString > aSupportedServices( getSupportedServiceNames() ); @@ -613,7 +613,7 @@ Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedService Sequence<sal_Int8> SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getUniqueId(); } @@ -628,7 +628,7 @@ OUString SvxGraphCtrlAccessibleContext::getServiceName( void ) throw( RuntimeExc void SAL_CALL SvxGraphCtrlAccessibleContext::selectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -643,7 +643,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::selectAccessibleChild( sal_Int32 nI sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::isAccessibleChildSelected( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -655,7 +655,7 @@ sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::isAccessibleChildSelected( sal_ void SAL_CALL SvxGraphCtrlAccessibleContext::clearAccessibleSelection() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -667,7 +667,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::clearAccessibleSelection() throw( R void SAL_CALL SvxGraphCtrlAccessibleContext::selectAllAccessibleChildren() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -679,7 +679,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::selectAllAccessibleChildren() throw sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChildCount() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -693,7 +693,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChildCoun Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; checkChildIndexOnSelection( nIndex ); @@ -711,7 +711,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAcce void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; checkChildIndexOnSelection( nIndex ); @@ -758,7 +758,7 @@ void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( long nIndex ) th void SvxGraphCtrlAccessibleContext::setName( const OUString& rName ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; msName = rName; } @@ -767,7 +767,7 @@ void SvxGraphCtrlAccessibleContext::setName( const OUString& rName ) void SvxGraphCtrlAccessibleContext::setDescription( const OUString& rDescr ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; msDescription = rDescr; } @@ -782,7 +782,7 @@ void SvxGraphCtrlAccessibleContext::setModelAndView ( SdrModel* pModel, SdrView* pView) { - OGuard aGuard (Application::GetSolarMutex()); + SolarMutexGuard aGuard; mpModel = pModel; if (mpModel != NULL) @@ -809,7 +809,7 @@ void SvxGraphCtrlAccessibleContext::setModelAndView ( void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mbDisposed ) return; @@ -848,7 +848,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpControl ) throw DisposedException(); @@ -867,7 +867,7 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( R */ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Rectangle aBounds ( 0, 0, 0, 0 ); @@ -896,7 +896,7 @@ Sequence< sal_Int8 > SvxGraphCtrlAccessibleContext::getUniqueId( void ) static OImplementationId* pId = 0; if( !pId ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !pId) { static OImplementationId aId; diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index 4a7ec1c96ca2..53a23159f8b5 100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -68,7 +68,7 @@ ShapeTypeHandler& ShapeTypeHandler::Instance (void) // the shape type handler is instantiated. if (instance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; if (instance == NULL) { // Create the single instance of the shape type handler. @@ -181,7 +181,7 @@ ShapeTypeHandler::~ShapeTypeHandler (void) bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, ShapeTypeDescriptor aDescriptorList[]) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; // Determine first id of new type descriptor(s). int nFirstId = maShapeTypeDescriptorList.size(); @@ -329,7 +329,7 @@ long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape if (nResourceId != -1) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sName = OUString (SVX_RESSTR((unsigned short)nResourceId)); } diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index b2f82d8c1eab..84d4c838e049 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -167,7 +167,7 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( msName = *pName; else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; msName = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_NAME : RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); } @@ -175,7 +175,7 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( msDescription = *pDesc; else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; msDescription = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_DESCR : RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); } @@ -292,7 +292,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil Reference< XAccessible > xChild = mpChilds[ nIndex ]; if( !xChild.is() ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -486,7 +486,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::removeFocusListener( const Reference< void SAL_CALL SvxRectCtlAccessibleContext::grabFocus() throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -503,7 +503,7 @@ Any SAL_CALL SvxRectCtlAccessibleContext::getAccessibleKeyBinding() throw( Runti sal_Int32 SvxRectCtlAccessibleContext::getForeground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -512,7 +512,7 @@ sal_Int32 SvxRectCtlAccessibleContext::getForeground( ) sal_Int32 SvxRectCtlAccessibleContext::getBackground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -561,7 +561,7 @@ Sequence< sal_Int8 > SAL_CALL SvxRectCtlAccessibleContext::getImplementationId( void SAL_CALL SvxRectCtlAccessibleContext::selectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -756,7 +756,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::disposing() Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -766,7 +766,7 @@ Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( Run Rectangle SvxRectCtlAccessibleContext::GetBoundingBox( void ) throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -922,7 +922,7 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleKeyBinding() throw( sal_Int32 SvxRectCtlChildAccessibleContext::getForeground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( maMutex ); ThrowExceptionIfNotAlive(); return mrParentWindow.GetControlForeground().GetColor(); @@ -930,7 +930,7 @@ sal_Int32 SvxRectCtlChildAccessibleContext::getForeground( ) sal_Int32 SvxRectCtlChildAccessibleContext::getBackground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( maMutex ); ThrowExceptionIfNotAlive(); diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx index d47b102f6ace..3cec635b2596 100644 --- a/svx/source/customshapes/tbxcustomshapes.cxx +++ b/svx/source/customshapes/tbxcustomshapes.cxx @@ -174,7 +174,7 @@ void SAL_CALL SvxTbxCtlCustomShapes::functionSelected( const ::rtl::OUString& rC m_aCommand = rCommand; // Our sub-toolbar wants to execute a function. // We have to change the image of our toolbar button to reflect the new function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_bDisposed ) { if ( m_aCommand.getLength() > 0 ) @@ -191,7 +191,7 @@ void SAL_CALL SvxTbxCtlCustomShapes::updateImage( ) throw (::com::sun::star::un { // We should update the button image of our parent (toolbar). // Use the stored command to set the correct current image. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 6d546458790f..70509e1ac7d9 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -99,7 +99,7 @@ void TabDialog4Recovery::addTabPage(IExtendedTabPage* pPage) //=============================================== short TabDialog4Recovery::Execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + SolarMutexGuard aLock; Show(); m_pActualPage = m_lTabPages.begin(); @@ -807,7 +807,7 @@ IMPL_LINK( SaveDialog, OKButtonHdl, void*, EMPTYARG ) //=============================================== short SaveDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + SolarMutexGuard aLock; // wait for user input "OK" m_nResult = DLG_RET_UNKNOWN; @@ -858,7 +858,7 @@ SaveProgressDialog::~SaveProgressDialog() //=============================================== short SaveProgressDialog::Execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + SolarMutexGuard aLock; m_pCore->setProgressHandler(m_xProgress); m_pCore->setUpdateListener(this); @@ -1121,7 +1121,7 @@ RecoveryDialog::~RecoveryDialog() //=============================================== short RecoveryDialog::execute() { - ::vos::OGuard aSolarLock(Application::GetSolarMutex()); + SolarMutexGuard aSolarLock; switch(m_eRecoveryState) { @@ -1658,7 +1658,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() short ErrorRepWelcomeDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + SolarMutexGuard aLock; Show(); m_nResult = DLG_RET_UNKNOWN; while(m_nResult == DLG_RET_UNKNOWN) @@ -1768,7 +1768,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() short ErrorRepSendDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + SolarMutexGuard aLock; Show(); m_nResult = DLG_RET_UNKNOWN; while(m_nResult == DLG_RET_UNKNOWN) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 0874684cd4e6..f98907b95ed6 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -181,7 +181,7 @@ void GraphCtrl::SetWinStyle( WinBits nWinBits ) void GraphCtrl::InitSdrModel() { - ::vos::OGuard aGuard (Application::GetSolarMutex()); + SolarMutexGuard aGuard; SdrPage* pPage; diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 1e9c9e3a8098..c259f1178de9 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1100,7 +1100,7 @@ void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChange if (eStatus != xRow->GetStatus()) { xRow->SetStatus(eStatus); - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; RowModified(GetCurrentPos()); } } @@ -1839,7 +1839,7 @@ void FmGridControl::ShowColumn(sal_uInt16 nId) //------------------------------------------------------------------------------ sal_Bool FmGridControl::selectBookmarks(const Sequence< Any >& _rBookmarks) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // need to lock the SolarMutex so that no paint call disturbs us ... if ( !m_pSeekCursor ) diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index f8cfb4d4fce9..f1897a3040b3 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -446,7 +446,7 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const ::rtl::OUString& Service //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::dispose() throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >(this); @@ -467,7 +467,7 @@ void SAL_CALL FmXGridControl::dispose() throw( RuntimeException ) //------------------------------------------------------------------------------ sal_Bool SAL_CALL FmXGridControl::setModel(const Reference< ::com::sun::star::awt::XControlModel >& rModel) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (!UnoControl::setModel(rModel)) return sal_False; @@ -679,7 +679,7 @@ void FmXGridControl::addModifyListener(const Reference< ::com::sun::star::util:: //------------------------------------------------------------------------------ sal_Bool SAL_CALL FmXGridControl::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XSelectionSupplier > xPeer(getPeer(), UNO_QUERY); return xPeer->select(_rSelection); } @@ -687,7 +687,7 @@ sal_Bool SAL_CALL FmXGridControl::select( const Any& _rSelection ) throw (Illega //------------------------------------------------------------------------------ Any SAL_CALL FmXGridControl::getSelection( ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XSelectionSupplier > xPeer(getPeer(), UNO_QUERY); return xPeer->getSelection(); } @@ -754,7 +754,7 @@ void SAL_CALL FmXGridControl::removeModifyListener(const Reference< ::com::sun:: //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::draw( sal_Int32 x, sal_Int32 y ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; m_bInDraw = sal_True; UnoControl::draw(x, y); m_bInDraw = sal_False; @@ -767,7 +767,7 @@ void SAL_CALL FmXGridControl::setDesignMode(sal_Bool bOn) throw( RuntimeExceptio // --- <mutex_lock> --- { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XRowSetSupplier > xGrid(getPeer(), UNO_QUERY); @@ -943,7 +943,7 @@ void SAL_CALL FmXGridControl::setCurrentColumnPosition(sal_Int16 nPos) throw( Ru Reference< XGridControl > xGrid( getPeer(), UNO_QUERY ); if ( xGrid.is() ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; xGrid->setCurrentColumnPosition( nPos ); } } @@ -1469,7 +1469,7 @@ void FmXGridPeer::CellModified() //------------------------------------------------------------------------------ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // want to do a lot of VCL stuff here ... // this should not be (deadlock) critical, as by definition, every component should release // any own mutexes before notifying @@ -1728,7 +1728,7 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol) //------------------------------------------------------------------------------ void FmXGridPeer::setColumns(const Reference< XIndexContainer >& Columns) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = static_cast< FmGridControl* >( GetWindow() ); @@ -1811,7 +1811,7 @@ sal_Bool FmXGridPeer::isDesignMode() throw( RuntimeException ) //------------------------------------------------------------------------------ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); // Handle Column beruecksichtigen @@ -1845,7 +1845,7 @@ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeExcep //------------------------------------------------------------------------------ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -1901,7 +1901,7 @@ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeExcep //------------------------------------------------------------------------------ void FmXGridPeer::elementRemoved(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -1919,7 +1919,7 @@ void FmXGridPeer::elementRemoved(const ContainerEvent& evt) throw( RuntimeExcept //------------------------------------------------------------------------------ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& Value) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -2352,7 +2352,7 @@ void FmXGridPeer::setCurrentColumnPosition(sal_Int16 nPos) throw( RuntimeExcepti //------------------------------------------------------------------------------ void FmXGridPeer::selectionChanged(const EventObject& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); if (pGrid) @@ -2739,13 +2739,13 @@ void FmXGridPeer::resetted(const EventObject& rEvent) throw( RuntimeException ) FmGridControl* pGrid = (FmGridControl*)GetWindow(); if (!pGrid) return; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pGrid->resetCurrentRow(); } // if the cursor fired a reset event we seem to be on the insert row else if (m_xCursor == rEvent.Source) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); if (pGrid && pGrid->IsOpen()) pGrid->positioned(rEvent); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 4b3d409aa0ec..dde2938e955f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -674,7 +674,7 @@ void DbCellControl::implAdjustGenericFieldSetting( const Reference< XPropertySet //------------------------------------------------------------------------------ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XPropertySet > xSourceProps( _rEvent.Source, UNO_QUERY ); @@ -4043,7 +4043,7 @@ void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActi //------------------------------------------------------------------ void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pColumn ) { DbGridControl& rGrid( m_pColumn->GetParent() ); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 81b391fc5a12..30f492a85fd7 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2272,7 +2272,7 @@ void DbGridControl::forceROController(sal_Bool bForce) void DbGridControl::AdjustDataSource(sal_Bool bFull) { TRACE_RANGE("DbGridControl::AdjustDataSource"); - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // wird die aktuelle Zeile gerade neu bestimmt, // wird kein abgleich vorgenommen @@ -2804,7 +2804,7 @@ void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 /*nRow*/, const PopupMe void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) throw( RuntimeException ) { TRACE_RANGE("DbGridControl::DataSourcePropertyChanged"); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // prop "IsModified" changed ? // during update don't care about the modified state if (!IsUpdating() && evt.PropertyName.compareTo(FM_PROP_ISMODIFIED) == COMPARE_EQUAL) @@ -3791,7 +3791,7 @@ void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const PropertyChangeEvent return; } // here we got the solar mutex, transfer it to a guard for safety reasons - ::vos::OGuard aPaintSafety(Application::GetSolarMutex()); + SolarMutexGuard aPaintSafety; Application::GetSolarMutex().release(); // and finally do the update ... diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 124b76eb68da..fdc226ef618e 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -51,7 +51,7 @@ DBG_NAME(OSystemParseContext) OSystemParseContext::OSystemParseContext() : IParseContext() { DBG_CTOR(OSystemParseContext,NULL); - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::svx::StringListResource aKeywords( SVX_RES( RID_RSC_SQL_INTERNATIONAL ) ); aKeywords.get( m_aLocalizedKeywords ); @@ -73,7 +73,7 @@ OSystemParseContext::~OSystemParseContext() ::rtl::OUString OSystemParseContext::getErrorMessage(ErrorCode _eCode) const { String aMsg; - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; switch (_eCode) { case ERROR_GENERAL: aMsg = SVX_RES(RID_STR_SVT_SQL_SYNTAX_ERROR); break; diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 8b757d07218e..89914e8ff841 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -446,7 +446,7 @@ namespace //------------------------------------------------------------------------ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_pModel ) return; @@ -496,7 +496,7 @@ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) th //------------------------------------------------------------------------ void SAL_CALL FmFilterAdapter::disjunctiveTermRemoved( const FilterEvent& _Event ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XFormController > xController( _Event.Source, UNO_QUERY_THROW ); Reference< XFilterController > xFilterController( _Event.Source, UNO_QUERY_THROW ); @@ -531,7 +531,7 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermRemoved( const FilterEvent& _Event //------------------------------------------------------------------------ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XFormController > xController( _Event.Source, UNO_QUERY_THROW ); Reference< XFilterController > xFilterController( _Event.Source, UNO_QUERY_THROW ); diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 07c203486603..aab763dbd3b3 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -554,7 +554,7 @@ namespace svxform { // object shells are not thread safe, so guard the destruction - ::vos::OGuard aSolarGuarsReset( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuarsReset; xObjectShell = NULL; } } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 623dad9a481c..2b7064aa316a 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -343,7 +343,7 @@ namespace svx //-------------------------------------------------------------------- void SAL_CALL FmMouseListenerAdapter::mousePressed( const awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // is this a request for a context menu? if ( _rEvent.PopupTrigger ) { diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index c1022ad795aa..05aebc76ceee 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -295,7 +295,7 @@ Any SAL_CALL FmXPageViewWinRec::getByIndex(sal_Int32 nIndex) throw( IndexOutOfBo //------------------------------------------------------------------------ void SAL_CALL FmXPageViewWinRec::makeVisible( const Reference< XControl >& _Control ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; Reference< XWindow > xWindow( _Control, UNO_QUERY ); if ( xWindow.is() && m_pViewImpl->getView() && m_pWindow ) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 6d243b70af11..fa9590c76912 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3927,7 +3927,7 @@ void SAL_CALL FormController::removeParameterListener(const Reference< XDatabase //------------------------------------------------------------------------------ sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& aEvent) throw( RuntimeException ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); impl_checkDisposed_throw(); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index a3dbd2460695..a2d124dc58cd 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1431,7 +1431,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::disposing( const EventObject& Source ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // some code below - in particular our disposal - might trigger actions which require the // SolarMutex. In particular, in our disposal, we remove ourself as listener from the control, // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - @@ -1484,7 +1484,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::propertyChange( const PropertyChangeEvent& /*_rEvent*/ ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // (re)painting might require VCL operations, which need the SolarMutex OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::propertyChange: already disposed()" ); @@ -1536,7 +1536,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::elementRemoved( const ContainerEvent& Event ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // some code below - in particular our disposal - might trigger actions which require the // SolarMutex. In particular, in our disposal, we remove ourself as listener from the control, // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index 5619e7ad95d8..e67b2d8e151b 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -262,7 +262,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags, // ::com::sun::star::util::XModifyListener void SmartTagMgr::modified( const lang::EventObject& ) throw( RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; maRecognizerList.clear(); maActionList.clear(); @@ -274,7 +274,7 @@ void SmartTagMgr::modified( const lang::EventObject& ) throw( RuntimeException // ::com::sun::star::lang::XEventListener void SmartTagMgr::disposing( const lang::EventObject& rEvent ) throw( RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; uno::Reference< frame::XModel > xModel( rEvent.Source, uno::UNO_QUERY ); uno::Reference< util::XModifyBroadcaster > xMB(xModel, uno::UNO_QUERY); @@ -301,7 +301,7 @@ void SmartTagMgr::disposing( const lang::EventObject& rEvent ) throw( RuntimeExc // ::com::sun::star::util::XChangesListener void SmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; const util::ElementChange* pElementChanges = rEvent.Changes.getConstArray(); const sal_Int32 nNumberOfChanges = rEvent.Changes.getLength(); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 9c586aeb820f..eba7259dac63 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -202,7 +202,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changingState( const ::com::sun::star void SdrLightEmbeddedClient_Impl::Release() { { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mpObj = NULL; } @@ -212,7 +212,7 @@ void SdrLightEmbeddedClient_Impl::Release() //-------------------------------------------------------------------- void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj && nOldState == embed::EmbedStates::LOADED && nNewState == embed::EmbedStates::RUNNING ) { @@ -228,7 +228,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star: //-------------------------------------------------------------------- void SAL_CALL SdrLightEmbeddedClient_Impl::disposing( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj); } @@ -238,7 +238,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj { // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // the code currently makes sence only in case there is no other client if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAscii("OnVisAreaChanged") @@ -310,7 +310,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::saveObject() uno::Reference< util::XModifiable > xModifiable; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw embed::ObjectSaveVetoException(); @@ -353,7 +353,7 @@ uno::Reference< util::XCloseable > SAL_CALL SdrLightEmbeddedClient_Impl::getComp { uno::Reference< util::XCloseable > xResult; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj ) xResult = uno::Reference< util::XCloseable >( mpObj->GetParentXModel(), uno::UNO_QUERY ); @@ -365,7 +365,7 @@ sal_Bool SAL_CALL SdrLightEmbeddedClient_Impl::canInplaceActivate() throw ( uno::RuntimeException ) { sal_Bool bRet = sal_False; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj ) { uno::Reference< embed::XEmbeddedObject > xObject = mpObj->GetObjRef(); @@ -389,7 +389,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); uno::Reference < frame::XFrame > xOwnFrame( xFrame,uno::UNO_QUERY); @@ -443,7 +443,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager(getLayoutManager()); if ( xLayoutManager.is() ) { @@ -459,7 +459,7 @@ uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SdrLightEmbed uno::RuntimeException ) { uno::Reference< ::com::sun::star::frame::XLayoutManager > xMan; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); try { @@ -478,7 +478,7 @@ uno::Reference< frame::XDispatchProvider > SAL_CALL SdrLightEmbeddedClient_Impl: throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return uno::Reference < frame::XDispatchProvider >( lcl_getFrame_throw(mpObj), uno::UNO_QUERY_THROW ); } @@ -487,7 +487,7 @@ awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw uno::RuntimeException(); @@ -529,7 +529,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl uno::Exception, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw uno::RuntimeException(); @@ -589,7 +589,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl uno::Reference< awt::XWindow > SAL_CALL SdrLightEmbeddedClient_Impl::getWindow() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< awt::XWindow > xCurrent = m_xWindow; if ( !xCurrent.is() ) { diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 2f49bb7896d6..71cf99bed7c9 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -195,7 +195,7 @@ void SAL_CALL AccessibleCell::release( ) throw () */ sal_Int32 SAL_CALL AccessibleCell::getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed (); return mpText != NULL ? mpText->GetChildCount () : 0; } @@ -207,7 +207,7 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleChildCount() throw (::com::sun:: */ Reference<XAccessible> SAL_CALL AccessibleCell::getAccessibleChild (sal_Int32 nIndex) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed (); // todo: does GetChild throw IndexOutOfBoundsException? @@ -224,7 +224,7 @@ Reference<XAccessible> SAL_CALL AccessibleCell::getAccessibleChild (sal_Int32 nI */ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet (void) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); Reference<XAccessibleStateSet> xStateSet; @@ -276,7 +276,7 @@ sal_Bool SAL_CALL AccessibleCell::containsPoint( const ::com::sun::star::awt::Po */ Reference<XAccessible > SAL_CALL AccessibleCell::getAccessibleAtPoint ( const ::com::sun::star::awt::Point& aPoint) throw(RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); sal_Int32 nChildCount = getAccessibleChildCount (); @@ -307,7 +307,7 @@ Reference<XAccessible > SAL_CALL AccessibleCell::getAccessibleAtPoint ( const : ::com::sun::star::awt::Rectangle SAL_CALL AccessibleCell::getBounds(void) throw(RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed (); @@ -466,7 +466,7 @@ sal_Int32 SAL_CALL AccessibleCell::getBackground (void) throw (RuntimeException) void SAL_CALL AccessibleCell::addEventListener( const Reference<XAccessibleEventListener >& rxListener) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); if (rBHelper.bDisposed || rBHelper.bInDispose) { @@ -486,7 +486,7 @@ void SAL_CALL AccessibleCell::addEventListener( const Reference<XAccessibleEvent void SAL_CALL AccessibleCell::removeEventListener( const Reference<XAccessibleEventListener >& rxListener) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; AccessibleContextBase::removeEventListener(rxListener); if (mpText != NULL) mpText->RemoveEventListener (rxListener); @@ -540,7 +540,7 @@ void AccessibleCell::ViewForwarderChanged (ChangeType /*aChangeType*/, const IAc void AccessibleCell::disposing (void) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); // Make sure to send an event that this object looses the focus in the @@ -574,7 +574,7 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt ::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException) { ThrowIfDisposed (); - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( mxCell.is() ) return mxCell->getName(); diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 29c26d304316..cf414fa932d3 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -343,14 +343,14 @@ OUString AccessibleTableShape::CreateAccessibleBaseName(void) throw (RuntimeExce sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleChildCount( ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getRowCount() * mxImpl->mxTable->getColumnCount() : 0; } //-------------------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleChild( sal_Int32 i ) throw(IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed(); return mxImpl->getAccessibleChild( i ); @@ -385,7 +385,7 @@ void SAL_CALL AccessibleTableShape::disposing (void) sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowCount() throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getRowCount() : 0; } @@ -393,7 +393,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowCount() throw (RuntimeE sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnCount( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getColumnCount() : 0; } @@ -409,7 +409,7 @@ OUString SAL_CALL AccessibleTableShape::getAccessibleRowDescription( sal_Int32 n OUString SAL_CALL AccessibleTableShape::getAccessibleColumnDescription( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, 0 ); return OUString(); } @@ -418,7 +418,7 @@ OUString SAL_CALL AccessibleTableShape::getAccessibleColumnDescription( sal_Int3 sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); if( mxImpl->mxTable.is() ) { @@ -433,7 +433,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowExtentAt( sal_Int32 nRo sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); if( mxImpl->mxTable.is() ) { @@ -480,7 +480,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleTableShape::getSelectedAccessibleColumn sal_Bool SAL_CALL AccessibleTableShape::isAccessibleRowSelected( sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( 0, nRow ); return sal_False; } @@ -489,7 +489,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleRowSelected( sal_Int32 nRow sal_Bool SAL_CALL AccessibleTableShape::isAccessibleColumnSelected( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, 0 ); return sal_False; } @@ -498,7 +498,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleColumnSelected( sal_Int32 nC Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); sal_Int32 nChildIndex = 0; @@ -528,7 +528,7 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleSummary( ) sal_Bool SAL_CALL AccessibleTableShape::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); SvxTableController* pController = getTableController(); @@ -547,7 +547,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleSelected( sal_Int32 nRow, sa sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); return mxImpl->mxTable.is() ? (nRow * mxImpl->mxTable->getColumnCount() + nColumn) : 0; } @@ -556,7 +556,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleIndex( sal_Int32 nRow, sal sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRow( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; sal_Int32 nColumn = 0, nRow = 0; mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow ); return nRow; @@ -566,7 +566,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRow( sal_Int32 nChildIndex sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; sal_Int32 nColumn = 0, nRow = 0; mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow ); return nChildIndex; @@ -578,7 +578,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int32 nChildIn void SAL_CALL AccessibleTableShape::selectAccessibleChild( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); @@ -604,7 +604,7 @@ void SAL_CALL AccessibleTableShape::selectAccessibleChild( sal_Int32 nChildIndex sal_Bool SAL_CALL AccessibleTableShape::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); @@ -615,7 +615,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleChildSelected( sal_Int32 nCh void SAL_CALL AccessibleTableShape::clearAccessibleSelection() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController ) @@ -625,7 +625,7 @@ void SAL_CALL AccessibleTableShape::clearAccessibleSelection() throw ( RuntimeEx void SAL_CALL AccessibleTableShape::selectAllAccessibleChildren() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // todo: force selection of shape? SvxTableController* pController = getTableController(); @@ -637,7 +637,7 @@ void SAL_CALL AccessibleTableShape::selectAllAccessibleChildren() throw ( Runtim sal_Int32 SAL_CALL AccessibleTableShape::getSelectedAccessibleChildCount() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController && pController->hasSelectedCells() ) @@ -657,7 +657,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getSelectedAccessibleChildCount() throw Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController && pController->hasSelectedCells() ) @@ -686,7 +686,7 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChi void SAL_CALL AccessibleTableShape::deselectAccessibleChild( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 21270ee3ce51..aea9736ae2b1 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -994,7 +994,7 @@ Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo() throw(RuntimeE void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& rValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1139,7 +1139,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1255,7 +1255,7 @@ void SAL_CALL Cell::removeVetoableChangeListener( const OUString& /*PropertyName void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyNames, const Sequence< Any >& aValues ) throw (PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1286,7 +1286,7 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyName Sequence< Any > SAL_CALL Cell::getPropertyValues( const Sequence< OUString >& aPropertyNames ) throw (RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1340,7 +1340,7 @@ void SAL_CALL Cell::firePropertiesChangeEvent( const Sequence< OUString >& /*aPr PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1452,7 +1452,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th Sequence< PropertyState > SAL_CALL Cell::getPropertyStates( const Sequence< OUString >& aPropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1483,7 +1483,7 @@ Sequence< PropertyState > SAL_CALL Cell::getPropertyStates( const Sequence< OUSt void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1526,7 +1526,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); diff --git a/svx/source/table/celleditsource.cxx b/svx/source/table/celleditsource.cxx index e76bce8294a7..c9b4c6f294c5 100644 --- a/svx/source/table/celleditsource.cxx +++ b/svx/source/table/celleditsource.cxx @@ -939,7 +939,7 @@ CellEditSource::CellEditSource( CellEditSourceImpl* pImpl ) //------------------------------------------------------------------------ CellEditSource::~CellEditSource() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mpImpl->release(); } diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index 463c366d8d54..86926f878344 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -314,7 +314,7 @@ void SAL_CALL TableDesignStyle::setName( const OUString& rName ) throw (RuntimeE Any SAL_CALL TableDesignStyle::getByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); @@ -329,7 +329,7 @@ Any SAL_CALL TableDesignStyle::getByName( const OUString& rName ) throw(NoSuchEl Sequence< OUString > SAL_CALL TableDesignStyle::getElementNames() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); Sequence< OUString > aRet( rMap.size() ); @@ -346,7 +346,7 @@ Sequence< OUString > SAL_CALL TableDesignStyle::getElementNames() throw(RuntimeE sal_Bool SAL_CALL TableDesignStyle::hasByName( const OUString& rName ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); @@ -383,7 +383,7 @@ sal_Int32 SAL_CALL TableDesignStyle::getCount() throw(RuntimeException) Any SAL_CALL TableDesignStyle::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (Index < 0) || (Index >= style_count) ) throw IndexOutOfBoundsException(); @@ -397,7 +397,7 @@ Any SAL_CALL TableDesignStyle::getByIndex( sal_Int32 Index ) throw(IndexOutOfBou void SAL_CALL TableDesignStyle::replaceByName( const OUString& rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); CellStyleNameMap::const_iterator iter = rMap.find( rName ); @@ -547,7 +547,7 @@ void SAL_CALL TableDesignFamily::setName( const OUString& ) throw (RuntimeExcept Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) { @@ -562,7 +562,7 @@ Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchE Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Sequence< OUString > aRet( maDesigns.size() ); OUString* pNames = aRet.getArray(); @@ -577,7 +577,7 @@ Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames() throw(Runtime sal_Bool SAL_CALL TableDesignFamily::hasByName( const OUString& aName ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) if( (*iter)->getName() == aName ) @@ -599,7 +599,7 @@ Type SAL_CALL TableDesignFamily::getElementType() throw(RuntimeException) sal_Bool SAL_CALL TableDesignFamily::hasElements() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return maDesigns.empty() ? sal_False : sal_True; } @@ -610,7 +610,7 @@ sal_Bool SAL_CALL TableDesignFamily::hasElements() throw(RuntimeException) sal_Int32 SAL_CALL TableDesignFamily::getCount() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return sal::static_int_cast< sal_Int32 >( maDesigns.size() ); } @@ -619,7 +619,7 @@ sal_Int32 SAL_CALL TableDesignFamily::getCount() throw(RuntimeException) Any SAL_CALL TableDesignFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (Index >= 0) && (Index < sal::static_int_cast< sal_Int32 >( maDesigns.size() ) ) ) return Any( maDesigns[Index] ); @@ -633,7 +633,7 @@ Any SAL_CALL TableDesignFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBo void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any& rElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XStyle > xStyle( rElement, UNO_QUERY ); if( !xStyle.is() ) @@ -651,7 +651,7 @@ void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any& void SAL_CALL TableDesignFamily::removeByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) { @@ -672,7 +672,7 @@ void SAL_CALL TableDesignFamily::removeByName( const OUString& rName ) throw(NoS void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XStyle > xStyle( aElement, UNO_QUERY ); if( !xStyle.is() ) @@ -697,7 +697,7 @@ void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any Reference< XInterface > SAL_CALL TableDesignFamily::createInstance() throw(Exception, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return Reference< XInterface >( static_cast< XStyle* >( new TableDesignStyle ) ); } diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index a73dc88a9dda..af99e593d0e4 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -316,7 +316,7 @@ void TableModel::UndoRemoveColumns( sal_Int32 nIndex, ColumnVector& aCols, CellV Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return createCursorByRange( Reference< XCellRange >( this ) ); } @@ -324,7 +324,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeExcep Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Reference< XCellRange >& Range ) throw (IllegalArgumentException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ICellRange* pRange = dynamic_cast< ICellRange* >( Range.get() ); if( (pRange == 0) || (pRange->getTable().get() != this) ) @@ -338,7 +338,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Referen sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getRowCountImpl(); } @@ -346,7 +346,7 @@ sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getColumnCountImpl(); } @@ -356,7 +356,7 @@ sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) void TableModel::dispose() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; TableModelBase::dispose(); } @@ -380,7 +380,7 @@ void SAL_CALL TableModel::removeEventListener( const Reference< XEventListener > sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mbModified; } @@ -389,7 +389,7 @@ sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) void SAL_CALL TableModel::setModified( sal_Bool bModified ) throw (PropertyVetoException, RuntimeException) { { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mbModified = bModified; } if( bModified ) @@ -418,7 +418,7 @@ void SAL_CALL TableModel::removeModifyListener( const Reference< XModifyListener Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mxTableColumns.is() ) mxTableColumns.set( new TableColumns( this ) ); @@ -429,7 +429,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeExcep Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mxTableRows.is() ) mxTableRows.set( new TableRows( this ) ); @@ -442,7 +442,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw ( IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; CellRef xCell( getCell( nColumn, nRow ) ); if( xCell.is() ) @@ -455,7 +455,7 @@ Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sa Reference< XCellRange > SAL_CALL TableModel::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw (IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (nLeft >= 0) && (nTop >= 0) && (nRight >= nLeft) && (nBottom >= nTop) && (nRight < getColumnCountImpl()) && (nBottom < getRowCountImpl() ) ) { @@ -593,14 +593,14 @@ void TableModel::disposing() void TableModel::lockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ++mnNotifyLock; } // ----------------------------------------------------------------------------- void TableModel::unlockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; --mnNotifyLock; if( mnNotifyLock <= 0 ) { diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index ccedd08543c0..0fab0efb2be2 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -324,7 +324,7 @@ throw (uno::RuntimeException) { svt::ToolboxController::dispose(); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; delete m_pBox; m_pBox = 0; } @@ -336,7 +336,7 @@ throw ( uno::RuntimeException ) { if ( m_pBox ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( rEvent.FeatureURL.Path.equalsAscii( "FontHeight" )) { if ( rEvent.IsEnabled ) @@ -391,7 +391,7 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind Window* pParent = VCLUnoHelper::GetWindow( xParent ); if ( pParent ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; m_pBox = new SvxFontSizeBox_Impl( pParent, uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 366c90bfb45a..bcb87e57eaea 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -340,7 +340,7 @@ css::uno::Sequence< ::rtl::OUString > FindTextToolbarController::getSupportedSe // XComponent void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); @@ -400,7 +400,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::cre // XStatusListener void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -504,7 +504,7 @@ css::uno::Sequence< ::rtl::OUString > DownSearchToolboxController::getSupported // XComponent void SAL_CALL DownSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); @@ -561,7 +561,7 @@ void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) // XStatusListener void SAL_CALL DownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; } @@ -633,7 +633,7 @@ css::uno::Sequence< ::rtl::OUString > UpSearchToolboxController::getSupportedSe // XComponent void SAL_CALL UpSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); @@ -690,7 +690,7 @@ void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) th // XStatusListener void SAL_CALL UpSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; } diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx index 98fce8559cce..48ebaf6fc68c 100644 --- a/svx/source/tbxctrls/tbxalign.cxx +++ b/svx/source/tbxctrls/tbxalign.cxx @@ -84,7 +84,7 @@ SfxPopupWindowType SvxTbxCtlAlign::GetPopupWindowType() const SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow() { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( GetSlotId() == SID_OBJECT_ALIGN ) createAndPositionSubToolBar( m_aSubTbResName ); return NULL; @@ -104,7 +104,7 @@ SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow() { // Provide the controlled sub-toolbar name, so we are notified whenever // this toolbar executes a function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return m_aSubTbName; } @@ -112,7 +112,7 @@ void SAL_CALL SvxTbxCtlAlign::functionSelected( const ::rtl::OUString& aCommand { // Our sub-toolbar wants to executes a function. We have to change // the image of our toolbar button to reflect the new function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_bDisposed ) { if ( aCommand.getLength() > 0 ) @@ -129,7 +129,7 @@ void SAL_CALL SvxTbxCtlAlign::updateImage() throw (::com::sun::star::uno::Runtim { // We should update the button image of our parent (toolbar). Use the stored // command to set the correct current image. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index bf6bbc3c41c4..281080e2d2e7 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -70,7 +70,7 @@ ChineseTranslation_UnoDialog::ChineseTranslation_UnoDialog( const uno::Reference ChineseTranslation_UnoDialog::~ChineseTranslation_UnoDialog() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; impl_DeleteDialog(); } @@ -132,7 +132,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::setTitle( const ::rtl::OUString& ) t //------------------------------------------------------------------------- void SAL_CALL ChineseTranslation_UnoDialog::initialize( const uno::Sequence< uno::Any >& aArguments ) throw(uno::Exception, uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; @@ -155,7 +155,7 @@ sal_Int16 SAL_CALL ChineseTranslation_UnoDialog::execute() throw(uno::RuntimeExc { sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return nRet; @@ -187,7 +187,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::dispose() throw (uno::RuntimeExcepti { lang::EventObject aEvt; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_bInDispose = true; @@ -204,7 +204,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::dispose() throw (uno::RuntimeExcepti void SAL_CALL ChineseTranslation_UnoDialog::addEventListener( const uno::Reference< lang::XEventListener > & xListener ) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_aDisposeEventListeners.addInterface( xListener ); @@ -212,7 +212,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::addEventListener( const uno::Referen void SAL_CALL ChineseTranslation_UnoDialog::removeEventListener( const uno::Reference< lang::XEventListener > & xListener ) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_aDisposeEventListeners.removeInterface( xListener ); @@ -239,7 +239,7 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const ::rtl::O sal_Bool bTranslateCommonTerms = sal_False; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose || !m_pDialog ) return aRet; m_pDialog->getSettings( bDirectionToSimplified, bUseCharacterVariants, bTranslateCommonTerms ); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 18122edb6071..d57d7e94e5f7 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1000,7 +1000,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDescriptor ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpUnoPage ) return sal_False; @@ -1091,7 +1091,7 @@ void SAL_CALL GraphicExporter::cancel() void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XComponent >& xComponent ) throw(IllegalArgumentException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mxShapes = NULL; mpUnoPage = NULL; diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index 389bb6d8896c..909b2b3e9d8c 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -117,7 +117,7 @@ void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, cons void SAL_CALL SvxUnoNameItemTable::insertByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( hasByName( aApiName ) ) throw container::ElementExistException(); @@ -133,7 +133,7 @@ void SAL_CALL SvxUnoNameItemTable::insertByName( const OUString& aApiName, const void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // a little quickfix for 2.0 to let applications clear api // created items that are not used @@ -172,7 +172,7 @@ void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName ) void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -228,7 +228,7 @@ void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, cons uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -260,7 +260,7 @@ uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName ) uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; std::set< OUString, comphelper::UStringLess > aNameSet; @@ -297,7 +297,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( ) sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -324,7 +324,7 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName ) sal_Bool SAL_CALL SvxUnoNameItemTable::hasElements( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const NameOrIndex *pItem; diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 0ee2cdd0aab3..a9835ae262fa 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -134,7 +134,7 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::supportsService( const OUString& Servic void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpList && NULL == mpTable ) throw lang::IllegalArgumentException(); @@ -158,7 +158,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, Name, aInternalName ); @@ -186,7 +186,7 @@ void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name ) void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -218,7 +218,7 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -240,7 +240,7 @@ uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName ) uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames() throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const long nCount = getCount(); uno::Sequence< OUString > aNames( nCount ); @@ -264,7 +264,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames() sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -286,7 +286,7 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName ) sal_Bool SAL_CALL SvxUnoXPropertyTable::hasElements( ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getCount() != 0; } diff --git a/svx/source/unodraw/unomlstr.cxx b/svx/source/unodraw/unomlstr.cxx index 1d73f3404c24..5dd4e859cde4 100644 --- a/svx/source/unodraw/unomlstr.cxx +++ b/svx/source/unodraw/unomlstr.cxx @@ -50,7 +50,7 @@ SvxUnoShapeModifyListener::~SvxUnoShapeModifyListener() throw() // ::com::sun::star::util::XModifyListener void SAL_CALL SvxUnoShapeModifyListener::modified(const lang::EventObject& ) throw( uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj ) { mpObj->SetChanged(); diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index a54a35f7395e..79bab2d5c227 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -348,7 +348,7 @@ sal_Bool SAL_CALL SvxUnoDrawingModel::hasControllersLocked( ) uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess ); @@ -362,7 +362,7 @@ uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages( uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier ) throw(uno::Exception, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) ) { @@ -601,7 +601,7 @@ SvxUnoDrawPagesAccess::~SvxUnoDrawPagesAccess() throw() sal_Int32 SAL_CALL SvxUnoDrawPagesAccess::getCount() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nCount = 0; @@ -614,7 +614,7 @@ sal_Int32 SAL_CALL SvxUnoDrawPagesAccess::getCount() uno::Any SAL_CALL SvxUnoDrawPagesAccess::getByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Any aAny; @@ -666,7 +666,7 @@ sal_Bool SAL_CALL SvxUnoDrawPagesAccess::hasElements() uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< drawing::XDrawPage > xDrawPage; @@ -689,7 +689,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewBy void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount(); if( nPageCount > 1 ) diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index 08de32a8c5d6..843be28f22ff 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -188,7 +188,7 @@ void SAL_CALL SvxUnoMarkerTable::ImplInsertByName( const OUString& aName, const void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( hasByName( aApiName ) ) throw container::ElementExistException(); @@ -202,7 +202,7 @@ void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aApiName, const u void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // a little quickfix for 2.0 to let applications clear api // created items that are not used @@ -241,7 +241,7 @@ void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName ); @@ -330,7 +330,7 @@ static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName ); @@ -379,7 +379,7 @@ static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUS uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; std::set< OUString, comphelper::UStringLess > aNameSet; @@ -406,7 +406,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames() sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( aName.getLength() == 0 ) return sal_False; @@ -447,7 +447,7 @@ uno::Type SAL_CALL SvxUnoMarkerTable::getElementType( ) sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; NameOrIndex *pItem; diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index ad766a0c48ed..c67fad50d698 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -196,7 +196,7 @@ void SvxDrawPage::disposing() throw() void SvxDrawPage::dispose() throw(::com::sun::star::uno::RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // An frequently programming error is to release the last // reference to this object in the disposing message. @@ -253,7 +253,7 @@ void SvxDrawPage::dispose() void SAL_CALL SvxDrawPage::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpModel == 0 ) throw lang::DisposedException(); @@ -265,7 +265,7 @@ void SAL_CALL SvxDrawPage::addEventListener( const ::com::sun::star::uno::Refere void SAL_CALL SvxDrawPage::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpModel == 0 ) throw lang::DisposedException(); @@ -305,7 +305,7 @@ void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ ) void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -340,7 +340,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -377,7 +377,7 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape ) sal_Int32 SAL_CALL SvxDrawPage::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -389,7 +389,7 @@ sal_Int32 SAL_CALL SvxDrawPage::getCount() uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -420,7 +420,7 @@ uno::Type SAL_CALL SvxDrawPage::getElementType() sal_Bool SAL_CALL SvxDrawPage::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -488,7 +488,7 @@ void SvxDrawPage::_SelectObjectInView( const Reference< drawing::XShape > & xSha Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< drawing::XShapes >& xShapes ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -527,7 +527,7 @@ Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGroup ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 69a805dab5e6..9896b361bbd6 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -207,7 +207,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const uno::Any* pValues ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_False ); @@ -222,7 +222,7 @@ void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, uno::Any* pValue ) throw(beans::UnknownPropertyException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -237,7 +237,7 @@ void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, beans::PropertyState* pStates ) throw(beans::UnknownPropertyException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -300,7 +300,7 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry ) throw(beans::UnknownPropertyException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -319,7 +319,7 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) throw(beans::UnknownPropertyException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // OD 13.10.2003 #i18732# - use method <GetPoolDefaultItem(..)> instead of // using probably incompatible item pool <mpDefaultsPool> @@ -390,7 +390,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes() uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawPool::getImplementationId() throw (uno::RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index e2faf092ec6a..04c0ff829e45 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1419,7 +1419,7 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( nServiceId > SVXUNO_SERVICEID_LASTID ) { diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 892f771f0b9e..5b1024155e3c 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -222,7 +222,7 @@ void SAL_CALL SvxShapeGroup::leaveGroup( ) throw(uno::RuntimeException) void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -264,7 +264,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SdrObject* pSdrShape = NULL; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -318,7 +318,7 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS //---------------------------------------------------------------------- sal_Int32 SAL_CALL SvxShapeGroup::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nRetval = 0; @@ -334,7 +334,7 @@ sal_Int32 SAL_CALL SvxShapeGroup::getCount() throw( uno::RuntimeException ) uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mpObj.is() || mpObj->GetSubList() == NULL ) throw uno::RuntimeException(); @@ -362,7 +362,7 @@ uno::Type SAL_CALL SvxShapeGroup::getElementType() throw( uno::RuntimeException //---------------------------------------------------------------------- sal_Bool SAL_CALL SvxShapeGroup::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mpObj.is() && mpObj->GetSubList() && (mpObj->GetSubList()->GetObjCount() > 0); } @@ -480,7 +480,7 @@ void SAL_CALL SvxShapeConnector::setSize( const awt::Size& rSize ) void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); SvxShape* pShape = SvxShape::getImplementation( xRef ); @@ -496,7 +496,7 @@ void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XC void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); SvxShape* pShape = SvxShape::getImplementation( xRef ); @@ -512,7 +512,7 @@ void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XCon void SAL_CALL SvxShapeConnector::disconnectBegin( const uno::Reference< drawing::XConnectableShape >& ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) mpObj->DisconnectFromNode( sal_True ); @@ -525,7 +525,7 @@ void SAL_CALL SvxShapeConnector::disconnectBegin( const uno::Reference< drawing: void SAL_CALL SvxShapeConnector::disconnectEnd( const uno::Reference< drawing::XConnectableShape >& ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) mpObj->DisconnectFromNode( sal_False ); @@ -648,7 +648,7 @@ void SAL_CALL SvxShapeControl::setSize( const awt::Size& rSize ) Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< awt::XControlModel > xModel; @@ -663,7 +663,7 @@ Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl() void SAL_CALL SvxShapeControl::setControl( const Reference< awt::XControlModel >& xControl ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SdrUnoObj* pUnoObj = dynamic_cast< SdrUnoObj * >(mpObj.get()); if( pUnoObj ) @@ -1290,7 +1290,7 @@ drawing::PolygonKind SvxShapePolyPolygon::GetPolygonKind() const throw() //---------------------------------------------------------------------- void SvxShapePolyPolygon::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) ((SdrPathObj*)mpObj.get())->SetPathPoly(rNew); @@ -1299,7 +1299,7 @@ void SvxShapePolyPolygon::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw( //---------------------------------------------------------------------- basegfx::B2DPolyPolygon SvxShapePolyPolygon::GetPolygon() const throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) { @@ -1586,7 +1586,7 @@ drawing::PolygonKind SvxShapePolyPolygonBezier::GetPolygonKind() const throw() //---------------------------------------------------------------------- void SvxShapePolyPolygonBezier::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) static_cast<SdrPathObj*>(mpObj.get())->SetPathPoly(rNew); @@ -1595,7 +1595,7 @@ void SvxShapePolyPolygonBezier::SetPolygon(const basegfx::B2DPolyPolygon& rNew) //---------------------------------------------------------------------- basegfx::B2DPolyPolygon SvxShapePolyPolygonBezier::GetPolygon() const throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(mpObj.is()) { @@ -1957,7 +1957,7 @@ OUString SAL_CALL SvxCustomShape::getShapeType() //------------------------------------------------------------------1---- awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpModel && mpObj.is() ) { SdrAShapeObjGeoData aCustomShapeGeoData; @@ -2062,7 +2062,7 @@ void SAL_CALL SvxCustomShape::setSize( const awt::Size& rSize ) void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SdrObject* pObject = mpObj.get(); sal_Bool bCustomShapeGeometry = pObject && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShapeGeometry" ) ); diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 7b2977657146..e2dc8988bb58 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -151,7 +151,7 @@ uno::Sequence< sal_Int8 > SAL_CALL Svx3DSceneObject::getImplementationId() void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -180,7 +180,7 @@ void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -221,7 +221,7 @@ void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xSha sal_Int32 SAL_CALL Svx3DSceneObject::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nRetval = 0; @@ -235,7 +235,7 @@ sal_Int32 SAL_CALL Svx3DSceneObject::getCount() uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mpObj.is() || mpObj->GetSubList() == NULL ) throw uno::RuntimeException(); @@ -266,7 +266,7 @@ uno::Type SAL_CALL Svx3DSceneObject::getElementType() sal_Bool SAL_CALL Svx3DSceneObject::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mpObj.is() && mpObj->GetSubList() && (mpObj->GetSubList()->GetObjCount() > 0); } @@ -515,7 +515,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw() //---------------------------------------------------------------------- bool Svx3DCubeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; switch( pProperty->nWID ) { diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 96d82c429231..ffa3849ce9be 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -253,7 +253,7 @@ SvxShape::SvxShape() throw() //---------------------------------------------------------------------- SvxShape::~SvxShape() throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount == 0, "Locked shape was disposed!" ); @@ -1242,7 +1242,7 @@ static void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) awt::Point SAL_CALL SvxShape::getPosition() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1265,7 +1265,7 @@ awt::Point SAL_CALL SvxShape::getPosition() throw(uno::RuntimeException) //---------------------------------------------------------------------- void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpModel ) { @@ -1295,7 +1295,7 @@ void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) throw(uno::Run //---------------------------------------------------------------------- awt::Size SAL_CALL SvxShape::getSize() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1312,7 +1312,7 @@ awt::Size SAL_CALL SvxShape::getSize() throw(uno::RuntimeException) void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) throw(beans::PropertyVetoException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1356,7 +1356,7 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) // XNamed OUString SAL_CALL SvxShape::getName( ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() ) { return mpObj->GetName(); @@ -1371,7 +1371,7 @@ OUString SAL_CALL SvxShape::getName( ) throw(::com::sun::star::uno::RuntimeExce void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() ) { mpObj->SetName( aName ); @@ -1398,7 +1398,7 @@ OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException) //---------------------------------------------------------------------- void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpImpl->mbDisposing ) return; // caught a recursion @@ -1931,7 +1931,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& rVal ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); @@ -2056,7 +2056,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); @@ -2115,7 +2115,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) // XMultiPropertySet void SAL_CALL SvxShape::setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; const sal_Int32 nCount = aPropertyNames.getLength(); const OUString* pNames = aPropertyNames.getConstArray(); @@ -2341,7 +2341,7 @@ beans::PropertyState SAL_CALL SvxShape::getPropertyState( const OUString& Proper beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& PropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); @@ -3338,7 +3338,7 @@ void SAL_CALL SvxShape::setPropertyToDefault( const OUString& PropertyName ) void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); @@ -3371,7 +3371,7 @@ uno::Any SAL_CALL SvxShape::getPropertyDefault( const OUString& aPropertyName ) uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); @@ -3397,7 +3397,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) // XMultiPropertyStates void SvxShape::setAllPropertiesToDefault() throw (uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mpObj.is() ) throw lang::DisposedException(); @@ -3517,7 +3517,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor) { @@ -3530,7 +3530,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_GroupServices; @@ -3550,7 +3550,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_CustomShapeServices; @@ -3581,7 +3581,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_LineServices; @@ -3616,7 +3616,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_RectServices; @@ -3653,7 +3653,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_CircServices; @@ -3690,7 +3690,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_PathServices; @@ -3725,7 +3725,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_PolyServices; @@ -3762,7 +3762,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_FreeLineServices; @@ -3801,7 +3801,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_FreeFillServices; @@ -3839,7 +3839,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_TextServices; @@ -3873,7 +3873,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_GrafServices; @@ -3905,7 +3905,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_Ole2Services; @@ -3925,7 +3925,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_CaptionServices; @@ -3961,7 +3961,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_PageServices; @@ -3982,7 +3982,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_MeasureServices; @@ -4019,7 +4019,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_FrameServices; @@ -4040,7 +4040,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard _aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard _aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_UnoServices; @@ -4059,7 +4059,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_EdgeServices; @@ -4094,7 +4094,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_MediaServices; @@ -4119,7 +4119,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; // if( 0 == pSeq ) { static uno::Sequence< OUString > SvxShape_UnoServices; @@ -4156,7 +4156,7 @@ sal_Bool SAL_CALL SvxShape::supportsService( const OUString& ServiceName ) throw uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< container::XIndexContainer > xGluePoints( mxGluePoints ); if( mpObj.is() && !xGluePoints.is() ) @@ -4174,7 +4174,7 @@ uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints() uno::Reference< uno::XInterface > SAL_CALL SvxShape::getParent( ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj.is() && mpObj->GetObjList() ) { @@ -4228,7 +4228,7 @@ void SvxShape::unlock() // XActionLockable sal_Bool SAL_CALL SvxShape::isActionLocked( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mnLockCount != 0; } @@ -4237,7 +4237,7 @@ sal_Bool SAL_CALL SvxShape::isActionLocked( ) throw (::com::sun::star::uno::Run void SAL_CALL SvxShape::addActionLock( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount < 0xffff, "lock overflow in SvxShape!" ); mnLockCount++; @@ -4250,7 +4250,7 @@ void SAL_CALL SvxShape::addActionLock( ) throw (::com::sun::star::uno::RuntimeE void SAL_CALL SvxShape::removeActionLock( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount > 0, "lock underflow in SvxShape!" ); mnLockCount--; @@ -4263,7 +4263,7 @@ void SAL_CALL SvxShape::removeActionLock( ) throw (::com::sun::star::uno::Runti void SAL_CALL SvxShape::setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mnLockCount == 0) && (nLock != 0) ) unlock(); @@ -4278,7 +4278,7 @@ void SAL_CALL SvxShape::setActionLocks( sal_Int16 nLock ) throw (::com::sun::sta sal_Int16 SAL_CALL SvxShape::resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mnLockCount != 0 ) unlock(); @@ -4479,7 +4479,7 @@ void SvxShapeText::unlock() // ::com::sun::star::text::XTextRange uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4489,7 +4489,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno:: uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4498,7 +4498,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::Ru OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4508,7 +4508,7 @@ OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException) void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 258f1394703d..ba7782e3e62a 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -1054,7 +1054,7 @@ SvxTextEditSource::SvxTextEditSource( SvxTextEditSourceImpl* pImpl ) //------------------------------------------------------------------------ SvxTextEditSource::~SvxTextEditSource() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mpImpl->release(); } diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 19036061072e..d20dbcc6ffc2 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -208,7 +208,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryItem::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryItem::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -225,7 +225,7 @@ uno::Sequence< sal_Int8 > SAL_CALL GalleryItem::getImplementationId() sal_Int8 SAL_CALL GalleryItem::getType() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int8 nRet = gallery::GalleryItemType::EMPTY; if( isValid() ) @@ -254,7 +254,7 @@ sal_Int8 SAL_CALL GalleryItem::getType() ::comphelper::PropertySetInfo* GalleryItem::createPropertySetInfo() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::comphelper::PropertySetInfo* pRet = new ::comphelper::PropertySetInfo(); static ::comphelper::PropertyMapEntry aEntries[] = @@ -294,7 +294,7 @@ void GalleryItem::_setPropertyValues( const comphelper::PropertyMapEntry** ppEnt lang::IllegalArgumentException, lang::WrappedTargetException ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; while( *ppEntries ) { @@ -339,7 +339,7 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt throw( beans::UnknownPropertyException, lang::WrappedTargetException ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; while( *ppEntries ) { diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index 03ba21743499..1eb72f036835 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -66,7 +66,7 @@ GalleryTheme::GalleryTheme( const ::rtl::OUString& rThemeName ) GalleryTheme::~GalleryTheme() { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; DBG_ASSERT( !mpTheme || mpGallery, "Theme is living without Gallery" ); @@ -154,7 +154,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryTheme::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryTheme::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -179,7 +179,7 @@ uno::Type SAL_CALL GalleryTheme::getElementType() sal_Bool SAL_CALL GalleryTheme::hasElements() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; return( ( mpTheme != NULL ) && ( mpTheme->GetObjectCount() > 0 ) ); } @@ -189,7 +189,7 @@ sal_Bool SAL_CALL GalleryTheme::hasElements() sal_Int32 SAL_CALL GalleryTheme::getCount() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; return( mpTheme ? mpTheme->GetObjectCount() : 0 ); } @@ -199,7 +199,7 @@ sal_Int32 SAL_CALL GalleryTheme::getCount() uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Any aRet; if( mpTheme ) @@ -225,7 +225,7 @@ uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex ) ::rtl::OUString SAL_CALL GalleryTheme::getName( ) throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; ::rtl::OUString aRet; if( mpTheme ) @@ -239,7 +239,7 @@ uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex ) void SAL_CALL GalleryTheme::update( ) throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; if( mpTheme ) { @@ -254,7 +254,7 @@ void SAL_CALL GalleryTheme::update( ) const ::rtl::OUString& rURL, ::sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int32 nRet = -1; if( mpTheme ) @@ -287,7 +287,7 @@ void SAL_CALL GalleryTheme::update( ) const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int32 nRet = -1; if( mpTheme ) @@ -315,7 +315,7 @@ void SAL_CALL GalleryTheme::update( ) const uno::Reference< lang::XComponent >& Drawing, sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int32 nRet = -1; if( mpTheme ) @@ -371,7 +371,7 @@ void SAL_CALL GalleryTheme::update( ) void SAL_CALL GalleryTheme::removeByIndex( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; if( mpTheme ) { @@ -386,7 +386,7 @@ void SAL_CALL GalleryTheme::removeByIndex( sal_Int32 nIndex ) void GalleryTheme::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; const GalleryHint& rGalleryHint = static_cast< const GalleryHint& >( rHint ); switch( rGalleryHint.GetType() ) @@ -423,7 +423,7 @@ void GalleryTheme::Notify( SfxBroadcaster&, const SfxHint& rHint ) void GalleryTheme::implReleaseItems( GalleryObject* pObj ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; for( GalleryItemList::iterator aIter = maItemList.begin(); aIter != maItemList.end(); ) { @@ -448,7 +448,7 @@ void GalleryTheme::implReleaseItems( GalleryObject* pObj ) void GalleryTheme::implRegisterGalleryItem( ::unogallery::GalleryItem& rItem ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; // DBG_ASSERT( maItemList.find( &rItem ) == maItemList.end(), "Item already registered" ); maItemList.push_back( &rItem ); @@ -458,7 +458,7 @@ void GalleryTheme::implRegisterGalleryItem( ::unogallery::GalleryItem& rItem ) void GalleryTheme::implDeregisterGalleryItem( ::unogallery::GalleryItem& rItem ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; // DBG_ASSERT( maItemList.find( &rItem ) != maItemList.end(), "Item is not registered" ); maItemList.remove( &rItem ); diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 8c9c275de8b3..f389664a346f 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -160,7 +160,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -208,7 +208,7 @@ uno::Type SAL_CALL GalleryThemeProvider::getElementType() sal_Bool SAL_CALL GalleryThemeProvider::hasElements() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; return( ( mpGallery != NULL ) && ( mpGallery->GetThemeCount() > 0 ) ); } @@ -218,7 +218,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasElements() uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Any aRet; if( !mpGallery || !mpGallery->HasTheme( rName ) ) @@ -238,7 +238,7 @@ uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getElementNames() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_uInt32 i = 0, nCount = ( mpGallery ? mpGallery->GetThemeCount() : 0 ), nRealCount = 0; uno::Sequence< ::rtl::OUString > aSeq( nCount ); @@ -260,7 +260,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getElementNames( sal_Bool SAL_CALL GalleryThemeProvider::hasByName( const ::rtl::OUString& rName ) throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Bool bRet = sal_False; @@ -275,7 +275,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasByName( const ::rtl::OUString& rName uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNewByName( const ::rtl::OUString& rThemeName ) throw (container::ElementExistException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Reference< gallery::XGalleryTheme > xRet; if( mpGallery ) @@ -298,7 +298,7 @@ uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNe void SAL_CALL GalleryThemeProvider::removeByName( const ::rtl::OUString& rName ) throw (container::NoSuchElementException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; if( !mpGallery || !mpGallery->HasTheme( rName ) || |