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>
25 #include "propertyanimationnode.hxx"
26 #include "animationfactory.hxx"
28 using namespace com::sun::star
;
33 AnimationActivitySharedPtr
PropertyAnimationNode::createActivity() const
35 // Create AnimationActivity from common XAnimate parameters:
36 ActivitiesFactory::CommonParameters
aParms( fillCommonParameters() );
37 uno::Reference
<animations::XAnimate
> const& xAnimateNode
=getXAnimateNode();
38 OUString
const attrName( xAnimateNode
->getAttributeName() );
39 AttributableShapeSharedPtr
const pShape( getShape() );
41 switch (AnimationFactory::classifyAttributeName( attrName
)) {
43 case AnimationFactory::CLASS_UNKNOWN_PROPERTY
:
46 "Unexpected attribute class (unknown or empty attribute name)" );
49 case AnimationFactory::CLASS_NUMBER_PROPERTY
:
50 return ActivitiesFactory::createAnimateActivity(
52 AnimationFactory::createNumberPropertyAnimation(
55 getContext().mpSubsettableShapeManager
,
59 case AnimationFactory::CLASS_ENUM_PROPERTY
:
60 return ActivitiesFactory::createAnimateActivity(
62 AnimationFactory::createEnumPropertyAnimation(
65 getContext().mpSubsettableShapeManager
,
69 case AnimationFactory::CLASS_COLOR_PROPERTY
:
70 return ActivitiesFactory::createAnimateActivity(
72 AnimationFactory::createColorPropertyAnimation(
75 getContext().mpSubsettableShapeManager
,
79 case AnimationFactory::CLASS_STRING_PROPERTY
:
80 return ActivitiesFactory::createAnimateActivity(
82 AnimationFactory::createStringPropertyAnimation(
85 getContext().mpSubsettableShapeManager
,
89 case AnimationFactory::CLASS_BOOL_PROPERTY
:
90 return ActivitiesFactory::createAnimateActivity(
92 AnimationFactory::createBoolPropertyAnimation(
95 getContext().mpSubsettableShapeManager
,
100 return AnimationActivitySharedPtr();
103 } // namespace internal
104 } // namespace slideshow
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */