LibreOffice Module sd (master) 1
ppt97animations.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 <rtl/ustring.hxx>
23#include <sal/types.h>
24#include <tools/color.hxx>
25
26class SdrObject;
27class SvStream;
28
31{
32 friend class Ppt97Animation;
33
34//-- member
36 sal_uInt32 nFlags;
37 sal_uInt32 nSoundRef;
38 sal_Int32 nDelayTime;
39 sal_uInt16 nOrderID;
40 sal_uInt16 nSlideCount;
47
48 // unknown, because whole size needs to be 28
51
52//-- methods
53 void ReadStream( SvStream& rIn );
54/*
55 nFlags:
56 decimal / hexadecimal / binary
57 1040 0x00000410 10000010000 mouseclick
58 17428 0x00004414 100010000010100 after previous 0 sec (animate form)
59 17412 0x00004404 100010000000100 after previous 0 sec
60 1088 0x00000440 10001000000 stop previous sound and mouseclick
61 1044 0x00000414 10000010100 play sound automatic
62 1041 0x00000411 10000010001
63 | | | | | |
64 | | | | | reverse order
65 | | | | after previous
66 | | | sound
67 | | stop previous sound
68 | ?
69 animate form
70
71 nAfterEffect:
72 1: color
73 0: nothing
74 3: hide after animation
75 2: hide at next mouse click
76*/
77};
78
85{
86
87public: //public methods
88 explicit Ppt97Animation( SvStream& rIn );
89
90 bool operator < ( const Ppt97Animation& rAnimation ) const;//later is greater
91 bool operator > ( const Ppt97Animation& rAnimation ) const;//later is greater
92
93 //get methods
94 bool HasEffect() const;
95 bool HasParagraphEffect() const;
96 bool HasSoundEffect() const;
97 sal_Int32 GetDimColor() const { return static_cast<sal_Int32>(m_aAtom.nDimColor);}
98 sal_uInt32 GetSoundRef() const { return m_aAtom.nSoundRef;}
100 bool HasAnimateAssociatedShape() const;
101
102 //set methods
103 void SetDimColor( Color nDimColor );
104 void SetSoundFileUrl( const OUString& rSoundFileUrl );
105 void SetAnimateAssociatedShape( bool bAnimate ); //true if the shape should be animated in addition to the text
106
107 //action methods
112
113private: //private methods
114
115 //read methods
116 OUString const & GetPresetId() const;
117 OUString const & GetPresetSubType() const;
118 bool HasAfterEffect() const;
119 bool HasAfterEffect_ChangeColor() const;
121 bool HasStopPreviousSound() const;
122
124 bool HasReverseOrder() const;
125
127 sal_Int32 GetParagraphLevel() const;
128
130 sal_Int16 GetTextAnimationType() const;
131
133 sal_Int16 GetEffectNodeType() const;
134
136 double GetDelayTimeInSeconds() const;
137 bool GetSpecialDuration( double& rfDurationInSeconds ) const;
138 bool GetSpecialTextIterationDelay( double& rfTextIterationDelay ) const;
139
140 void UpdateCacheData() const;
141 void ClearCacheData() const;
142
143private: //private member
144 //input information:
147
148 //cached generated output information:
149 mutable bool m_bDirtyCache;
150 mutable OUString m_aPresetId; // m_aPresetId and m_aSubType match to the values in sd/xml/effects.xml
151 mutable OUString m_aSubType;
153 mutable double m_fDurationInSeconds;
154};
155
156/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
helper class for reading PPT AnimationInfoAtom
sal_uInt32 nFlags
0x0004: time instead of click
sal_uInt8 nAfterEffect
nAfterEffect: 0: none; 1: change color; 2: dim on next effect; 3: dim after effect;
sal_Int32 nDelayTime
1/1000 sec
void ReadStream(SvStream &rIn)
this is a helping class for import of PPT 97 animations
bool HasAfterEffect_DimAtNextEffect() const
bool HasAnimateAssociatedShape() const
double GetDelayTimeInSeconds() const
void SetDimColor(Color nDimColor)
void UpdateCacheData() const
bool HasParagraphEffect() const
bool operator<(const Ppt97Animation &rAnimation) const
OUString m_aSoundFileUrl
this needs to be set in addition from outside as this class has not the knowledge to translate the so...
OUString const & GetPresetId() const
bool GetSpecialDuration(double &rfDurationInSeconds) const
void createAndSetCustomAnimationEffect(SdrObject *pObj)
this method creates a CustomAnimationEffect for the given SdrObject from internal data and stores the...
Ppt97Animation(SvStream &rIn)
void SetAnimateAssociatedShape(bool bAnimate)
sal_Int16 GetTextAnimationType() const
bool HasAfterEffect_ChangeColor() const
sal_Int32 GetParagraphLevel() const
paragraph level that is animated ( that paragraph and higher levels )
sal_Int32 GetDimColor() const
bool HasReverseOrder() const
sal_uInt32 GetSoundRef() const
bool operator>(const Ppt97Animation &rAnimation) const
bool HasStopPreviousSound() const
bool HasSoundEffect() const
OUString const & GetPresetSubType() const
void SetSoundFileUrl(const OUString &rSoundFileUrl)
sal_Int16 GetEffectNodeType() const
void ClearCacheData() const
bool HasEffect() const
bool HasAfterEffect() const
bool GetSpecialTextIterationDelay(double &rfTextIterationDelay) const
Ppt97AnimationInfoAtom m_aAtom
pure input from stream
unsigned char sal_uInt8