27#include <osl/diagnose.h>
29#include <com/sun/star/presentation/TextAnimationType.hpp>
30#include <com/sun/star/presentation/EffectNodeType.hpp>
31#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
58 , m_bHasSpecialDuration(false)
59 , m_fDurationInSeconds(0.001)
82 sal_Int32 nParagraphLevel = 0;
85 return nParagraphLevel;
116bool Ppt97Animation::HasAfterEffect_DimAfterEffect()
const
144 case presentation::TextAnimationType::BY_LETTER:
145 rfTextIterationDelay = 0.075;
148 case presentation::TextAnimationType::BY_WORD:
149 rfTextIterationDelay = 0.3;
174 SAL_INFO(
"sd",
"you tried to deselect the animation of the form for random animation-> this has been refused");
190 sal_Int16 nRet = presentation::EffectNodeType::ON_CLICK;
193 nRet = presentation::EffectNodeType::AFTER_PREVIOUS;
200 sal_Int16 nRet = presentation::TextAnimationType::BY_PARAGRAPH;
206 nRet = presentation::TextAnimationType::BY_LETTER;
209 nRet = presentation::TextAnimationType::BY_WORD;
539 OSL_FAIL(
"no effect mapped");
553 OSL_FAIL(
"no valid SdrObject or page found for ppt import");
560 OSL_FAIL(
"no XShape interface found for ppt import");
566 OSL_FAIL(
"no MainSequence found for ppt import");
574 OSL_FAIL(
"no suitable preset found for ppt import");
586 pEffect->setTarget( css::uno::Any( xShape ) );
591 double fDurationInSeconds = 1.0;
593 pEffect->setDuration( fDurationInSeconds );
598 pEffect->setHasAfterEffect(
true );
613 double fTextIterationDelay = 1.0;
615 pEffect->setIterateInterval( fTextIterationDelay );
622 pEffect->setStopAudio();
628 pEffect->setTargetSubItem( presentation::ShapeAnimationSubType::AS_WHOLE );
632 pMainSequence->append( pEffect );
642 createTextGroup( pEffect, nParagraphLevel, fDelaySeconds, bAnimateAssociatedShape, bTextReverse );
650 for(
const auto& rxEffect : rEffects )
662 bool bAtParagraphBegin =
false;
664 bAtParagraphBegin = pGroupEffect->getParaDepth() < nParagraphLevel;
666 bAtParagraphBegin = !pLastEffect || pLastEffect->getParaDepth() < nParagraphLevel;
667 if( bAtParagraphBegin )
670 pGroupEffect->setNodeType( presentation::EffectNodeType::WITH_PREVIOUS );
672 pGroupEffect->setNodeType( presentation::EffectNodeType::AFTER_PREVIOUS );
674 pLastEffect = pGroupEffect;
679 pMainSequence->rebuild();
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
double m_fDurationInSeconds
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
bool operator>(const Ppt97Animation &rAnimation) const
bool HasStopPreviousSound() const
bool m_bHasSpecialDuration
bool HasSoundEffect() const
OUString const & GetPresetSubType() const
void SetSoundFileUrl(const OUString &rSoundFileUrl)
sal_Int16 GetEffectNodeType() const
void ClearCacheData() const
bool HasAfterEffect() const
bool GetSpecialTextIterationDelay(double &rfTextIterationDelay) const
Ppt97AnimationInfoAtom m_aAtom
pure input from stream
SdrPage * getSdrPageFromSdrObject() const
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadInt32(sal_Int32 &rInt32)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
SvStream & ReadUChar(unsigned char &rChar)
static const CustomAnimationPresets & getCustomAnimationPresets()
This method gets presets instance, which is localized for the current user's locale.
Reference< XInputStream > rInputStream
#define SAL_INFO(area, stream)
std::list< CustomAnimationEffectPtr > EffectSequence
std::shared_ptr< MainSequence > MainSequencePtr
std::shared_ptr< CustomAnimationTextGroup > CustomAnimationTextGroupPtr
std::shared_ptr< CustomAnimationPreset > CustomAnimationPresetPtr
std::shared_ptr< CustomAnimationEffect > CustomAnimationEffectPtr
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj) noexcept