summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/slideshowimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/slideshowimpl.cxx')
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx54
1 files changed, 13 insertions, 41 deletions
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index d736c3f52d64..a909ade61ee2 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -458,7 +458,7 @@ private:
boost::optional<RGBColor> maUserPaintColor;
- boost::optional<double> maUserPaintStrokeWidth;
+ double maUserPaintStrokeWidth;
//changed for the eraser project
boost::optional<bool> maEraseAllInk;
@@ -950,7 +950,7 @@ SlideSharedPtr SlideShowImpl::makeSlide(
maShapeCursors,
(aIter != maPolygons.end()) ? aIter->second : PolyPolygonVector(),
maUserPaintColor ? *maUserPaintColor : RGBColor(),
- *maUserPaintStrokeWidth,
+ maUserPaintStrokeWidth,
!!maUserPaintColor,
mbImageAnimationsAllowed,
mbDisableAnimationZOrder) );
@@ -1112,11 +1112,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,
@@ -1620,6 +1616,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
@@ -1627,10 +1626,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;
}
@@ -1649,15 +1649,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;
}
@@ -1677,9 +1668,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifySwitchPenMode();
}
}
-
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1699,8 +1687,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
}
}
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1719,15 +1705,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;
}
@@ -1741,17 +1718,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;
}
@@ -2214,6 +2184,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 );