Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / oox / ppt / animationspersist.hxx
bloba10c9c6d573ee3f21d20b7a4fa58d0c14ad3beff
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 #ifndef INCLUDED_OOX_PPT_ANIMATIONSPERSIST_HXX
22 #define INCLUDED_OOX_PPT_ANIMATIONSPERSIST_HXX
24 #include <array>
25 #include <list>
26 #include <memory>
28 #include <com/sun/star/uno/Any.hxx>
29 #include <oox/drawingml/drawingmltypes.hxx>
30 #include <oox/ppt/slidepersist.hxx>
31 #include <rtl/ustring.hxx>
32 #include <sal/types.h>
34 namespace oox { namespace ppt {
36 enum {
37 NP_TO = 0,
38 NP_FROM, NP_BY, NP_USERDATA, NP_ATTRIBUTENAME,
39 NP_ACCELERATION, NP_AUTOREVERSE, NP_DECELERATE, NP_DURATION, NP_FILL,
40 NP_REPEATCOUNT, NP_REPEATDURATION, NP_RESTART,
41 NP_DIRECTION, NP_COLORINTERPOLATION, NP_CALCMODE, NP_TRANSFORMTYPE,
42 NP_PATH,
43 NP_ENDSYNC, NP_ITERATETYPE, NP_ITERATEINTERVAL,
44 NP_SUBITEM, NP_TARGET, NP_COMMAND, NP_PARAMETER,
45 NP_VALUES, NP_FORMULA, NP_KEYTIMES, NP_DISPLAY,
46 NP_SIZE_
49 typedef std::array< css::uno::Any, NP_SIZE_ > NodePropertyMap;
52 /** data for CT_TLShapeTargetElement */
53 struct ShapeTargetElement
55 ShapeTargetElement()
56 : mnType(0)
57 , mnRangeType(0)
59 maRange.start = maRange.end = 0;
61 void convert( css::uno::Any & aAny, sal_Int16 & rSubType ) const;
63 sal_Int32 mnType;
64 sal_Int32 mnRangeType;
65 drawingml::IndexRange maRange;
66 OUString msSubShapeId;
70 /** data for CT_TLTimeTargetElement */
71 struct AnimTargetElement
73 AnimTargetElement()
74 : mnType( 0 )
76 /** convert to a set of properties */
77 css::uno::Any convert(const SlidePersistPtr & pSlide, sal_Int16 & nSubType) const;
79 sal_Int32 mnType;
80 OUString msValue;
81 ShapeTargetElement maShapeTarget;
84 typedef std::shared_ptr< AnimTargetElement > AnimTargetElementPtr;
86 struct AnimationCondition;
88 typedef std::list< AnimationCondition > AnimationConditionList;
90 /** data for CT_TLTimeCondition */
91 struct AnimationCondition
93 AnimationCondition()
94 : mnType( 0 )
97 css::uno::Any convert(const SlidePersistPtr & pSlide) const;
98 static css::uno::Any convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l);
100 AnimTargetElementPtr & getTarget()
101 { if(!mpTarget) mpTarget.reset( new AnimTargetElement ); return mpTarget; }
102 css::uno::Any maValue;
103 sal_Int32 mnType;
104 private:
105 AnimTargetElementPtr mpTarget;
109 struct TimeAnimationValue
111 OUString msFormula;
112 OUString msTime;
113 css::uno::Any maValue;
116 typedef ::std::list< TimeAnimationValue > TimeAnimationValueList;
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */