22#include <com/sun/star/animations/XAnimationNode.hpp>
23#include <com/sun/star/animations/XTimeContainer.hpp>
24#include <com/sun/star/animations/XAudio.hpp>
25#include <com/sun/star/drawing/XShape.hpp>
26#include <com/sun/star/util/XChangesListener.hpp>
43class CustomAnimationEffect;
45class CustomAnimationPreset;
63 SAL_DLLPRIVATE
const css::uno::Reference< css::animations::XAnimationNode >&
getNode()
const {
return mxNode; }
64 SAL_DLLPRIVATE
void setNode(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
65 SAL_DLLPRIVATE
void replaceNode(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
70 SAL_DLLPRIVATE
const OUString&
getPresetId()
const {
return maPresetId; }
72 SAL_DLLPRIVATE
const OUString&
getProperty()
const {
return maProperty; }
75 SAL_DLLPRIVATE
void setPresetClassAndId( sal_Int16 nPresetClass,
const OUString& rPresetId );
78 void setNodeType( sal_Int16 nNodeType );
80 SAL_DLLPRIVATE css::uno::Any getRepeatCount()
const;
81 SAL_DLLPRIVATE
void setRepeatCount(
const css::uno::Any& rRepeatCount );
83 SAL_DLLPRIVATE css::uno::Any getEnd()
const;
84 SAL_DLLPRIVATE
void setEnd(
const css::uno::Any& rEnd );
87 SAL_DLLPRIVATE
void setFill( sal_Int16 nFill );
89 SAL_DLLPRIVATE
double getBegin()
const {
return mfBegin; }
90 void setBegin(
double fBegin );
93 void setDuration(
double fDuration );
98 void setIterateType( sal_Int16 nIterateType );
101 void setIterateInterval(
double fIterateInterval );
104 void setTarget(
const css::uno::Any& rTarget );
107 SAL_DLLPRIVATE
void setHasAfterEffect(
bool bHasAfterEffect ) { mbHasAfterEffect = bHasAfterEffect; }
109 SAL_DLLPRIVATE
const css::uno::Any&
getDimColor()
const {
return maDimColor; }
110 SAL_DLLPRIVATE
void setDimColor(
const css::uno::Any& rDimColor ) { maDimColor = rDimColor; }
117 SAL_DLLPRIVATE
bool hasText()
const {
return mbHasText; }
122 SAL_DLLPRIVATE
void setAcceleration(
double fAcceleration );
125 SAL_DLLPRIVATE
void setDecelerate(
double fDecelerate );
128 SAL_DLLPRIVATE
void setAutoReverse(
bool bAutoReverse );
130 SAL_DLLPRIVATE css::uno::Any
getProperty( sal_Int32 nNodeType, std::u16string_view rAttributeName,
EValue eValue );
131 SAL_DLLPRIVATE
bool setProperty( sal_Int32 nNodeType, std::u16string_view rAttributeName,
EValue eValue,
const css::uno::Any& rValue );
133 SAL_DLLPRIVATE css::uno::Any getTransformationProperty( sal_Int32 nTransformType,
EValue eValue );
134 SAL_DLLPRIVATE
bool setTransformationProperty( sal_Int32 nTransformType,
EValue eValue,
const css::uno::Any& rValue );
136 SAL_DLLPRIVATE css::uno::Any getColor( sal_Int32 nIndex );
137 SAL_DLLPRIVATE
void setColor( sal_Int32 nIndex,
const css::uno::Any& rColor );
139 SAL_DLLPRIVATE sal_Int32
getGroupId()
const {
return mnGroupId; }
140 SAL_DLLPRIVATE
void setGroupId( sal_Int32 nGroupId );
143 void setTargetSubItem( sal_Int16 nSubItem );
145 SAL_DLLPRIVATE OUString getPath()
const;
146 SAL_DLLPRIVATE
void setPath(
const OUString& rPath );
148 SAL_DLLPRIVATE
bool checkForText(
const std::vector<sal_Int32>* paragraphNumberingLevel =
nullptr );
149 SAL_DLLPRIVATE
bool calculateIterateDuration();
151 SAL_DLLPRIVATE
void setAudio(
const css::uno::Reference< css::animations::XAudio >& xAudio );
152 SAL_DLLPRIVATE
bool getStopAudio()
const;
154 void createAudio(
const css::uno::Any& rSource );
155 SAL_DLLPRIVATE
void removeAudio();
156 SAL_DLLPRIVATE
const css::uno::Reference< css::animations::XAudio >&
getAudio()
const {
return mxAudio; }
162 SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > createAfterEffectNode()
const;
163 SAL_DLLPRIVATE css::uno::Reference< css::drawing::XShape > getTargetShape()
const;
166 SAL_DLLPRIVATE
static sal_Int32 get_node_type(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
167 SAL_DLLPRIVATE
static sal_Int32 getNumberOfSubitems(
const css::uno::Any& aTarget, sal_Int16 nIterateType );
170 SAL_DLLPRIVATE
void updateSdrPathObjFromPath(
SdrPathObj& rPathObj );
171 SAL_DLLPRIVATE
void updatePathFromSdrPathObj(
const SdrPathObj& rPathObj );
198 css::uno::Reference< css::animations::XAnimationNode >
mxNode;
199 css::uno::Reference< css::animations::XAudio >
mxAudio;
211 const css::uno::Reference< css::animations::XAnimationNode >&
mxSearchNode;
247 css::uno::Reference< css::drawing::XShape >
maTarget;
269 SAL_DLLPRIVATE
EffectSequenceHelper( css::uno::Reference< css::animations::XTimeContainer > xSequenceRoot );
272 SAL_DLLPRIVATE
virtual css::uno::Reference< css::animations::XAnimationNode > getRootNode();
282 SAL_DLLPRIVATE
void create(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
283 SAL_DLLPRIVATE
void createEffectsequence(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
284 SAL_DLLPRIVATE
void processAfterEffect(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
285 SAL_DLLPRIVATE
void createEffects(
const css::uno::Reference< css::animations::XAnimationNode >& xNode );
287 SAL_DLLPRIVATE sal_Int32
getCount()
const {
return sal::static_int_cast< sal_Int32 >( maEffects.size() ); }
289 SAL_DLLPRIVATE
virtual CustomAnimationEffectPtr findEffect(
const css::uno::Reference< css::animations::XAnimationNode >& xNode )
const;
291 SAL_DLLPRIVATE
virtual bool disposeShape(
const css::uno::Reference< css::drawing::XShape >& xShape );
292 SAL_DLLPRIVATE
virtual void insertTextRange(
const css::uno::Any& aTarget );
293 SAL_DLLPRIVATE
virtual void disposeTextRange(
const css::uno::Any& aTarget );
294 SAL_DLLPRIVATE
virtual bool hasEffect(
const css::uno::Reference< css::drawing::XShape >& xShape );
295 SAL_DLLPRIVATE
virtual void onTextChanged(
const css::uno::Reference< css::drawing::XShape >& xShape );
298 SAL_DLLPRIVATE
virtual void rebuild();
300 SAL_DLLPRIVATE EffectSequence::iterator
getBegin() {
return maEffects.begin(); }
301 SAL_DLLPRIVATE EffectSequence::iterator
getEnd() {
return maEffects.end(); }
313 sal_Int32 nTextGrouping,
double fTextGroupingAuto,
314 bool bAnimateForm,
bool bTextReverse);
322 SAL_DLLPRIVATE
const css::uno::Reference< css::drawing::XShape >&
getTriggerShape()
const {
return mxEventSource; }
323 SAL_DLLPRIVATE
void setTriggerShape(
const css::uno::Reference< css::drawing::XShape >& xTrigger ) { mxEventSource = xTrigger; }
329 SAL_DLLPRIVATE
virtual void implRebuild();
330 SAL_DLLPRIVATE
virtual void reset();
334 SAL_DLLPRIVATE
void notify_listeners();
336 SAL_DLLPRIVATE
void updateTextGroups();
338 SAL_DLLPRIVATE
bool getParagraphNumberingLevels(
const css::uno::Reference< css::drawing::XShape >& xShape, std::vector< sal_Int32 >& rParagraphNumberingLevel );
360 virtual void rebuild()
override;
379 MainSequence(
const css::uno::Reference< css::animations::XAnimationNode >& xTimingRootNode );
382 virtual css::uno::Reference< css::animations::XAnimationNode > getRootNode()
override;
383 void reset(
const css::uno::Reference< css::animations::XAnimationNode >& xTimingRootNode );
386 virtual void rebuild()
override;
388 virtual CustomAnimationEffectPtr findEffect(
const css::uno::Reference< css::animations::XAnimationNode >& xNode )
const override;
390 virtual bool disposeShape(
const css::uno::Reference< css::drawing::XShape >& xShape )
override;
391 virtual void insertTextRange(
const css::uno::Any& aTarget )
override;
392 virtual void disposeTextRange(
const css::uno::Any& aTarget )
override;
393 virtual bool hasEffect(
const css::uno::Reference< css::drawing::XShape >& xShape )
override;
394 virtual void onTextChanged(
const css::uno::Reference< css::drawing::XShape >& xShape )
override;
398 virtual void notify_change()
override;
400 bool setTrigger(
const CustomAnimationEffectPtr& pEffect,
const css::uno::Reference< css::drawing::XShape >& xTriggerShape );
403 void startRecreateTimer();
406 void startRebuildTimer();
415 void unlockRebuilds();
419 virtual void implRebuild()
override;
423 void createMainSequence();
424 virtual void reset()
override;
426 InteractiveSequencePtr createInteractiveSequence(
const css::uno::Reference< css::drawing::XShape >& xShape );
const sal_Int16 mnNodeType
FILE * init(int, char **)
SAL_DLLPRIVATE void setAfterEffectOnNext(bool bOnNextEffect)
SAL_DLLPRIVATE double getDuration() const
SAL_DLLPRIVATE bool getAutoReverse() const
SAL_DLLPRIVATE double getIterateInterval() const
css::uno::Reference< css::animations::XAudio > mxAudio
SAL_DLLPRIVATE const OUString & getPresetId() const
SAL_DLLPRIVATE double getDecelerate() const
SAL_DLLPRIVATE void setHasAfterEffect(bool bHasAfterEffect)
css::uno::Reference< css::animations::XAnimationNode > mxNode
SAL_DLLPRIVATE const OUString & getProperty() const
SAL_DLLPRIVATE double getBegin() const
SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAnimationNode > & getNode() const
SAL_DLLPRIVATE sal_Int32 getParaDepth() const
SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAudio > & getAudio() const
SAL_DLLPRIVATE sal_Int16 getPresetClass() const
SAL_DLLPRIVATE bool IsAfterEffectOnNext() const
SAL_DLLPRIVATE sal_Int16 getCommand() const
SAL_DLLPRIVATE bool hasAfterEffect() const
SAL_DLLPRIVATE sal_Int32 getGroupId() const
double mfAbsoluteDuration
SAL_DLLPRIVATE void setEffectSequence(EffectSequenceHelper *pSequence)
sal_Int16 mnTargetSubItem
SAL_DLLPRIVATE sal_Int16 getIterateType() const
SAL_DLLPRIVATE bool hasText() const
SAL_DLLPRIVATE sal_Int16 getFill() const
EffectSequenceHelper * mpEffectSequence
SAL_DLLPRIVATE sal_Int16 getNodeType() const
SAL_DLLPRIVATE sal_Int16 getTargetSubItem() const
SAL_DLLPRIVATE const OUString & getPresetSubType() const
SAL_DLLPRIVATE EffectSequenceHelper * getEffectSequence() const
SAL_DLLPRIVATE void setDimColor(const css::uno::Any &rDimColor)
SAL_DLLPRIVATE double getAcceleration() const
SAL_DLLPRIVATE double getAbsoluteDuration() const
SAL_DLLPRIVATE const css::uno::Any & getTarget() const
SAL_DLLPRIVATE const css::uno::Any & getDimColor() const
bool mbAfterEffectOnNextEffect
this class keeps track of a group of animations that build up a text animation for a single shape
bool getTextReverse() const
bool getAnimateForm() const
sal_Int8 mnDepthFlags[PARA_LEVELS]
sal_Int32 getTextGrouping() const
CustomAnimationTextGroup(const css::uno::Reference< css::drawing::XShape > &rTarget, sal_Int32 nGroupId)
double getTextGroupingAuto() const
css::uno::Reference< css::drawing::XShape > maTarget
const EffectSequence & getEffects() const
void addEffect(CustomAnimationEffectPtr const &pEffect)
SAL_DLLPRIVATE sal_Int32 getSequenceType() const
SAL_DLLPRIVATE const css::uno::Reference< css::drawing::XShape > & getTriggerShape() const
SAL_DLLPRIVATE EffectSequence::iterator getEnd()
SAL_DLLPRIVATE EffectSequence::iterator getBegin()
CustomAnimationTextGroupMap maGroupMap
SAL_DLLPRIVATE CustomAnimationEffectPtr append(const SdrPathObj &rPathObj, const css::uno::Any &rTarget, double fDuration, const OUString &rPresetId)
css::uno::Reference< css::animations::XTimeContainer > mxSequenceRoot
SAL_DLLPRIVATE sal_Int32 getCount() const
SAL_DLLPRIVATE EffectSequence & getSequence()
SAL_DLLPRIVATE CustomAnimationEffectPtr append(const CustomAnimationPresetPtr &pDescriptor, const css::uno::Any &rTarget, double fDuration)
css::uno::Reference< css::drawing::XShape > mxEventSource
std::list< ISequenceListener * > maListeners
SAL_DLLPRIVATE void setTriggerShape(const css::uno::Reference< css::drawing::XShape > &xTrigger)
this listener is implemented by UI components to track changes in the animation core
virtual void notify_change()=0
MainSequence * mpMainSequence
InteractiveSequence(const css::uno::Reference< css::animations::XTimeContainer > &xSequenceRoot, MainSequence *pMainSequence)
virtual void implRebuild() override
virtual void rebuild() override
this method rebuilds the animation nodes
MainSequenceRebuildGuard(MainSequencePtr pMainSequence)
MainSequencePtr mpMainSequence
~MainSequenceRebuildGuard()
DECL_DLLPRIVATE_LINK(onTimerHdl, Timer *, void)
sal_Int32 mbIgnoreChanges
::tools::Long mnRebuildLockGuard
bool mbPendingRebuildRequest
css::uno::Reference< css::animations::XTimeContainer > mxTimingRootNode
InteractiveSequenceVector maInteractiveSequenceVector
const InteractiveSequenceVector & getInteractiveSequenceVector() const
css::uno::Reference< css::util::XChangesListener > mxChangesListener
T * clone(T *const other)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::lang::XEventListener > &xListener)
void removeListener(const InterfaceRef &xObject, const css::uno::Reference< css::lang::XEventListener > &xListener)
OUStringBuffer & remove(OUStringBuffer &rIn, sal_Unicode c)
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
std::list< CustomAnimationEffectPtr > EffectSequence
std::vector< InteractiveSequencePtr > InteractiveSequenceVector
std::shared_ptr< MainSequence > MainSequencePtr
std::shared_ptr< CustomAnimationTextGroup > CustomAnimationTextGroupPtr
std::shared_ptr< InteractiveSequence > InteractiveSequencePtr
std::shared_ptr< CustomAnimationPreset > CustomAnimationPresetPtr
std::map< sal_Int32, CustomAnimationTextGroupPtr > CustomAnimationTextGroupMap
std::shared_ptr< CustomAnimationEffect > CustomAnimationEffectPtr
SVX_DLLPUBLIC OUString getProperty(css::uno::Reference< css::beans::XPropertyContainer > const &rxPropertyContainer, OUString const &rName)
stl_CustomAnimationEffect_search_node_predict(const css::uno::Reference< css::animations::XAnimationNode > &xSearchNode)
bool operator()(const CustomAnimationEffectPtr &pEffect) const
const css::uno::Reference< css::animations::XAnimationNode > & mxSearchNode