diff options
Diffstat (limited to 'slideshow/source/engine/slideshowimpl.cxx')
-rw-r--r-- | slideshow/source/engine/slideshowimpl.cxx | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index f02440109c46..d29dea85d9c7 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -448,7 +448,7 @@ private: boost::optional<RGBColor> maUserPaintColor; - boost::optional<double> maUserPaintStrokeWidth; + double maUserPaintStrokeWidth; //changed for the eraser project boost::optional<bool> maEraseAllInk; @@ -937,7 +937,7 @@ SlideSharedPtr SlideShowImpl::makeSlide( maShapeCursors, (aIter != maPolygons.end()) ? aIter->second : PolyPolygonVector(), maUserPaintColor ? *maUserPaintColor : RGBColor(), - *maUserPaintStrokeWidth, + maUserPaintStrokeWidth, !!maUserPaintColor, mbImageAnimationsAllowed, mbDisableAnimationZOrder) ); @@ -1096,11 +1096,7 @@ void SlideShowImpl::displaySlide( // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); -#ifdef ENABLE_PRESENTER_EXTRA_UI mxDrawPagesSupplier = xDrawPages; -#else - mxDrawPagesSupplier = NULL; -#endif stopShow(); // MUST call that: results in // maUserEventQueue.clear(). What's more, @@ -1602,6 +1598,9 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) // enable user paint maUserPaintColor.reset( unoColor2RGBColor( nColor ) ); + if( mpCurrentSlide && !mpCurrentSlide->isPaintOverlayActive() ) + mpCurrentSlide->enablePaintOverlay(); + maEventMultiplexer.notifyUserPaintColor( *maUserPaintColor ); } else @@ -1609,10 +1608,11 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) // disable user paint maUserPaintColor.reset(); maEventMultiplexer.notifyUserPaintDisabled(); + if( mpCurrentSlide ) + mpCurrentSlide->disablePaintOverlay(); } - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); + resetCursor(); return true; } @@ -1631,15 +1631,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) maEraseAllInk.reset( nEraseAllInk ); maEventMultiplexer.notifyEraseAllInk( *maEraseAllInk ); } - else - { - // disable user paint - maEraseAllInk.reset(); - maEventMultiplexer.notifyUserPaintDisabled(); - } - - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); return true; } @@ -1659,9 +1650,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) maEventMultiplexer.notifySwitchPenMode(); } } - - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); return true; } @@ -1680,8 +1668,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) } } - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); return true; } @@ -1698,15 +1684,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) maEraseInk.reset( nEraseInk ); maEventMultiplexer.notifyEraseInkWidth( *maEraseInk ); } - else - { - // disable user paint - maEraseInk.reset(); - maEventMultiplexer.notifyUserPaintDisabled(); - } - - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); return true; } @@ -1720,17 +1697,10 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) { OSL_ENSURE( mbMouseVisible,"setProperty(): User paint overrides invisible mouse" ); // enable user paint stroke width - maUserPaintStrokeWidth.reset( nWidth ); - maEventMultiplexer.notifyUserPaintStrokeWidth( *maUserPaintStrokeWidth ); + maUserPaintStrokeWidth = nWidth; + maEventMultiplexer.notifyUserPaintStrokeWidth( maUserPaintStrokeWidth ); } - else - { - // disable user paint stroke width - maUserPaintStrokeWidth.reset(); - maEventMultiplexer.notifyUserPaintDisabled(); - } - if( mnCurrentCursor == awt::SystemPointer::ARROW ) - resetCursor(); + return true; } @@ -2193,6 +2163,8 @@ void SlideShowImpl::notifySlideTransitionEnded( bool bPaintSlide ) "notifySlideTransitionEnded(): Invalid current slide" ); if (mpCurrentSlide) { + mpCurrentSlide->update_settings( !!maUserPaintColor, maUserPaintColor ? *maUserPaintColor : RGBColor(), maUserPaintStrokeWidth ); + // first init show, to give the animations // the chance to register SlideStartEvents const bool bBackgroundLayerRendered( !bPaintSlide ); |