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/source/unogallery | |
parent | 3a81649a55a49705d907a6ee72c92e26d2d4f2ee (diff) |
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'svx/source/unogallery')
-rw-r--r-- | svx/source/unogallery/unogalitem.cxx | 10 | ||||
-rw-r--r-- | svx/source/unogallery/unogaltheme.cxx | 30 | ||||
-rw-r--r-- | svx/source/unogallery/unogalthemeprovider.cxx | 14 |
3 files changed, 27 insertions, 27 deletions
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 ) || |