summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-28 19:48:41 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:35:15 +0000
commitb0950b157859c63561958d894f3363ccc9cad8c4 (patch)
tree7aff0bd46b9824a74d5f855f62b5bc3f6b9059ba
parent77d5491e15c96b5864fccd3ffc3d6a7b90e93367 (diff)
Remove CycleMode enum
to never takes any value other than NORMAL Change-Id: I9558ee8864537c695ce1172a0cfad421d5f591ee Reviewed-on: https://gerrit.libreoffice.org/25587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/vcl/animate.hxx12
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx28
-rw-r--r--vcl/source/gdi/animate.cxx7
3 files changed, 2 insertions, 45 deletions
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 73cc12def8c6..3c67aa6c7886 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -34,15 +34,6 @@ enum class Disposal
Previous
};
-enum CycleMode
-{
- CYCLE_NOT,
- CYCLE_NORMAL,
- CYCLE_FALLBACK,
- CYCLE_REVERS,
- CYCLE_REVERS_FALLBACK
-};
-
struct VCL_DLLPUBLIC AnimationBitmap
{
BitmapEx aBmpEx;
@@ -131,8 +122,6 @@ public:
void SetLoopCount( const sal_uLong nLoopCount );
void ResetLoopCount();
- CycleMode GetCycleMode() const { return meCycleMode; }
-
void SetNotifyHdl( const Link<Animation*,void>& rLink ) { maNotifyLink = rLink; }
const Link<Animation*,void>& GetNotifyHdl() const { return maNotifyLink; }
@@ -190,7 +179,6 @@ private:
long mnLoopCount;
long mnLoops;
size_t mnPos;
- CycleMode meCycleMode;
bool mbIsInAnimation;
bool mbLoopTerminated;
bool mbIsWaiting;
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index eb633515cc21..e47d1bdf2818 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -291,32 +291,8 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
pVDevMask->SetOutputSizePixel( aAnimSize );
pVDevMask->EnableMapMode( false );
- switch( aAnimation.GetCycleMode() )
- {
- case CYCLE_NOT:
- o_rLoopCount = 1;
- o_eCycleMode = CYCLE_LOOP;
- break;
-
- case CYCLE_FALLBACK:
- // FALLTHROUGH intended
- case CYCLE_NORMAL:
- o_rLoopCount = aAnimation.GetLoopCount();
- o_eCycleMode = CYCLE_LOOP;
- break;
-
- case CYCLE_REVERS:
- // FALLTHROUGH intended
- case CYCLE_REVERS_FALLBACK:
- o_rLoopCount = aAnimation.GetLoopCount();
- o_eCycleMode = CYCLE_PINGPONGLOOP;
- break;
-
- default:
- ENSURE_OR_RETURN_FALSE(false,
- "getAnimationFromGraphic(): Unexpected case" );
- break;
- }
+ o_rLoopCount = aAnimation.GetLoopCount();
+ o_eCycleMode = CYCLE_LOOP;
for( sal_uInt16 i=0, nCount=aAnimation.Count(); i<nCount; ++i )
{
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 67d9b7dda9ea..133bb916399a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -65,7 +65,6 @@ Animation::Animation() :
mnLoopCount ( 0 ),
mnLoops ( 0 ),
mnPos ( 0 ),
- meCycleMode ( CYCLE_NORMAL ),
mbIsInAnimation ( false ),
mbLoopTerminated ( false ),
mbIsWaiting ( false )
@@ -78,7 +77,6 @@ Animation::Animation( const Animation& rAnimation ) :
maGlobalSize ( rAnimation.maGlobalSize ),
mnLoopCount ( rAnimation.mnLoopCount ),
mnPos ( rAnimation.mnPos ),
- meCycleMode ( rAnimation.meCycleMode ),
mbIsInAnimation ( false ),
mbLoopTerminated ( rAnimation.mbLoopTerminated ),
mbIsWaiting ( rAnimation.mbIsWaiting )
@@ -113,7 +111,6 @@ Animation& Animation::operator=( const Animation& rAnimation )
maGlobalSize = rAnimation.maGlobalSize;
maBitmapEx = rAnimation.maBitmapEx;
- meCycleMode = rAnimation.meCycleMode;
mnLoopCount = rAnimation.mnLoopCount;
mnPos = rAnimation.mnPos;
mbLoopTerminated = rAnimation.mbLoopTerminated;
@@ -131,7 +128,6 @@ bool Animation::operator==( const Animation& rAnimation ) const
if( rAnimation.maList.size() == nCount
&& rAnimation.maBitmapEx == maBitmapEx
&& rAnimation.maGlobalSize == maGlobalSize
- && rAnimation.meCycleMode == meCycleMode
)
{
bRet = true;
@@ -219,9 +215,6 @@ BitmapChecksum Animation::GetChecksum() const
UInt32ToSVBT32( maGlobalSize.Height(), aBT32 );
nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
- UInt32ToSVBT32( (long) meCycleMode, aBT32 );
- nCrc = vcl_get_checksum( nCrc, aBT32, 4 );
-
for(const AnimationBitmap* i : maList)
{
BCToBCOA( i->GetChecksum(), aBCOA );