LibreOffice Module slideshow (master) 1
animationtransformnode.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20
21#include <com/sun/star/animations/AnimationTransformType.hpp>
22
24#include <animationfactory.hxx>
25#include <activitiesfactory.hxx>
26
27using namespace com::sun::star;
28
29namespace slideshow::internal {
30
32{
33 mxTransformNode.clear();
35}
36
38{
40
41 const sal_Int16 nTransformType( mxTransformNode->getTransformType() );
42
43 const AttributableShapeSharedPtr& rShape( getShape() );
44
45 switch( nTransformType )
46 {
47 default:
48 throw css::uno::RuntimeException(
49 "AnimationTransformNode::createTransformActivity(): "
50 "Unknown transform type" );
51
52 case animations::AnimationTransformType::TRANSLATE:
53 case animations::AnimationTransformType::SCALE:
55 aParms,
57 rShape,
60 nTransformType, 0 ),
62
63 case animations::AnimationTransformType::ROTATE:
65 aParms,
67 "Rotate",
68 rShape,
73
74 case animations::AnimationTransformType::SKEWX:
76 aParms,
78 "SkewX",
79 rShape,
84
85 case animations::AnimationTransformType::SKEWY:
87 aParms,
89 "SkewY",
90 rShape,
95 }
96}
97
98} // namespace slideshow::internal
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
box2d::utils::Box2DWorldSharedPtr mpBox2DWorld
AttributableShapeSharedPtr const & getShape() const
::basegfx::B2DVector const & getSlideSize() const
virtual void dispose() override
Dispose all object references.
css::uno::Reference< css::animations::XAnimate > const & getXAnimateNode() const
ActivitiesFactory::CommonParameters fillCommonParameters() const
Create parameter struct for ActivitiesFactory.
virtual void dispose() override
Dispose all object references.
virtual AnimationActivitySharedPtr createActivity() const override
css::uno::Reference< css::animations::XAnimateTransform > mxTransformNode
SlideShowContext const & getContext() const
Definition: basenode.hxx:135
AnimationActivitySharedPtr createAnimateActivity(const CommonParameters &rParms, const NumberAnimationSharedPtr &rAnimator, const css::uno::Reference< css::animations::XAnimate > &xNode)
Create an activity from an XAnimate node.
NumberAnimationSharedPtr createNumberPropertyAnimation(const OUString &rAttrName, const AnimatableShapeSharedPtr &rShape, const ShapeManagerSharedPtr &rShapeManager, const ::basegfx::B2DVector &rSlideSize, const box2d::utils::Box2DWorldSharedPtr &pBox2DWorld, int nFlags=0)
PairAnimationSharedPtr createPairPropertyAnimation(const AnimatableShapeSharedPtr &rShape, const ShapeManagerSharedPtr &rShapeManager, const ::basegfx::B2DVector &rSlideSize, sal_Int16 nTransformType, int nFlags)
Create scale or move animation.
::std::shared_ptr< AnimationActivity > AnimationActivitySharedPtr
::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr
std::shared_ptr< SubsettableShapeManager > mpSubsettableShapeManager
Definition: slideimpl.cxx:199