diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2019-07-20 15:55:15 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-06-30 11:33:58 +0200 |
commit | 8f16718731ee47535a62e61af99b43a09626c65f (patch) | |
tree | 16392dec8180483905731b5121d85476c278fcdc | |
parent | 3258bfd178749fd3deb06d852389554c69299c1e (diff) |
vcl: clarify variable in Animation::Animation() loop
Change-Id: Ia7e211298896c40b92cf13c81302d30ddb661cb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76404
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | vcl/source/animate/Animation.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index 05924660fb16..b0270c194c95 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -53,8 +53,8 @@ Animation::Animation(const Animation& rAnimation) , mbIsInAnimation(false) , mbLoopTerminated(rAnimation.mbLoopTerminated) { - for (auto const& i : rAnimation.maFrames) - maFrames.emplace_back(new AnimationBitmap(*i)); + for (auto const& rFrame : rAnimation.maFrames) + maFrames.emplace_back(new AnimationBitmap(*rFrame)); maTimer.SetInvokeHandler(LINK(this, Animation, ImplTimeoutHdl)); mnLoops = mbLoopTerminated ? 0 : mnLoopCount; @@ -248,9 +248,13 @@ void Animation::Draw(OutputDevice& rOut, const Point& rDestPt, const Size& rDest AnimationBitmap* pObj = maFrames[std::min(mnPos, nCount - 1)].get(); if (rOut.GetConnectMetaFile() || (rOut.GetOutDevType() == OUTDEV_PRINTER)) + { maFrames[0]->maBitmapEx.Draw(&rOut, rDestPt, rDestSz); + } else if (ANIMATION_TIMEOUT_ON_CLICK == pObj->mnWait) + { pObj->maBitmapEx.Draw(&rOut, rDestPt, rDestSz); + } else { const size_t nOldPos = mnPos; |