[Libreoffice-commits] core.git: include/vcl slideshow/source vcl/source

Noel Grandin noelgrandin at gmail.com
Mon May 30 06:35:51 UTC 2016


 include/vcl/animate.hxx                        |   12 ----------
 slideshow/source/engine/shapes/gdimtftools.cxx |   28 +------------------------
 vcl/source/gdi/animate.cxx                     |    7 ------
 3 files changed, 2 insertions(+), 45 deletions(-)

New commits:
commit b0950b157859c63561958d894f3363ccc9cad8c4
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sat May 28 19:48:41 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 73cc12d..3c67aa6 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 eb63351..e47d1bd 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 67d9b7d..133bb91 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 );


More information about the Libreoffice-commits mailing list