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 .
21 #include <com/sun/star/animations/AnimationTransformType.hpp>
23 #include "animationtransformnode.hxx"
24 #include <animationfactory.hxx>
25 #include <activitiesfactory.hxx>
27 using namespace com::sun::star
;
32 void AnimationTransformNode::dispose()
34 mxTransformNode
.clear();
35 AnimationBaseNode::dispose();
38 AnimationActivitySharedPtr
AnimationTransformNode::createActivity() const
40 ActivitiesFactory::CommonParameters
aParms( fillCommonParameters() );
42 const sal_Int16
nTransformType( mxTransformNode
->getTransformType() );
44 const AttributableShapeSharedPtr
& rShape( getShape() );
46 switch( nTransformType
)
50 false, "AnimationTransformNode::createTransformActivity(): "
51 "Unknown transform type" );
53 case animations::AnimationTransformType::TRANSLATE
:
54 // FALLTHROUGH intended
55 case animations::AnimationTransformType::SCALE
:
56 return ActivitiesFactory::createAnimateActivity(
58 AnimationFactory::createPairPropertyAnimation(
60 getContext().mpSubsettableShapeManager
,
65 case animations::AnimationTransformType::ROTATE
:
66 return ActivitiesFactory::createAnimateActivity(
68 AnimationFactory::createNumberPropertyAnimation(
71 getContext().mpSubsettableShapeManager
,
75 case animations::AnimationTransformType::SKEWX
:
76 return ActivitiesFactory::createAnimateActivity(
78 AnimationFactory::createNumberPropertyAnimation(
81 getContext().mpSubsettableShapeManager
,
85 case animations::AnimationTransformType::SKEWY
:
86 return ActivitiesFactory::createAnimateActivity(
88 AnimationFactory::createNumberPropertyAnimation(
91 getContext().mpSubsettableShapeManager
,
97 } // namespace internal
98 } // namespace slideshow
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */