22#include <rtl/ustring.hxx>
24#include <com/sun/star/uno/Any.hxx>
25#include <com/sun/star/drawing/XShape.hpp>
26#include <com/sun/star/text/XText.hpp>
27#include <com/sun/star/presentation/ParagraphTarget.hpp>
28#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
29#include <com/sun/star/animations/Event.hpp>
30#include <com/sun/star/animations/XAnimationNode.hpp>
34#include <oox/token/namespaces.hxx>
35#include <oox/token/tokens.hxx>
48 if( !rNewValue.hasValue() )
52 else if( !rOldValue.hasValue() )
58 Sequence< Any > aNewSeq;
59 if( rOldValue >>= aNewSeq )
61 sal_Int32 nSize = aNewSeq.getLength();
62 aNewSeq.realloc(nSize+1);
63 aNewSeq.getArray()[nSize] = rNewValue;
67 aNewSeq = { rOldValue, rNewValue };
69 return Any( aNewSeq );
82 rSubType = ShapeAnimationSubType::AS_WHOLE;
85 rSubType = ShapeAnimationSubType::ONLY_BACKGROUND;
89 ParagraphTarget aParaTarget;
90 Reference< XShape > xShape;
92 aParaTarget.Shape = xShape;
93 rSubType = ShapeAnimationSubType::ONLY_TEXT;
95 Reference< XText > xText( xShape, UNO_QUERY );
102 SAL_INFO(
"oox.ppt",
"OOX: TODO calculate the corresponding paragraph for the text range..." );
105 aParaTarget.Paragraph =
static_cast< sal_Int16
>(
maRange.
start );
107 SAL_INFO(
"oox.ppt",
"OOX: TODO what to do with more than one" );
127 SAL_INFO(
"oox.ppt",
"OOX: TODO inkTgt" );
131 SAL_INFO(
"oox.ppt",
"OOX: TODO sldTgt" );
146 SAL_WARN_IF( !pShape,
"oox.ppt",
"failed to locate Shape" );
150 pShape = pSlide->getShape(
msValue );
155 Reference< XShape > xShape( pShape->getXShape() );
156 SAL_WARN_IF( !xShape.is(),
"oox.ppt",
"fail to get XShape from shape" );
180 aAny =
mpTarget->convert( pSlide, nSubType );
188 css::uno::Reference<XAnimationNode> xNode = pSlide->getAnimationNode(
sId);
209 return l[0].convert(pSlide);
211 for (
auto const& elem : l)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< SlidePersist > SlidePersistPtr
std::vector< AnimationCondition > AnimationConditionList
Any addToSequence(const Any &rOldValue, const Any &rNewValue)
ShapeTargetElement maShapeTarget
css::uno::Any convert(const SlidePersistPtr &pSlide, sal_Int16 &nSubType) const
convert to a set of properties
AnimTargetElementPtr mpTarget
css::uno::Any convert(const SlidePersistPtr &pSlide) const
static css::uno::Any convertList(const SlidePersistPtr &pSlide, const AnimationConditionList &l)
void convert(css::uno::Any &aAny, sal_Int16 &rSubType) const
drawingml::IndexRange maRange