summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/primitive2d/animatedprimitive2d.cxx')
-rw-r--r--drawinglayer/source/primitive2d/animatedprimitive2d.cxx40
1 files changed, 23 insertions, 17 deletions
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index d2c8d4a6571a..87f524180fbe 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -37,9 +37,9 @@ namespace drawinglayer::primitive2d
AnimatedSwitchPrimitive2D::AnimatedSwitchPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DContainer& rChildren,
+ Primitive2DContainer&& aChildren,
bool bIsTextAnimation)
- : GroupPrimitive2D(rChildren),
+ : GroupPrimitive2D(std::move(aChildren)),
mbIsTextAnimation(bIsTextAnimation)
{
// clone given animation description
@@ -76,12 +76,14 @@ namespace drawinglayer::primitive2d
nIndex = nLen - 1;
}
- const Primitive2DReference xRef(getChildren()[nIndex], uno::UNO_SET_THROW);
- rVisitor.append(xRef);
+ rVisitor.visit(getChildren()[nIndex]);
}
// provide unique ID
- ImplPrimitive2DIDBlock(AnimatedSwitchPrimitive2D, PRIMITIVE2D_ID_ANIMATEDSWITCHPRIMITIVE2D)
+ sal_uInt32 AnimatedSwitchPrimitive2D::getPrimitive2DID() const
+ {
+ return PRIMITIVE2D_ID_ANIMATEDSWITCHPRIMITIVE2D;
+ }
} // end of namespace drawinglayer::primitive2d
@@ -90,8 +92,8 @@ namespace drawinglayer::primitive2d
{
AnimatedBlinkPrimitive2D::AnimatedBlinkPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DContainer& rChildren)
- : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, true/*bIsTextAnimation*/)
+ Primitive2DContainer&& aChildren)
+ : AnimatedSwitchPrimitive2D(rAnimationEntry, std::move(aChildren), true/*bIsTextAnimation*/)
{
}
@@ -109,7 +111,10 @@ namespace drawinglayer::primitive2d
}
// provide unique ID
- ImplPrimitive2DIDBlock(AnimatedBlinkPrimitive2D, PRIMITIVE2D_ID_ANIMATEDBLINKPRIMITIVE2D)
+ sal_uInt32 AnimatedBlinkPrimitive2D::getPrimitive2DID() const
+ {
+ return PRIMITIVE2D_ID_ANIMATEDBLINKPRIMITIVE2D;
+ }
} // end of namespace drawinglayer::primitive2d
@@ -119,17 +124,16 @@ namespace drawinglayer::primitive2d
AnimatedInterpolatePrimitive2D::AnimatedInterpolatePrimitive2D(
const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack,
const animation::AnimationEntry& rAnimationEntry,
- const Primitive2DContainer& rChildren)
- : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, true/*bIsTextAnimation*/),
- maMatrixStack()
+ Primitive2DContainer&& aChildren)
+ : AnimatedSwitchPrimitive2D(rAnimationEntry, std::move(aChildren), true/*bIsTextAnimation*/)
{
// copy matrices to locally pre-decomposed matrix stack
const sal_uInt32 nCount(rmMatrixStack.size());
maMatrixStack.reserve(nCount);
- for(sal_uInt32 a(0); a < nCount; a++)
+ for(const auto& a : rmMatrixStack)
{
- maMatrixStack.emplace_back(rmMatrixStack[a]);
+ maMatrixStack.emplace_back(a);
}
}
@@ -179,8 +183,8 @@ namespace drawinglayer::primitive2d
}
// create new transform primitive reference, return new sequence
- const Primitive2DReference xRef(new TransformPrimitive2D(aTargetTransform, getChildren()));
- rVisitor.append(xRef);
+ Primitive2DReference xRef(new TransformPrimitive2D(aTargetTransform, Primitive2DContainer(getChildren())));
+ rVisitor.visit(xRef);
}
else
{
@@ -189,8 +193,10 @@ namespace drawinglayer::primitive2d
}
// provide unique ID
- ImplPrimitive2DIDBlock(AnimatedInterpolatePrimitive2D, PRIMITIVE2D_ID_ANIMATEDINTERPOLATEPRIMITIVE2D)
-
+ sal_uInt32 AnimatedInterpolatePrimitive2D::getPrimitive2DID() const
+ {
+ return PRIMITIVE2D_ID_ANIMATEDINTERPOLATEPRIMITIVE2D;
+ }
} // end of namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */