summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-04-15 13:46:46 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-04-15 21:36:35 +0200
commit0ae0301d1cd6e690473f932411ca880c20f45e13 (patch)
tree40062bb70f050a64c14835c2a52e36ae97ac3985 /slideshow
parent2a594eb22bfed62fdbcef51a56c2c180bea0283f (diff)
Slideshow: remove unneded function duplicates
Change-Id: I682ae771f13e42dd1a4e1cf6a1ee062a5eca640f
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/appletshape.cxx25
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.cxx43
-rw-r--r--slideshow/source/engine/shapes/mediashape.cxx26
-rw-r--r--slideshow/source/inc/externalshapebase.hxx28
4 files changed, 34 insertions, 88 deletions
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx
index f5de6d81a68c..85ec41f6b8f0 100644
--- a/slideshow/source/engine/shapes/appletshape.cxx
+++ b/slideshow/source/engine/shapes/appletshape.cxx
@@ -96,11 +96,11 @@ namespace slideshow
virtual bool implRender( const ::basegfx::B2DRange& rCurrBounds ) const SAL_OVERRIDE;
virtual void implViewChanged( const UnoViewSharedPtr& rView ) SAL_OVERRIDE;
virtual void implViewsChanged() SAL_OVERRIDE;
- virtual bool implStartIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implEndIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implPauseIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implIsIntrinsicAnimationPlaying() const SAL_OVERRIDE;
- virtual void implSetIntrinsicAnimationTime(double) SAL_OVERRIDE;
+ virtual void play() SAL_OVERRIDE;
+ virtual void stop() SAL_OVERRIDE;
+ virtual void pause() SAL_OVERRIDE;
+ virtual bool isPlaying() const SAL_OVERRIDE;
+ virtual void setMediaTime(double) SAL_OVERRIDE;
const OUString maServiceName;
const char** mpPropCopyTable;
@@ -250,7 +250,7 @@ namespace slideshow
- bool AppletShape::implStartIntrinsicAnimation()
+ void AppletShape::play()
{
::std::for_each( maViewAppletShapes.begin(),
maViewAppletShapes.end(),
@@ -258,42 +258,37 @@ namespace slideshow
_1,
::boost::cref( getBounds() )));
mbIsPlaying = true;
-
- return true;
}
- bool AppletShape::implEndIntrinsicAnimation()
+ void AppletShape::stop()
{
::std::for_each( maViewAppletShapes.begin(),
maViewAppletShapes.end(),
::boost::mem_fn( &ViewAppletShape::endApplet ) );
mbIsPlaying = false;
-
- return true;
}
- bool AppletShape::implPauseIntrinsicAnimation()
+ void AppletShape::pause()
{
// TODO(F1): any way of temporarily disabling/deactivating
// applets?
- return true;
}
- bool AppletShape::implIsIntrinsicAnimationPlaying() const
+ bool AppletShape::isPlaying() const
{
return mbIsPlaying;
}
- void AppletShape::implSetIntrinsicAnimationTime(double)
+ void AppletShape::setMediaTime(double)
{
// No way of doing this, or?
}
diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx
index 00c0766df8a5..05ad628bc9f5 100644
--- a/slideshow/source/engine/shapes/externalshapebase.cxx
+++ b/slideshow/source/engine/shapes/externalshapebase.cxx
@@ -73,11 +73,13 @@ namespace slideshow
virtual bool enableAnimations() SAL_OVERRIDE
{
- return mrBase.implStartIntrinsicAnimation();
+ mrBase.play();
+ return true;
}
virtual bool disableAnimations() SAL_OVERRIDE
{
- return mrBase.implEndIntrinsicAnimation();
+ mrBase.stop();
+ return true;
}
ExternalShapeBase& mrBase;
@@ -126,43 +128,6 @@ namespace slideshow
return mxShape;
}
-
-
- void ExternalShapeBase::play()
- {
- implStartIntrinsicAnimation();
- }
-
-
-
- void ExternalShapeBase::stop()
- {
- implEndIntrinsicAnimation();
- }
-
-
-
- void ExternalShapeBase::pause()
- {
- implPauseIntrinsicAnimation();
- }
-
-
-
- bool ExternalShapeBase::isPlaying() const
- {
- return implIsIntrinsicAnimationPlaying();
- }
-
-
-
- void ExternalShapeBase::setMediaTime(double fTime)
- {
- implSetIntrinsicAnimationTime(fTime);
- }
-
-
-
bool ExternalShapeBase::update() const
{
return render();
diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx
index f50e84b408aa..ae13af3eee45 100644
--- a/slideshow/source/engine/shapes/mediashape.cxx
+++ b/slideshow/source/engine/shapes/mediashape.cxx
@@ -82,11 +82,11 @@ namespace slideshow
virtual bool implRender( const ::basegfx::B2DRange& rCurrBounds ) const SAL_OVERRIDE;
virtual void implViewChanged( const UnoViewSharedPtr& rView ) SAL_OVERRIDE;
virtual void implViewsChanged() SAL_OVERRIDE;
- virtual bool implStartIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implEndIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implPauseIntrinsicAnimation() SAL_OVERRIDE;
- virtual bool implIsIntrinsicAnimationPlaying() const SAL_OVERRIDE;
- virtual void implSetIntrinsicAnimationTime(double) SAL_OVERRIDE;
+ virtual void play() SAL_OVERRIDE;
+ virtual void stop() SAL_OVERRIDE;
+ virtual void pause() SAL_OVERRIDE;
+ virtual bool isPlaying() const SAL_OVERRIDE;
+ virtual void setMediaTime(double) SAL_OVERRIDE;
/// the list of active view shapes (one for each registered view layer)
typedef ::std::vector< ViewMediaShapeSharedPtr > ViewMediaShapeVector;
@@ -216,53 +216,47 @@ namespace slideshow
- bool MediaShape::implStartIntrinsicAnimation()
+ void MediaShape::play()
{
::std::for_each( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
::boost::mem_fn( &ViewMediaShape::startMedia ) );
mbIsPlaying = true;
-
- return true;
}
- bool MediaShape::implEndIntrinsicAnimation()
+ void MediaShape::stop()
{
::std::for_each( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
::boost::mem_fn( &ViewMediaShape::endMedia ) );
mbIsPlaying = false;
-
- return true;
}
- bool MediaShape::implPauseIntrinsicAnimation()
+ void MediaShape::pause()
{
::std::for_each( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
::boost::mem_fn( &ViewMediaShape::pauseMedia ) );
mbIsPlaying = false;
-
- return true;
}
- bool MediaShape::implIsIntrinsicAnimationPlaying() const
+ bool MediaShape::isPlaying() const
{
return mbIsPlaying;
}
- void MediaShape::implSetIntrinsicAnimationTime(double fTime)
+ void MediaShape::setMediaTime(double fTime)
{
::std::for_each( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
diff --git a/slideshow/source/inc/externalshapebase.hxx b/slideshow/source/inc/externalshapebase.hxx
index 811022805270..67a1c2e03ed4 100644
--- a/slideshow/source/inc/externalshapebase.hxx
+++ b/slideshow/source/inc/externalshapebase.hxx
@@ -67,12 +67,16 @@ namespace slideshow
// animation methods
-
- virtual void play();
- virtual void stop();
- virtual void pause();
- virtual bool isPlaying() const;
- virtual void setMediaTime(double);
+ /// override in derived class to play external viewer
+ virtual void play() = 0;
+ /// override in derived class to stop external viewer
+ virtual void stop() = 0;
+ /// override in derived class to pause external viewer
+ virtual void pause() = 0;
+ /// override in derived class to return status of animation
+ virtual bool isPlaying() const = 0;
+ /// override in derived class to set media time
+ virtual void setMediaTime(double) = 0;
// render methods
@@ -107,18 +111,6 @@ namespace slideshow
/// override in derived class to resize
virtual void implViewsChanged() = 0;
- /// override in derived class to start external viewer
- virtual bool implStartIntrinsicAnimation() = 0;
- /// override in derived class to stop external viewer
- virtual bool implEndIntrinsicAnimation() = 0;
- /// override in derived class to pause external viewer
- virtual bool implPauseIntrinsicAnimation() = 0;
- /// override in derived class to return status of animation
- virtual bool implIsIntrinsicAnimationPlaying() const = 0;
- /// override in derived class to set media time
- virtual void implSetIntrinsicAnimationTime(double) = 0;
-
-
/// The associated XShape
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;