cid#1640473 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / sd / source / filter / ppt / pptanimations.hxx
blob7fda1bb68d20607a2e93047ab70133a45e1aab08
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 .
20 #pragma once
22 #include <com/sun/star/uno/Any.h>
24 #include <map>
25 #include <sal/types.h>
27 class SvStream;
29 namespace ppt
32 // old transition types
33 #define PPT_TRANSITION_TYPE_NONE 0
34 #define PPT_TRANSITION_TYPE_RANDOM 1
35 #define PPT_TRANSITION_TYPE_BLINDS 2
36 #define PPT_TRANSITION_TYPE_CHECKER 3
37 #define PPT_TRANSITION_TYPE_COVER 4
38 #define PPT_TRANSITION_TYPE_DISSOLVE 5
39 #define PPT_TRANSITION_TYPE_FADE 6
40 #define PPT_TRANSITION_TYPE_PULL 7 // Uncover in MS-PPT Specs
41 #define PPT_TRANSITION_TYPE_RANDOM_BARS 8
42 #define PPT_TRANSITION_TYPE_STRIPS 9
43 #define PPT_TRANSITION_TYPE_WIPE 10
44 #define PPT_TRANSITION_TYPE_ZOOM 11 // Box In/Out in MS-PPT Specs
45 #define PPT_TRANSITION_TYPE_SPLIT 13
47 // effects, new in xp
48 #define PPT_TRANSITION_TYPE_DIAMOND 17
49 #define PPT_TRANSITION_TYPE_PLUS 18
50 #define PPT_TRANSITION_TYPE_WEDGE 19
51 #define PPT_TRANSITION_TYPE_PUSH 20
52 #define PPT_TRANSITION_TYPE_COMB 21
53 #define PPT_TRANSITION_TYPE_NEWSFLASH 22
54 #define PPT_TRANSITION_TYPE_SMOOTHFADE 23 // Alpha Fade in MS-PPT Specs
55 #define PPT_TRANSITION_TYPE_WHEEL 26
56 #define PPT_TRANSITION_TYPE_CIRCLE 27
58 // undocumented(?)
59 #define PPT_TRANSITION_TYPE_FLASH 30
61 // atoms
62 #define DFF_msofbtAnimEvent 0xf125
63 #define DFF_msofbtAnimNode 0xf127
64 #define DFF_msofbtAnimTrigger 0xf128
65 #define DFF_msofbtAnimValue 0xf129
66 #define DFF_msofbtAnimateTarget 0xf12a
67 #define DFF_msofbtAnimate 0xf12b
68 #define DFF_msofbtAnimateColor 0xf12c
69 #define DFF_msofbtAnimateFilter 0xf12d
70 #define DFF_msofbtAnimateMotion 0xf12e
71 #define DFF_msofbtAnimateRotation 0xf12f
72 #define DFF_msofbtAnimateScale 0xf130
73 #define DFF_msofbtAnimateSet 0xf131
74 #define DFF_msofbtAnimCommand 0xf132
75 #define DFF_msofbtAnimateTargetSettings 0xf133
76 #define DFF_msofbtAnimateData 0xf134
77 #define DFF_msofbtAnimateColorData 0xf135
78 #define DFF_msofbtAnimateFilterData 0xf136
79 #define DFF_msofbtAnimateMotionData 0xf137
80 #define DFF_msofbtAnimateScaleData 0xf139
81 #define DFF_msofbtAnimateSetData 0xf13a
82 #define DFF_msofbtCommandData 0xf13b
83 #define DFF_msofbtAnimateTargetElement 0xf13c
84 #define DFF_msofbtAnimPropertySet 0xf13d
85 #define DFF_msofbtAnimateAttributeNames 0xf13e
86 #define DFF_msofbtAnimKeyPoints 0xf13f
87 #define DFF_msofbtAnimIteration 0xf140
88 #define DFF_msofbtAnimAction 0xf141 // correct name??
89 #define DFF_msofbtAnimAttributeValue 0xf142
90 #define DFF_msofbtAnimKeyTime 0xf143
91 #define DFF_msofbtAnimGroup 0xf144
92 #define DFF_msofbtAnimSubGoup 0xf145
93 #define DFF_msofbtAnimateRotationData 0xf138
94 #define DFF_msofbtAnimReference 0x2afb
96 // property ids
97 #define DFF_ANIM_ID 1
98 #define DFF_ANIM_RUNTIMECONTEXT 2
99 #define DFF_ANIM_PATH_EDIT_MODE 3
100 #define DFF_ANIM_COLORSPACE 4
101 #define DFF_ANIM_DIRECTION 5 // TODO: Conflict?
102 #define DFF_ANIM_MASTERREL 5 // TODO: Conflict?
103 #define DFF_ANIM_OVERRIDE 6
104 #define DFF_ANIM_PRESET_ID 9
105 #define DFF_ANIM_PRESET_SUB_TYPE 10
106 #define DFF_ANIM_PRESET_CLASS 11
107 #define DFF_ANIM_AFTEREFFECT 13
108 #define DFF_ANIM_ENDAFTERSLIDE 15
109 #define DFF_ANIM_TIMEFILTER 16
110 #define DFF_ANIM_EVENT_FILTER 17
111 #define DFF_ANIM_GROUP_ID 19
112 #define DFF_ANIM_NODE_TYPE 20
113 #define DFF_ANIM_VOLUME 22
114 #define DFF_ANIM_PROPERTY_ID_COUNT (DFF_ANIM_VOLUME + 1)
116 // property types
117 #define DFF_ANIM_PROP_TYPE_BYTE 0
118 #define DFF_ANIM_PROP_TYPE_INT32 1
119 #define DFF_ANIM_PROP_TYPE_FLOAT 2
120 #define DFF_ANIM_PROP_TYPE_UNISTRING 3
122 #define DFF_ANIM_PRESS_CLASS_USER_DEFINED 0
123 #define DFF_ANIM_PRESS_CLASS_ENTRANCE 1
124 #define DFF_ANIM_PRESS_CLASS_EXIT 2
125 #define DFF_ANIM_PRESS_CLASS_EMPHASIS 3
126 #define DFF_ANIM_PRESS_CLASS_MOTIONPATH 4
127 #define DFF_ANIM_PRESS_CLASS_OLE_ACTION 5
128 #define DFF_ANIM_PRESS_CLASS_MEDIACALL 6
130 // Effect node type.
131 #define DFF_ANIM_NODE_TYPE_ON_CLICK 1
132 #define DFF_ANIM_NODE_TYPE_WITH_PREVIOUS 2
133 #define DFF_ANIM_NODE_TYPE_AFTER_PREVIOUS 3
134 #define DFF_ANIM_NODE_TYPE_MAIN_SEQUENCE 4
135 #define DFF_ANIM_NODE_TYPE_INTERACTIVE_SEQ 5
136 #define DFF_ANIM_NODE_TYPE_CLICK_PARALLEL 6
137 #define DFF_ANIM_NODE_TYPE_WITH_GROUP 7
138 #define DFF_ANIM_NODE_TYPE_AFTER_GROUP 8
139 #define DFF_ANIM_NODE_TYPE_TIMING_ROOT 9
141 /* constants for fill entry in AnimationNode */
142 const sal_Int32 mso_Anim_GroupType_PAR = 0;
143 const sal_Int32 mso_Anim_GroupType_SEQ = 1;
144 const sal_Int32 mso_Anim_GroupType_NODE = 3;
145 const sal_Int32 mso_Anim_GroupType_MEDIA = 4;
147 /* constants for fill entry in AnimationNode */
148 const sal_Int32 mso_Anim_Fill_ALWAYS = 1;
149 const sal_Int32 mso_Anim_Fill_WHENOFF = 2;
150 const sal_Int32 mso_Anim_Fill_NEVER = 3;
152 /* constants for fill entry in AnimationNode */
153 const sal_Int32 mso_Anim_Fill_REMOVE = 1;
154 const sal_Int32 mso_Anim_Fill_FREEZE = 2;
155 const sal_Int32 mso_Anim_Fill_HOLD = 3;
157 /* constants for behaviour entry in PPTAnimationNode */
158 const sal_Int32 mso_Anim_Behaviour_FILTER = 24;
159 const sal_Int32 mso_Anim_Behaviour_ANIMATION= 25;
161 typedef ::std::map< sal_Int32, css::uno::Any > PropertySetMap_t;
163 class PropertySet
165 public:
166 PropertySetMap_t maProperties;
168 bool hasProperty( sal_Int32 nProperty ) const;
169 css::uno::Any getProperty( sal_Int32 nProperty ) const;
172 /** this atom is the first entry in each animation group */
173 struct AnimationNode
175 public:
176 /** see mso_Anim_GroupType_? */
177 sal_Int32 mnGroupType;
179 /** see mso_Anim_Restart_? */
180 sal_Int32 mnRestart;
182 /** see mso_Anim_Fill_? */
183 sal_Int32 mnFill;
185 /** see mso_Anim_Behaviour_? */
186 sal_Int32 mnNodeType;
188 /** duration of this group in 1000th seconds */
189 sal_Int32 mnDuration;
191 sal_Int32 mnU1, mnU3, mnU4;
193 AnimationNode()
194 : mnGroupType(0)
195 , mnRestart(0)
196 , mnFill(0)
197 , mnNodeType(0)
198 , mnDuration(0)
199 , mnU1(0), mnU3(0), mnU4(0)
202 public:
204 friend SvStream& WriteAnimationNode(SvStream& rOut, AnimationNode const & rAtom);
207 } // namespace ppt
209 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */