fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / engine / animationnodes / animationtransformnode.cxx
blob966ce7fbdfaf3b2e232069895fa3f4fe0a178b6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 // must be first
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;
32 namespace slideshow {
33 namespace internal {
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 )
51 default:
52 ENSURE_OR_THROW(
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(
60 aParms,
61 AnimationFactory::createPairPropertyAnimation(
62 rShape,
63 getContext().mpSubsettableShapeManager,
64 getSlideSize(),
65 nTransformType ),
66 getXAnimateNode() );
68 case animations::AnimationTransformType::ROTATE:
69 return ActivitiesFactory::createAnimateActivity(
70 aParms,
71 AnimationFactory::createNumberPropertyAnimation(
72 OUString("Rotate"),
73 rShape,
74 getContext().mpSubsettableShapeManager,
75 getSlideSize() ),
76 getXAnimateNode() );
78 case animations::AnimationTransformType::SKEWX:
79 return ActivitiesFactory::createAnimateActivity(
80 aParms,
81 AnimationFactory::createNumberPropertyAnimation(
82 OUString("SkewX"),
83 rShape,
84 getContext().mpSubsettableShapeManager,
85 getSlideSize() ),
86 getXAnimateNode() );
88 case animations::AnimationTransformType::SKEWY:
89 return ActivitiesFactory::createAnimateActivity(
90 aParms,
91 AnimationFactory::createNumberPropertyAnimation(
92 OUString("SkewY"),
93 rShape,
94 getContext().mpSubsettableShapeManager,
95 getSlideSize() ),
96 getXAnimateNode() );
100 } // namespace internal
101 } // namespace slideshow
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */