diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-13 02:37:50 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 17:58:18 -0500 |
commit | f883da353a2edf987ae2edecbb2c765a2fdd929d (patch) | |
tree | 35ac3a05d26da414db5bd0e9d0d18f10a1f6385f /sd/source/ui/slideshow | |
parent | bac821b200dcc0c11ba6d03fd23ec3b07b15dea8 (diff) |
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 88 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 4 |
3 files changed, 53 insertions, 53 deletions
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 5b30155d9bd5..5b2fd3aa9936 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -296,7 +296,7 @@ Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(Runt Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; static Reference< XPropertySetInfo > xInfo = maPropSet.getPropertySetInfo(); return xInfo; } @@ -305,7 +305,7 @@ Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo() throw(Run void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ThrowIfDisposed(); sd::PresentationSettings& rPresSettings = mpDoc->getPresentationSettings(); @@ -578,7 +578,7 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ThrowIfDisposed(); const sd::PresentationSettings& rPresSettings = mpDoc->getPresentationSettings(); @@ -680,7 +680,7 @@ void SAL_CALL SlideShow::start() throw(RuntimeException) void SAL_CALL SlideShow::end() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // The mbIsInStartup flag should have been reset during the start of the // slide show. Reset it here just in case that something has horribly @@ -822,7 +822,7 @@ void SAL_CALL SlideShow::rehearseTimings() throw(RuntimeException) void SAL_CALL SlideShow::startWithArguments( const Sequence< PropertyValue >& rArguments ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ThrowIfDisposed(); // Stop a running show before starting a new one. @@ -872,7 +872,7 @@ void SAL_CALL SlideShow::startWithArguments( const Sequence< PropertyValue >& rA ::sal_Bool SAL_CALL SlideShow::isRunning( ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mxController.is() && mxController->isRunning(); } @@ -892,7 +892,7 @@ Reference< XSlideShowController > SAL_CALL SlideShow::getController( ) throw (R void SAL_CALL SlideShow::disposing (void) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mnInPlaceConfigEvent ) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 222d05a0e522..ff89b63e88dd 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -622,7 +622,7 @@ void SAL_CALL SlideshowImpl::disposing() maInputFreezeTimer.Stop(); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( !mxShow.is() ) return; @@ -1236,7 +1236,7 @@ void SlideshowImpl::onFirstPaint() mpShowWindow->SetBackground(); } - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; maUpdateTimer.SetTimeout( (ULONG)100 ); maUpdateTimer.Start(); } @@ -1487,7 +1487,7 @@ IMPL_LINK( SlideshowImpl, endPresentationHdl, void*, EMPTYARG ) void SAL_CALL SlideshowImpl::pause() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( !mbIsPaused ) try { @@ -1516,7 +1516,7 @@ void SAL_CALL SlideshowImpl::pause() throw (RuntimeException) void SAL_CALL SlideshowImpl::resume() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mbIsPaused ) try { @@ -1553,7 +1553,7 @@ void SAL_CALL SlideshowImpl::resume() throw (RuntimeException) sal_Bool SAL_CALL SlideshowImpl::isPaused() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return mbIsPaused; } @@ -1561,7 +1561,7 @@ sal_Bool SAL_CALL SlideshowImpl::isPaused() throw (RuntimeException) void SAL_CALL SlideshowImpl::blankScreen( sal_Int32 nColor ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mpShowWindow && mpSlideController ) { @@ -1578,7 +1578,7 @@ void SAL_CALL SlideshowImpl::blankScreen( sal_Int32 nColor ) throw (RuntimeExcep void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun::star::awt::MouseEvent& /* aOriginalEvent */ ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; WrappedShapeEventImplPtr pEvent = maShapeEventMap[xShape]; if( !pEvent.get() ) @@ -1836,7 +1836,7 @@ sal_Int32 SlideshowImpl::getLastSlideNumber() sal_Bool SAL_CALL SlideshowImpl::isEndless() throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return maPresSettings.mbEndless; } @@ -1852,7 +1852,7 @@ double SlideshowImpl::update() void SlideshowImpl::startUpdateTimer() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; maUpdateTimer.SetTimeout( 0 ); maUpdateTimer.Start(); } @@ -2869,7 +2869,7 @@ void SlideshowImpl::setActiveXToolbarsVisible( sal_Bool bVisible ) void SAL_CALL SlideshowImpl::activate() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; maDeactivateTimer.Stop(); @@ -2910,7 +2910,7 @@ void SAL_CALL SlideshowImpl::activate() throw (RuntimeException) void SAL_CALL SlideshowImpl::deactivate() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mbActive && mxShow.is() ) { @@ -2946,7 +2946,7 @@ IMPL_LINK( SlideshowImpl, deactivateHdl, Timer*, EMPTYARG ) sal_Bool SAL_CALL SlideshowImpl::isActive() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return mbActive; } @@ -3038,7 +3038,7 @@ void SlideshowImpl::setAutoSaveState( bool bOn) Reference< XDrawPage > SAL_CALL SlideshowImpl::getCurrentSlide() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Reference< XDrawPage > xSlide; if( mxShow.is() && mpSlideController.get() ) @@ -3055,7 +3055,7 @@ Reference< XDrawPage > SAL_CALL SlideshowImpl::getCurrentSlide() throw (RuntimeE sal_Int32 SAL_CALL SlideshowImpl::getNextSlideIndex() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxShow.is() ) { @@ -3095,7 +3095,7 @@ Reference< XDrawPage > SAL_CALL SlideshowImpl::getSlideByIndex(::sal_Int32 Index sal_Bool SAL_CALL SlideshowImpl::getAlwaysOnTop() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return maPresSettings.mbAlwaysOnTop; } @@ -3103,7 +3103,7 @@ sal_Bool SAL_CALL SlideshowImpl::getAlwaysOnTop() throw (RuntimeException) void SAL_CALL SlideshowImpl::setAlwaysOnTop( sal_Bool bAlways ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( maPresSettings.mbAlwaysOnTop != bAlways ) { maPresSettings.mbAlwaysOnTop = bAlways; @@ -3115,7 +3115,7 @@ void SAL_CALL SlideshowImpl::setAlwaysOnTop( sal_Bool bAlways ) throw (RuntimeEx sal_Bool SAL_CALL SlideshowImpl::isFullScreen() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return maPresSettings.mbFullScreen; } @@ -3123,7 +3123,7 @@ sal_Bool SAL_CALL SlideshowImpl::isFullScreen() throw (RuntimeException) sal_Bool SAL_CALL SlideshowImpl::getMouseVisible() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return maPresSettings.mbMouseVisible; } @@ -3131,7 +3131,7 @@ sal_Bool SAL_CALL SlideshowImpl::getMouseVisible() throw (RuntimeException) void SAL_CALL SlideshowImpl::setMouseVisible( sal_Bool bVisible ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( maPresSettings.mbMouseVisible != bVisible ) { maPresSettings.mbMouseVisible = bVisible; @@ -3144,7 +3144,7 @@ void SAL_CALL SlideshowImpl::setMouseVisible( sal_Bool bVisible ) throw (Runtime sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return maPresSettings.mbMouseAsPen; } @@ -3152,7 +3152,7 @@ sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException) void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; maPresSettings.mbMouseAsPen = bMouseAsPen; if( mxShow.is() ) try { @@ -3212,7 +3212,7 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) throw (RuntimeExc #ifdef ENABLE_PRESENTER_EXTRA_UI void SAL_CALL SlideshowImpl::setUseEraser( sal_Bool bMouseAsPen ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; maPresSettings.mbMouseAsPen = bMouseAsPen; if( mxShow.is() ) try { @@ -3251,7 +3251,7 @@ void SAL_CALL SlideshowImpl::setUseEraser( sal_Bool bMouseAsPen ) throw (Runtime double SAL_CALL SlideshowImpl::getPenWidth() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return mdUserPaintStrokeWidth; } @@ -3259,7 +3259,7 @@ double SAL_CALL SlideshowImpl::getPenWidth() throw (RuntimeException) void SAL_CALL SlideshowImpl::setPenWidth( double dStrokeWidth ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mdUserPaintStrokeWidth = dStrokeWidth; mbSwitchPenMode = true; mbSwitchEraserMode = !mbSwitchPenMode; @@ -3271,7 +3271,7 @@ void SAL_CALL SlideshowImpl::setPenWidth( double dStrokeWidth ) throw (RuntimeEx sal_Int32 SAL_CALL SlideshowImpl::getPenColor() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return mnUserPaintColor; } @@ -3279,7 +3279,7 @@ sal_Int32 SAL_CALL SlideshowImpl::getPenColor() throw (RuntimeException) void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mnUserPaintColor = nColor; #ifdef ENABLE_PRESENTER_EXTRA_UI mbSwitchPenMode = true; @@ -3294,7 +3294,7 @@ void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) throw (RuntimeExcep void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mbSwitchPenMode = bSwitchPenMode; if(mbSwitchPenMode == true){ @@ -3309,7 +3309,7 @@ void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeExc void SAL_CALL SlideshowImpl::setEraserMode(bool bSwitchEraserMode ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mbSwitchEraserMode = bSwitchEraserMode; if(mbSwitchEraserMode = true){ mbSwitchPenMode = false; @@ -3327,7 +3327,7 @@ void SAL_CALL SlideshowImpl::setEraserMode(bool bSwitchEraserMode ) throw (Runti void SAL_CALL SlideshowImpl::setEraseAllInk( bool bEraseAllInk ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mbEraseAllInk=bEraseAllInk; mbSwitchPenMode = true; mbSwitchEraserMode = false; @@ -3338,7 +3338,7 @@ void SAL_CALL SlideshowImpl::setEraseAllInk( bool bEraseAllInk ) throw (RuntimeE void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 nEraseInkSize ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; mnEraseInkSize=nEraseInkSize; mbSwitchPenMode = false; mbSwitchEraserMode = true; @@ -3352,7 +3352,7 @@ void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 nEraseInkSize ) throw (Runti sal_Bool SAL_CALL SlideshowImpl::isRunning( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; return mxShow.is(); } @@ -3360,7 +3360,7 @@ sal_Bool SAL_CALL SlideshowImpl::isRunning( ) throw (RuntimeException) void SAL_CALL SlideshowImpl::gotoNextEffect( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxShow.is() && mpSlideController.get() && mpShowWindow ) { @@ -3388,7 +3388,7 @@ void SAL_CALL SlideshowImpl::gotoNextEffect( ) throw (RuntimeException) void SAL_CALL SlideshowImpl::gotoPreviousEffect( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxShow.is() && mpSlideController.get() && mpShowWindow ) { @@ -3412,7 +3412,7 @@ void SAL_CALL SlideshowImpl::gotoPreviousEffect( ) throw (RuntimeException) void SAL_CALL SlideshowImpl::gotoFirstSlide( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mpShowWindow && mpSlideController.get() ) { @@ -3435,7 +3435,7 @@ void SAL_CALL SlideshowImpl::gotoFirstSlide( ) throw (RuntimeException) void SAL_CALL SlideshowImpl::gotoNextSlide( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mbIsPaused ) resume(); @@ -3508,7 +3508,7 @@ void SAL_CALL SlideshowImpl::gotoPreviousSlide( ) throw (RuntimeException) void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxShow.is() && mpSlideController.get() ) try { @@ -3562,7 +3562,7 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects) void SAL_CALL SlideshowImpl::gotoLastSlide() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mpSlideController.get() ) { @@ -3588,7 +3588,7 @@ void SAL_CALL SlideshowImpl::gotoLastSlide() throw (RuntimeException) void SAL_CALL SlideshowImpl::gotoBookmark( const OUString& rBookmark ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mbIsPaused ) resume(); @@ -3603,7 +3603,7 @@ void SAL_CALL SlideshowImpl::gotoBookmark( const OUString& rBookmark ) throw (Ru void SAL_CALL SlideshowImpl::gotoSlide( const Reference< XDrawPage >& xSlide ) throw(IllegalArgumentException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mpSlideController.get() && xSlide.is() ) { @@ -3625,7 +3625,7 @@ void SAL_CALL SlideshowImpl::gotoSlide( const Reference< XDrawPage >& xSlide ) void SAL_CALL SlideshowImpl::gotoSlideIndex( sal_Int32 nIndex ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mbIsPaused ) resume(); @@ -3637,7 +3637,7 @@ void SAL_CALL SlideshowImpl::gotoSlideIndex( sal_Int32 nIndex ) throw (RuntimeEx void SAL_CALL SlideshowImpl::stopSound( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; try { @@ -3998,7 +3998,7 @@ void SlideShowListenerProxy::slideEnded(sal_Bool bReverse) throw (RuntimeExcepti } { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxController.is() ) mxController->slideEnded(bReverse); } @@ -4016,7 +4016,7 @@ void SlideShowListenerProxy::hyperLinkClicked( rtl::OUString const& aHyperLink ) } { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxController.is() ) mxController->hyperLinkClicked(aHyperLink); } @@ -4039,7 +4039,7 @@ void SAL_CALL SlideShowListenerProxy::disposing( const ::com::sun::star::lang::E void SAL_CALL SlideShowListenerProxy::click( const Reference< XShape >& xShape, const ::com::sun::star::awt::MouseEvent& aOriginalEvent ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if( mxController.is() ) mxController->click(xShape, aOriginalEvent ); } diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index 37cd6cd7bc23..30f3ac1dcdbd 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -320,7 +320,7 @@ void SAL_CALL SlideShowView::clear() throw (::com::sun::star::uno::RuntimeExcept { // paint background in black ::osl::MutexGuard aGuard( m_aMutex ); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // fill the bounds rectangle in black // ---------------------------------- @@ -344,7 +344,7 @@ void SAL_CALL SlideShowView::clear() throw (::com::sun::star::uno::RuntimeExcept geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; const Size& rTmpSize( mrOutputWindow.GetSizePixel() ); |