summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-27 12:26:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-27 13:32:53 +0100
commit81047eaebc0e25ff926bf944c57e082a8727c7f2 (patch)
treeaa7d706ce0ed855c00e31a711c5c762b9bf62a0e /vcl
parentae11dafc89a1f748233500ea0fd89cff4ef7378c (diff)
make animation loop sal_uInt32 consistently
all this foo is ultimately animated gifs and the count there is limited to unsigned 16bit Change-Id: Ib6e6dde7355f3619bb7735743e686e6338a235ee
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/impgraph.hxx2
-rw-r--r--vcl/source/gdi/animate.cxx4
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx5
4 files changed, 6 insertions, 7 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index f5982f84cb2d..1dc5adc30ab5 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -115,7 +115,7 @@ private:
void ImplSetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
Link<Animation*,void> ImplGetAnimationNotifyHdl() const;
- sal_uLong ImplGetAnimationLoopCount() const;
+ sal_uInt32 ImplGetAnimationLoopCount() const;
private:
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index b7f335628aef..6b96cb971eca 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -510,7 +510,7 @@ void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, sal_uInt16
}
}
-void Animation::SetLoopCount( const sal_uLong nLoopCount )
+void Animation::SetLoopCount(const sal_uInt32 nLoopCount)
{
mnLoopCount = nLoopCount;
ResetLoopCount();
@@ -767,7 +767,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
rIStm.ReadUInt16( nTmp16 ); aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 );
rIStm.ReadUInt16( nTmp16 ); aAnimBmp.eDisposal = ( Disposal) nTmp16;
rIStm.ReadCharAsBool( cTmp ); aAnimBmp.bUserInput = cTmp;
- rIStm.ReadUInt32( nTmp32 ); rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
+ rIStm.ReadUInt32( rAnimation.mnLoopCount );
rIStm.ReadUInt32( nTmp32 ); // Unused
rIStm.ReadUInt32( nTmp32 ); // Unused
rIStm.ReadUInt32( nTmp32 ); // Unused
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index b36c5300f4d5..6452e08660fa 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -484,7 +484,7 @@ Link<Animation*,void> Graphic::GetAnimationNotifyHdl() const
return mxImpGraphic->ImplGetAnimationNotifyHdl();
}
-sal_uLong Graphic::GetAnimationLoopCount() const
+sal_uInt32 Graphic::GetAnimationLoopCount() const
{
return mxImpGraphic->ImplGetAnimationLoopCount();
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index e782e71ebff3..812e504880ab 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -947,12 +947,11 @@ Link<Animation*,void> ImpGraphic::ImplGetAnimationNotifyHdl() const
return aLink;
}
-sal_uLong ImpGraphic::ImplGetAnimationLoopCount() const
+sal_uInt32 ImpGraphic::ImplGetAnimationLoopCount() const
{
- return( mpAnimation ? mpAnimation->GetLoopCount() : 0UL );
+ return( mpAnimation ? mpAnimation->GetLoopCount() : 0 );
}
-
void ImpGraphic::ImplSetContext( const std::shared_ptr<GraphicReader>& pReader )
{
mpContext = pReader;