Branch data Line data Source code
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 : : #ifndef OOX_PPT_ANIMATIONPERSIST
22 : : #define OOX_PPT_ANIMATIONPERSIST
23 : :
24 : : #include <list>
25 : : #include <boost/shared_ptr.hpp>
26 : : #include <boost/array.hpp>
27 : :
28 : : #include <rtl/ustring.hxx>
29 : :
30 : : #include <com/sun/star/uno/Any.hxx>
31 : : #include <com/sun/star/drawing/XShape.hpp>
32 : :
33 : : #include "oox/drawingml/drawingmltypes.hxx"
34 : : #include "oox/ppt/slidepersist.hxx"
35 : :
36 : : namespace oox { namespace ppt {
37 : :
38 : : enum {
39 : : NP_TO = 0,
40 : : NP_FROM, NP_BY, NP_USERDATA, NP_ATTRIBUTENAME,
41 : : NP_ACCELERATION, NP_AUTOREVERSE, NP_DECELERATE, NP_DURATION, NP_FILL,
42 : : NP_REPEATCOUNT, NP_REPEATDURATION, NP_RESTART,
43 : : NP_DIRECTION, NP_COLORINTERPOLATION, NP_CALCMODE, NP_TRANSFORMTYPE,
44 : : NP_PATH,
45 : : NP_ENDSYNC, NP_ITERATETYPE, NP_ITERATEINTERVAL,
46 : : NP_SUBITEM, NP_TARGET, NP_COMMAND, NP_PARAMETER,
47 : : NP_VALUES, NP_FORMULA, NP_KEYTIMES, NP_DISPLAY,
48 : : _NP_SIZE
49 : : };
50 : :
51 : : typedef boost::array< ::com::sun::star::uno::Any, _NP_SIZE > NodePropertyMap;
52 : :
53 : :
54 : : /** data for CT_TLShapeTargetElement */
55 : 0 : struct ShapeTargetElement
56 : : {
57 : 0 : ShapeTargetElement()
58 : 0 : : mnType( 0 )
59 : 0 : {}
60 : : void convert( ::com::sun::star::uno::Any & aAny, sal_Int16 & rSubType ) const;
61 : :
62 : : sal_Int32 mnType;
63 : : sal_Int32 mnRangeType;
64 : : drawingml::IndexRange maRange;
65 : : ::rtl::OUString msSubShapeId;
66 : : };
67 : :
68 : :
69 : : /** data for CT_TLTimeTargetElement */
70 : 0 : struct AnimTargetElement
71 : : {
72 : 0 : AnimTargetElement()
73 : 0 : : mnType( 0 )
74 : 0 : {}
75 : : /** convert to a set of properties */
76 : : ::com::sun::star::uno::Any convert(const SlidePersistPtr & pSlide, sal_Int16 & nSubType) const;
77 : :
78 : : sal_Int32 mnType;
79 : : ::rtl::OUString msValue;
80 : :
81 : : ShapeTargetElement maShapeTarget;
82 : : };
83 : :
84 : : typedef boost::shared_ptr< AnimTargetElement > AnimTargetElementPtr;
85 : :
86 : : struct AnimationCondition;
87 : :
88 : : typedef ::std::list< AnimationCondition > AnimationConditionList;
89 : :
90 : : /** data for CT_TLTimeCondition */
91 [ # # # ]: 3 : struct AnimationCondition
[ + - ]
92 : : {
93 : 3 : AnimationCondition()
94 [ + - ]: 3 : : mnType( 0 )
95 : 3 : {}
96 : :
97 : : ::com::sun::star::uno::Any convert(const SlidePersistPtr & pSlide) const;
98 : : static ::com::sun::star::uno::Any convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l);
99 : :
100 : 0 : AnimTargetElementPtr & getTarget()
101 [ # # ]: 0 : { if(!mpTarget) mpTarget.reset( new AnimTargetElement ); return mpTarget; }
102 : : ::com::sun::star::uno::Any maValue;
103 : : sal_Int32 mnType;
104 : : private:
105 : : AnimTargetElementPtr mpTarget;
106 : : };
107 : :
108 : :
109 : 0 : struct TimeAnimationValue
110 : : {
111 : : ::rtl::OUString msFormula;
112 : : ::rtl::OUString msTime;
113 : : ::com::sun::star::uno::Any maValue;
114 : : };
115 : :
116 : : typedef ::std::list< TimeAnimationValue > TimeAnimationValueList;
117 : :
118 : : } }
119 : :
120 : :
121 : :
122 : :
123 : :
124 : : #endif
125 : :
126 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|