LibreOffice Module sd (master) 1
pptanimations.hxx
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#pragma once
21
22#include <com/sun/star/uno/Any.h>
23
24#include <map>
25#include <sal/types.h>
26
27class SvStream;
28
29namespace ppt
30{
31
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
46
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
57
58// undocumented(?)
59#define PPT_TRANSITION_TYPE_FLASH 30
60
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
95
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)
115
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
121
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
129
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
140
141/* constants for fill entry in AnimationNode */
142const sal_Int32 mso_Anim_GroupType_PAR = 0;
143const sal_Int32 mso_Anim_GroupType_SEQ = 1;
144const sal_Int32 mso_Anim_GroupType_NODE = 3;
145const sal_Int32 mso_Anim_GroupType_MEDIA = 4;
146
147/* constants for fill entry in AnimationNode */
148const sal_Int32 mso_Anim_Fill_ALWAYS = 1;
149const sal_Int32 mso_Anim_Fill_WHENOFF = 2;
150const sal_Int32 mso_Anim_Fill_NEVER = 3;
151
152/* constants for fill entry in AnimationNode */
153const sal_Int32 mso_Anim_Fill_REMOVE = 1;
154const sal_Int32 mso_Anim_Fill_FREEZE = 2;
155const sal_Int32 mso_Anim_Fill_HOLD = 3;
156
157/* constants for behaviour entry in PPTAnimationNode */
158const sal_Int32 mso_Anim_Behaviour_FILTER = 24;
160
161typedef ::std::map< sal_Int32, css::uno::Any > PropertySetMap_t;
162
164{
165public:
167
168 bool hasProperty( sal_Int32 nProperty ) const;
169 css::uno::Any getProperty( sal_Int32 nProperty ) const;
170};
171
174{
175public:
177 sal_Int32 mnGroupType;
178
180 sal_Int32 mnRestart;
181
183 sal_Int32 mnFill;
184
186 sal_Int32 mnNodeType;
187
189 sal_Int32 mnDuration;
190
191 sal_Int32 mnU1, mnU3, mnU4;
192
194 : mnGroupType(0)
195 , mnRestart(0)
196 , mnFill(0)
197 , mnNodeType(0)
198 , mnDuration(0)
199 , mnU1(0), mnU3(0), mnU4(0)
200 {
201 }
202public:
203
204 friend SvStream& WriteAnimationNode(SvStream& rOut, AnimationNode const & rAtom);
205};
206
207} // namespace ppt
208
209/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool hasProperty(sal_Int32 nProperty) const
PropertySetMap_t maProperties
css::uno::Any getProperty(sal_Int32 nProperty) const
const sal_Int32 mso_Anim_GroupType_MEDIA
const sal_Int32 mso_Anim_Fill_HOLD
const sal_Int32 mso_Anim_Fill_ALWAYS
const sal_Int32 mso_Anim_Fill_NEVER
const sal_Int32 mso_Anim_Behaviour_ANIMATION
const sal_Int32 mso_Anim_Fill_REMOVE
const sal_Int32 mso_Anim_GroupType_PAR
const sal_Int32 mso_Anim_Fill_WHENOFF
const sal_Int32 mso_Anim_GroupType_SEQ
const sal_Int32 mso_Anim_Behaviour_FILTER
::std::map< sal_Int32, css::uno::Any > PropertySetMap_t
const sal_Int32 mso_Anim_Fill_FREEZE
const sal_Int32 mso_Anim_GroupType_NODE
this atom is the first entry in each animation group
sal_Int32 mnNodeType
see mso_Anim_Behaviour_?
sal_Int32 mnFill
see mso_Anim_Fill_?
sal_Int32 mnGroupType
see mso_Anim_GroupType_?
sal_Int32 mnRestart
see mso_Anim_Restart_?
sal_Int32 mnDuration
duration of this group in 1000th seconds
friend SvStream & WriteAnimationNode(SvStream &rOut, AnimationNode const &rAtom)