summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2022-06-25 09:31:46 +1000
committerTomaž Vajngerl <quikee@gmail.com>2022-10-12 10:11:25 +0200
commit5f88c66b835718c5cc5f07d21825a5ac6880e458 (patch)
tree5f64fb06fbfeb055503f65ba96fe7b6c2db08212 /vcl
parentff7dd118bdc5d017d2dec28a4e37c3e3a6b97660 (diff)
vcl: extract function CreateAnimationDataItems
Change-Id: Ifc245b570d82d2fcbcd2cbb83cbd43664b228bf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76409 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/animate/Animation.cxx15
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)