diff options
author | Ciorba Edmond <edmond_ciorba@yahoo.com> | 2013-07-15 19:45:44 +0300 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-07-18 07:57:19 +0000 |
commit | 0218b0e2fa510d7acd7413dbedefd9ad50257f76 (patch) | |
tree | 194e8e685b1739a130bb61fcce99ecc71204d062 /sdext/source/presenter/PresenterSlideSorter.cxx | |
parent | 1dbb3884b49c50fc9ab23e825acb169cf28d243e (diff) |
fdo#65457 - Provide visual clues in presenter view.
Change-Id: I225ae2dfa467df824d2586a05c8b8b576a43e8dc
Reviewed-on: https://gerrit.libreoffice.org/4929
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'sdext/source/presenter/PresenterSlideSorter.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 084f7186a7c3..01f886fdd2f1 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -903,6 +903,17 @@ void PresenterSlideSorter::PaintPreview ( mpLayout->GetWindowPosition( mpLayout->GetPoint(nSlideIndex, isRTL?1:-1, -1))); + PresenterBitmapContainer aContainer ( + "PresenterScreenSettings/ScrollBar/Bitmaps", + ::boost::shared_ptr<PresenterBitmapContainer>(), + mxComponentContext, + rxCanvas); + Reference<container::XIndexAccess> xIndexAccess(mxSlideShowController, UNO_QUERY); + Reference<drawing::XDrawPage> xPage = Reference<drawing::XDrawPage>( + xIndexAccess->getByIndex(nSlideIndex), UNO_QUERY); + bool bTransition = mpPresenterController->HasTransition(xPage); + bool bCustomAnimation = mpPresenterController->HasCustomAnimation(xPage); + // Create clip rectangle as intersection of the current update area and // the bounding box of all previews. geometry::RealRectangle2D aBoundingBox (mpLayout->maBoundingBox); @@ -950,6 +961,34 @@ void PresenterSlideSorter::PaintPreview ( if (aSize.Width > 0 && aSize.Height > 0) { rxCanvas->drawBitmap(xPreview, aViewState, aRenderState); + if( bCustomAnimation ) + { + const awt::Rectangle aAnimationPreviewBox(aTopLeft.X+3, aTopLeft.Y+aSize.Height-40, 0, 0); + SharedBitmapDescriptor aAnimationDescriptor = aContainer.GetBitmap("Animation"); + Reference<rendering::XBitmap> xAnimationIcon (aAnimationDescriptor->GetNormalBitmap()); + rendering::RenderState aAnimationRenderState ( + geometry::AffineMatrix2D( + 1, 0, aAnimationPreviewBox.X, + 0, 1, aAnimationPreviewBox.Y), + NULL, + Sequence<double>(4), + rendering::CompositeOperation::SOURCE); + rxCanvas->drawBitmap(xAnimationIcon, aViewState, aAnimationRenderState); + } + if( bTransition ) + { + const awt::Rectangle aTransitionPreviewBox(aTopLeft.X+3, aTopLeft.Y+aSize.Height-20, 0, 0); + SharedBitmapDescriptor aTransitionDescriptor = aContainer.GetBitmap("Transition"); + Reference<rendering::XBitmap> xTransitionIcon (aTransitionDescriptor->GetNormalBitmap()); + rendering::RenderState aTransitionRenderState ( + geometry::AffineMatrix2D( + 1, 0, aTransitionPreviewBox.X, + 0, 1, aTransitionPreviewBox.Y), + NULL, + Sequence<double>(4), + rendering::CompositeOperation::SOURCE); + rxCanvas->drawBitmap(xTransitionIcon, aViewState, aTransitionRenderState); + } } } |