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 "propertyanimationnode.hxx"
22 #include <animationfactory.hxx>
24 using namespace com::sun::star
;
29 AnimationActivitySharedPtr
PropertyAnimationNode::createActivity() const
31 // Create AnimationActivity from common XAnimate parameters:
32 ActivitiesFactory::CommonParameters
aParms( fillCommonParameters() );
33 uno::Reference
<animations::XAnimate
> const& xAnimateNode
=getXAnimateNode();
34 OUString
const attrName( xAnimateNode
->getAttributeName() );
35 AttributableShapeSharedPtr
const pShape( getShape() );
37 switch (AnimationFactory::classifyAttributeName( attrName
)) {
39 case AnimationFactory::CLASS_UNKNOWN_PROPERTY
:
42 "Unexpected attribute class (unknown or empty attribute name)" );
45 case AnimationFactory::CLASS_NUMBER_PROPERTY
:
46 return ActivitiesFactory::createAnimateActivity(
48 AnimationFactory::createNumberPropertyAnimation(
51 getContext().mpSubsettableShapeManager
,
55 case AnimationFactory::CLASS_ENUM_PROPERTY
:
56 return ActivitiesFactory::createAnimateActivity(
58 AnimationFactory::createEnumPropertyAnimation(
61 getContext().mpSubsettableShapeManager
,
65 case AnimationFactory::CLASS_COLOR_PROPERTY
:
66 return ActivitiesFactory::createAnimateActivity(
68 AnimationFactory::createColorPropertyAnimation(
71 getContext().mpSubsettableShapeManager
,
75 case AnimationFactory::CLASS_STRING_PROPERTY
:
76 return ActivitiesFactory::createAnimateActivity(
78 AnimationFactory::createStringPropertyAnimation(
81 getContext().mpSubsettableShapeManager
,
85 case AnimationFactory::CLASS_BOOL_PROPERTY
:
86 return ActivitiesFactory::createAnimateActivity(
88 AnimationFactory::createBoolPropertyAnimation(
91 getContext().mpSubsettableShapeManager
,
96 return AnimationActivitySharedPtr();
99 } // namespace internal
100 } // namespace slideshow
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */