1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <canvas/debug.hxx>
23 #include <canvas/verbosetrace.hxx>
24 #include <com/sun/star/animations/AnimationTransformType.hpp>
26 #include "animationtransformnode.hxx"
27 #include "animationfactory.hxx"
28 #include "activitiesfactory.hxx"
30 using namespace com::sun::star
;
35 void AnimationTransformNode::dispose()
37 mxTransformNode
.clear();
38 AnimationBaseNode::dispose();
41 AnimationActivitySharedPtr
AnimationTransformNode::createActivity() const
43 ActivitiesFactory::CommonParameters
aParms( fillCommonParameters() );
45 const sal_Int16
nTransformType( mxTransformNode
->getTransformType() );
47 const AttributableShapeSharedPtr
& rShape( getShape() );
49 switch( nTransformType
)
53 false, "AnimationTransformNode::createTransformActivity(): "
54 "Unknown transform type" );
56 case animations::AnimationTransformType::TRANSLATE
:
57 // FALLTHROUGH intended
58 case animations::AnimationTransformType::SCALE
:
59 return ActivitiesFactory::createAnimateActivity(
61 AnimationFactory::createPairPropertyAnimation(
63 getContext().mpSubsettableShapeManager
,
68 case animations::AnimationTransformType::ROTATE
:
69 return ActivitiesFactory::createAnimateActivity(
71 AnimationFactory::createNumberPropertyAnimation(
74 getContext().mpSubsettableShapeManager
,
78 case animations::AnimationTransformType::SKEWX
:
79 return ActivitiesFactory::createAnimateActivity(
81 AnimationFactory::createNumberPropertyAnimation(
84 getContext().mpSubsettableShapeManager
,
88 case animations::AnimationTransformType::SKEWY
:
89 return ActivitiesFactory::createAnimateActivity(
91 AnimationFactory::createNumberPropertyAnimation(
94 getContext().mpSubsettableShapeManager
,
100 } // namespace internal
101 } // namespace slideshow
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */