summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiorba Edmond <edmond_ciorba@yahoo.com>2013-07-15 19:45:44 +0300
committerAndras Timar <atimar@suse.com>2013-07-18 07:57:19 +0000
commit0218b0e2fa510d7acd7413dbedefd9ad50257f76 (patch)
tree194e8e685b1739a130bb61fcce99ecc71204d062
parent1dbb3884b49c50fc9ab23e825acb169cf28d243e (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>
-rw-r--r--icon-themes/galaxy/sd/res/presenterscreen-Animation.pngbin0 -> 1172 bytes
-rw-r--r--icon-themes/galaxy/sd/res/presenterscreen-Transition.pngbin0 -> 806 bytes
-rw-r--r--officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu28
-rw-r--r--sd/source/ui/app/res_bmp.src10
-rw-r--r--sd/source/ui/inc/res_bmp.hrc2
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx4
-rw-r--r--sdext/source/presenter/PresenterController.cxx42
-rw-r--r--sdext/source/presenter/PresenterController.hxx2
-rw-r--r--sdext/source/presenter/PresenterSlidePreview.cxx40
-rw-r--r--sdext/source/presenter/PresenterSlidePreview.hxx1
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx39
11 files changed, 167 insertions, 1 deletions
diff --git a/icon-themes/galaxy/sd/res/presenterscreen-Animation.png b/icon-themes/galaxy/sd/res/presenterscreen-Animation.png
new file mode 100644
index 000000000000..e4544288cf67
--- /dev/null
+++ b/icon-themes/galaxy/sd/res/presenterscreen-Animation.png
Binary files differ
diff --git a/icon-themes/galaxy/sd/res/presenterscreen-Transition.png b/icon-themes/galaxy/sd/res/presenterscreen-Transition.png
new file mode 100644
index 000000000000..38b49aed64c6
--- /dev/null
+++ b/icon-themes/galaxy/sd/res/presenterscreen-Transition.png
Binary files differ
diff --git a/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu b/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu
index 29825fce763c..3eb64342c052 100644
--- a/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu
@@ -651,6 +651,34 @@
<value>bitmaps/ScrollbarArrowDownDisabled.png</value>
</prop>
</node>
+ <node oor:name="animation" oor:op="replace">
+ <prop oor:name="Name">
+ <value>Animation</value>
+ </prop>
+ <prop oor:name="NormalFileName">
+ <value>bitmaps/Animation.png</value>
+ </prop>
+ <prop oor:name="MouseOverFileName">
+ <value>bitmaps/Animation.png</value>
+ </prop>
+ <prop oor:name="DisabledFileName">
+ <value>bitmaps/Animation.png</value>
+ </prop>
+ </node>
+ <node oor:name="Transition" oor:op="replace">
+ <prop oor:name="Name">
+ <value>Transition</value>
+ </prop>
+ <prop oor:name="NormalFileName">
+ <value>bitmaps/Transition.png</value>
+ </prop>
+ <prop oor:name="MouseOverFileName">
+ <value>bitmaps/Transition.png</value>
+ </prop>
+ <prop oor:name="DisabledFileName">
+ <value>bitmaps/Transition.png</value>
+ </prop>
+ </node>
<node oor:name="pagervertical" oor:op="replace">
<prop oor:name="Name">
<value>PagerVertical</value>
diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src
index 246f23092e6f..ba42bb5683a8 100644
--- a/sd/source/ui/app/res_bmp.src
+++ b/sd/source/ui/app/res_bmp.src
@@ -385,6 +385,16 @@ Bitmap BMP_PRESENTERSCREEN_BACKGROUND
File = "presenterscreen-Background.png";
};
+Bitmap BMP_PRESENTERSCREEN_ANIMATION
+{
+ File = "presenterscreen-Animation.png";
+};
+
+Bitmap BMP_PRESENTERSCREEN_TRANSITION
+{
+ File = "presenterscreen-Transition.png";
+};
+
Bitmap BMP_PRESENTERSCREEN_BORDER_RIGHT
{
File = "presenterscreen-BorderRight.png";
diff --git a/sd/source/ui/inc/res_bmp.hrc b/sd/source/ui/inc/res_bmp.hrc
index a2a2b0354010..22dbaa037401 100644
--- a/sd/source/ui/inc/res_bmp.hrc
+++ b/sd/source/ui/inc/res_bmp.hrc
@@ -185,6 +185,8 @@
#define BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_MOUSE_OVER (RID_SD_START+588)
#define BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_NORMAL (RID_SD_START+589)
#define BMP_PRESENTERSCREEN_VIEW_BACKGROUND (RID_SD_START+590)
+#define BMP_PRESENTERSCREEN_ANIMATION (RID_SD_START+591)
+#define BMP_PRESENTERSCREEN_TRANSITION (RID_SD_START+592)
// ResourceIDs for Popup-Menus do not need a dummy string!!!
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index e83c033e8e90..d1180ccfe8bc 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -259,6 +259,10 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
static IdMapEntry const map[] = {
{ "bitmaps/Background.png", BMP_PRESENTERSCREEN_BACKGROUND },
+ { "bitmaps/Animation.png",
+ BMP_PRESENTERSCREEN_ANIMATION },
+ { "bitmaps/Transition.png",
+ BMP_PRESENTERSCREEN_TRANSITION },
{ "bitmaps/BorderActiveBottom.png",
BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM },
{ "bitmaps/BorderActiveBottomCallout.png",
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index d0521e453bbf..779f32d21de6 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/presentation/AnimationEffect.hpp>
#include <com/sun/star/presentation/XPresentation.hpp>
#include <com/sun/star/presentation/XPresentationSupplier.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
@@ -577,6 +578,47 @@ Reference<drawing::XDrawPage> PresenterController::GetCurrentSlide (void) const
return mxCurrentSlide;
}
+bool PresenterController::HasTransition (Reference<drawing::XDrawPage>& rxPage)
+{
+ bool bTransition = false;
+ sal_uInt16 aTransitionType = 0;
+ if( rxPage.is() )
+ {
+ Reference<beans::XPropertySet> xSlidePropertySet (rxPage, UNO_QUERY);
+ xSlidePropertySet->getPropertyValue("TransitionType") >>= aTransitionType;
+ if( aTransitionType > 0 )
+ {
+ bTransition = true;
+ }
+ }
+ return bTransition;
+}
+
+bool PresenterController::HasCustomAnimation (Reference<drawing::XDrawPage>& rxPage)
+{
+ bool bCustomAnimation = false;
+ presentation::AnimationEffect aEffect = presentation::AnimationEffect_NONE;
+ presentation::AnimationEffect aTextEffect = presentation::AnimationEffect_NONE;
+ if( rxPage.is() )
+ {
+ sal_uInt32 i, nCount = rxPage->getCount();
+ for ( i = 0; i < nCount; i++ )
+ {
+ Reference<drawing::XShape> xShape(rxPage->getByIndex(i), UNO_QUERY);
+ Reference<beans::XPropertySet> xShapePropertySet(xShape, UNO_QUERY);
+ xShapePropertySet->getPropertyValue("Effect") >>= aEffect;
+ xShapePropertySet->getPropertyValue("TextEffect") >>= aTextEffect;
+ if( aEffect != presentation::AnimationEffect_NONE ||
+ aTextEffect != presentation::AnimationEffect_NONE )
+ {
+ bCustomAnimation = true;
+ break;
+ }
+ }
+ }
+ return bCustomAnimation;
+}
+
void PresenterController::SetAccessibilityActiveState (const bool bIsActive)
{
if ( mbIsAccessibilityActive != bIsActive)
diff --git a/sdext/source/presenter/PresenterController.hxx b/sdext/source/presenter/PresenterController.hxx
index e8b4ec6c2c9a..8f7a713ab97c 100644
--- a/sdext/source/presenter/PresenterController.hxx
+++ b/sdext/source/presenter/PresenterController.hxx
@@ -121,6 +121,8 @@ public:
css::uno::Reference<css::drawing::framework::XConfigurationController>
GetConfigurationController (void) const;
css::uno::Reference<css::drawing::XDrawPage> GetCurrentSlide (void) const;
+ bool HasTransition (css::uno::Reference<css::drawing::XDrawPage>& rxPage);
+ bool HasCustomAnimation (css::uno::Reference<css::drawing::XDrawPage>& rxPage);
void SetAccessibilityActiveState (const bool bIsActive);
bool IsAccessibilityActive (void) const;
diff --git a/sdext/source/presenter/PresenterSlidePreview.cxx b/sdext/source/presenter/PresenterSlidePreview.cxx
index e7b7b51b6594..3055afeccfc0 100644
--- a/sdext/source/presenter/PresenterSlidePreview.cxx
+++ b/sdext/source/presenter/PresenterSlidePreview.cxx
@@ -21,6 +21,8 @@
#include "PresenterCanvasHelper.hxx"
#include "PresenterGeometryHelper.hxx"
#include "PresenterPaintManager.hxx"
+#include "PresenterScrollBar.hxx"
+#include "PresenterBitmapContainer.hxx"
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -96,7 +98,11 @@ PresenterSlidePreview::PresenterSlidePreview (
OUString("com.sun.star.drawing.SlideRenderer"),
rxContext),
UNO_QUERY);
-
+ mpBitmaps.reset(new PresenterBitmapContainer(
+ OUString("PresenterScreenSettings/ScrollBar/Bitmaps"),
+ ::boost::shared_ptr<PresenterBitmapContainer>(),
+ rxContext,
+ mxCanvas));
Resize();
}
@@ -253,6 +259,14 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox)
// Make sure that a preview in the correct size exists.
awt::Rectangle aWindowBox (mxWindow->getPosSize());
+ bool bCustomAnimation = false;
+ bool bTransition = false;
+ if( mxCurrentSlide.is() )
+ {
+ bCustomAnimation = mpPresenterController->HasCustomAnimation(mxCurrentSlide);
+ bTransition = mpPresenterController->HasTransition(mxCurrentSlide);
+ }
+
if ( ! mxPreview.is() && mxCurrentSlide.is())
{
// Create a new preview bitmap.
@@ -311,6 +325,30 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox)
if (mxPreview.is())
{
mxCanvas->drawBitmap(mxPreview, aViewState, aRenderState);
+ if( bTransition )
+ {
+ const awt::Rectangle aTransitionPreviewBox(5, aWindowBox.Height-20, 0, 0);
+ SharedBitmapDescriptor aTransitionDescriptor = mpBitmaps->GetBitmap("Transition");
+ Reference<rendering::XBitmap> xTransitionIcon (aTransitionDescriptor->GetNormalBitmap());
+ rendering::RenderState aTransitionRenderState (
+ geometry::AffineMatrix2D(1, 0, aTransitionPreviewBox.X, 0, 1, aTransitionPreviewBox.Y),
+ NULL,
+ aBackgroundColor,
+ rendering::CompositeOperation::SOURCE);
+ mxCanvas->drawBitmap(xTransitionIcon, aViewState, aTransitionRenderState);
+ }
+ if( bCustomAnimation )
+ {
+ const awt::Rectangle aAnimationPreviewBox(5, aWindowBox.Height-40, 0, 0);
+ SharedBitmapDescriptor aAnimationDescriptor = mpBitmaps->GetBitmap("Animation");
+ Reference<rendering::XBitmap> xAnimationIcon (aAnimationDescriptor->GetNormalBitmap());
+ rendering::RenderState aAnimationRenderState (
+ geometry::AffineMatrix2D(1, 0, aAnimationPreviewBox.X, 0, 1, aAnimationPreviewBox.Y),
+ NULL,
+ aBackgroundColor,
+ rendering::CompositeOperation::SOURCE);
+ mxCanvas->drawBitmap(xAnimationIcon, aViewState, aAnimationRenderState);
+ }
}
else
{
diff --git a/sdext/source/presenter/PresenterSlidePreview.hxx b/sdext/source/presenter/PresenterSlidePreview.hxx
index d98a4860ac19..d6117d19a173 100644
--- a/sdext/source/presenter/PresenterSlidePreview.hxx
+++ b/sdext/source/presenter/PresenterSlidePreview.hxx
@@ -123,6 +123,7 @@ private:
size.
*/
css::uno::Reference<css::rendering::XBitmap> mxPreview;
+ boost::shared_ptr<PresenterBitmapContainer> mpBitmaps;
/** The current slide for which a preview is displayed. This may or
may not be the same as the current slide of the PresenterView.
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);
+ }
}
}