diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/animate/Animation.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index fb47e9698a3f..5582c3b9a848 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -282,6 +282,18 @@ void Animation::ImplRestartTimer(sal_uLong nTimeout) maTimer.Start(); } +std::vector<std::unique_ptr<AnimationData>> Animation::CreateAnimationDataItems() +{ + std::vector<std::unique_ptr<AnimationData>> aDataItems; + + for (auto const& rItem : maRenderers) + { + aDataItems.emplace_back(rItem->createAnimationData()); + } + + return aDataItems; +} + IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void) { const size_t nAnimCount = maFrames.size(); @@ -293,14 +305,13 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer*, void) if (maNotifyLink.IsSet()) { std::vector<std::unique_ptr<AnimationData>> aDataItems; - // create AnimationData-List for (auto const& i : maRenderers) aDataItems.emplace_back(i->createAnimationData()); maNotifyLink.Call(this); // set view state from AnimationData structure - for (auto& pDataItem : aDataItems) + for (auto& pDataItem : CreateAnimationDataItems()) { AnimationRenderer* pRenderer = nullptr; if (!pDataItem->mpRendererData) |