20#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
21#include <com/sun/star/animations/AnimationFill.hpp>
22#include <com/sun/star/animations/AnimationRestart.hpp>
23#include <com/sun/star/animations/Timing.hpp>
24#include <com/sun/star/animations/Event.hpp>
25#include <com/sun/star/animations/AnimationEndSync.hpp>
26#include <com/sun/star/animations/Command.hpp>
27#include <com/sun/star/animations/EventTrigger.hpp>
28#include <com/sun/star/animations/AnimationNodeType.hpp>
29#include <com/sun/star/animations/AnimationTransformType.hpp>
30#include <com/sun/star/animations/AnimationCalcMode.hpp>
31#include <com/sun/star/animations/AnimationValueType.hpp>
32#include <com/sun/star/animations/AnimationAdditiveMode.hpp>
33#include <com/sun/star/animations/XIterateContainer.hpp>
34#include <com/sun/star/animations/XAnimateSet.hpp>
35#include <com/sun/star/animations/XAnimationNode.hpp>
36#include <com/sun/star/animations/XAudio.hpp>
37#include <com/sun/star/animations/XCommand.hpp>
38#include <com/sun/star/animations/XTransitionFilter.hpp>
39#include <com/sun/star/animations/XAnimateColor.hpp>
40#include <com/sun/star/animations/XAnimateMotion.hpp>
41#include <com/sun/star/animations/XAnimateTransform.hpp>
42#include <com/sun/star/animations/ValuePair.hpp>
43#include <com/sun/star/animations/AnimationColorSpace.hpp>
44#include <com/sun/star/presentation/EffectNodeType.hpp>
45#include <com/sun/star/presentation/EffectPresetClass.hpp>
46#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
47#include <com/sun/star/presentation/EffectCommands.hpp>
48#include <com/sun/star/beans/NamedValue.hpp>
49#include <com/sun/star/container/XEnumerationAccess.hpp>
50#include <com/sun/star/drawing/XDrawPage.hpp>
51#include <com/sun/star/io/WrongFormatException.hpp>
52#include <com/sun/star/presentation/ParagraphTarget.hpp>
53#include <com/sun/star/presentation/TextAnimationType.hpp>
57#include <rtl/ustrbuf.hxx>
58#include <rtl/math.hxx>
61#include <osl/diagnose.h>
67#include <animations.hxx>
77using ::com::sun::star::beans::NamedValue;
78using ::com::sun::star::container::XEnumerationAccess;
79using ::com::sun::star::container::XEnumeration;
110 PropertySetMap_t::const_iterator aIter(
maProperties.find( nProperty ) );
112 return (*aIter).second;
118: mpPPTImport( pPPTImport ), mrStCtrl( rStCtrl )
127 static int ppt_anim_debug_stream_number = 1;
128 OUString ppt_anim_debug_filename(
"ppt-animation-import-debug-output-");
129 ppt_anim_debug_filename += OUString::number(ppt_anim_debug_stream_number++);
130 ppt_anim_debug_filename +=
".xml";
131 mpFile = fopen(
OUStringToOString( ppt_anim_debug_filename, RTL_TEXTENCODING_UTF8).getStr() ,
"w+" );
133 dump(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
135 Reference< XAnimationNodeSupplier > xNodeSupplier( xPage, UNO_QUERY );
136 if( xNodeSupplier.is() )
138 mxRootNode = xNodeSupplier->getAnimationNode();
141 Reference< XAnimationNode > xParent;
163 const char* pServiceName =
nullptr;
169 pServiceName =
"com.sun.star.animations.IterateContainer";
171 pServiceName =
"com.sun.star.animations.ParallelTimeContainer";
174 pServiceName =
"com.sun.star.animations.SequenceTimeContainer";
183 pServiceName =
"com.sun.star.animations.AnimateSet";
185 pServiceName =
"com.sun.star.animations.AnimateColor";
187 pServiceName =
"com.sun.star.animations.AnimateTransform";
189 pServiceName =
"com.sun.star.animations.AnimateTransform";
191 pServiceName =
"com.sun.star.animations.AnimateMotion";
193 pServiceName =
"com.sun.star.animations.TransitionFilter";
195 pServiceName =
"com.sun.star.animations.Command";
197 pServiceName =
"com.sun.star.animations.Animate";
203 pServiceName =
"com.sun.star.animations.Audio";
207 pServiceName =
"com.sun.star.animations.Animate";
211 Reference< XAnimationNode > xNode;
214 Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
215 const OUString aServiceName( OUString::createFromAscii(pServiceName) );
216 Reference< XInterface > xFac( xContext->getServiceManager()->createInstanceWithContext(aServiceName, xContext) );
217 xNode.set(xFac , UNO_QUERY );
220 DBG_ASSERT( xNode.is(),
"sd::AnimationImporter::createNode(), node creation failed!" );
232 sal_Int32 nPresetId = 0;
236 sal_Int32 nPresetClass = 0;
240 switch( nPresetClass )
255 if( pAnimationNodeAtom && pAnimationNodeAtom->
seekToContent() )
260 if( pAnimationPropertySetAtom )
263 Reference< XAnimationNode > xNode;
267 sal_Int32 nPresetClass;
268 if(
is_random( aNode, aSet, nPresetClass ) )
302 Reference< XIterateContainer > xIter( xNode, UNO_QUERY );
305 double fDuration = 0.0;
307 Reference< XEnumerationAccess > xEnumerationAccess( xNode, UNO_QUERY );
308 if( xEnumerationAccess.is() )
310 Reference< XEnumeration > xEnumeration = xEnumerationAccess->createEnumeration();
311 if( xEnumeration.is() )
313 while( xEnumeration->hasMoreElements() )
315 Reference< XAnimate > xChildNode( xEnumeration->nextElement(), UNO_QUERY );
316 if( xChildNode.is() )
318 double fChildBegin = 0.0;
319 double fChildDuration = 0.0;
320 xChildNode->getBegin() >>= fChildBegin;
321 xChildNode->getDuration() >>= fChildDuration;
323 fChildDuration += fChildBegin;
324 if( fChildDuration > fDuration )
325 fDuration = fChildDuration;
327 if( !aTarget.hasValue() )
328 aTarget = xChildNode->getTarget();
330 xChildNode->setTarget( aEmpty );
336 xIter->setTarget( aTarget );
338 double fIterateInterval = xIter->getIterateInterval() * fDuration / 100;
339 xIter->setIterateInterval( fIterateInterval );
354 sal_Int32 nPPTNodeType = 0;
380 dump(
"<animateColor" );
384 dump(
"<animateScale" );
388 dump(
"<animateRotation" );
392 dump(
"<animateMotion" );
400 dump(
"<animateFilter" );
408 OSL_FAIL(
"unknown node atom!" );
433 dump(
"</audio>\n" );
438 OSL_FAIL(
"unknown group atom!" );
448 if( xParent.is() && xNode.is() )
450 Reference< XTimeContainer > xParentContainer( xParent, UNO_QUERY );
451 DBG_ASSERT( xParentContainer.is(),
"parent is no container, then why do I have a child here?" );
452 if( xParentContainer.is() )
454 xParentContainer->appendChild( xNode );
464 Reference< XAnimate > xAnimate( xNode, UNO_QUERY );
468 if( !xAnimate->getTarget().hasValue() )
471 const sal_Int16 nNodeType = xNode->getType();
473 if( nNodeType == AnimationNodeType::TRANSITIONFILTER )
476 OUString aAttributeName( xAnimate->getAttributeName() );
478 if( (nNodeType == AnimationNodeType::SET) && aAttributeName ==
"fill.on" )
485 if( (nNodeType == AnimationNodeType::ANIMATEMOTION) ||
486 (nNodeType == AnimationNodeType::ANIMATETRANSFORM) )
488 aAttributeName.clear();
494 if( aAttributeName.equalsAscii(
p->mpMSName ) )
500 DBG_ASSERT(
p->mpMSName || aAttributeName.isEmpty(),
"sd::AnimationImporter::convertAnimationNode(), unknown attribute!" );
502 if(
p->mpMSName == 0 )
dump(
"<error text=\"sd::AnimationImporter::convertAnimationNode(), unknown attribute!\"/>\n" );
505 eAttribute =
p->meAttribute;
508 aAttributeName = OUString::createFromAscii(
p->mpAPIName );
511 xAnimate->setAttributeName( aAttributeName );
515 Any aAny( xAnimate->getFrom() );
516 if( aAny.hasValue() )
519 xAnimate->setFrom( aAny );
522 aAny = xAnimate->getBy();
523 if( aAny.hasValue() )
526 xAnimate->setBy( aAny );
529 aAny = xAnimate->getTo();
530 if( aAny.hasValue() )
533 xAnimate->setTo( aAny );
536 Sequence< Any > aValues( xAnimate->getValues() );
537 if( aValues.hasElements() )
539 for(
Any& rValue : asNonConstRange(aValues) )
542 xAnimate->setValues( aValues );
545 OUString aFormula( xAnimate->getFormula() );
546 if( !aFormula.isEmpty() )
549 xAnimate->setFormula( aFormula );
554 Sequence< NamedValue > aUserData( xNode->getUserData() );
555 NamedValue* pLastValue = aUserData.getArray();
556 sal_Int32 nRemoved = 0;
558 bool bAfterEffect =
false;
559 sal_Int32 nMasterRel = 0;
560 for(
const NamedValue& rValue : std::as_const(aUserData) )
562 if ( rValue.Name ==
"after-effect" )
564 rValue.Value >>= bAfterEffect;
567 else if ( rValue.Name ==
"master-rel" )
569 rValue.Value >>= nMasterRel;
575 *pLastValue = rValue;
582 aUserData.realloc( aUserData.getLength() - nRemoved );
583 xNode->setUserData( aUserData );
592 if( nMasterRel != 2 )
596 aEvent.Source <<= xParent;
597 aEvent.Trigger = EventTrigger::END_EVENT;
614 bool bAfterEffect =
false;
619 sal_Int16 nRestart = AnimationRestart::DEFAULT;
622 case 1: nRestart = AnimationRestart::ALWAYS;
break;
623 case 2: nRestart = AnimationRestart::WHEN_NOT_ACTIVE;
break;
624 case 3: nRestart = AnimationRestart::NEVER;
break;
626 xNode->setRestart( nRestart );
632 sal_Int16 nFill = AnimationFill::DEFAULT;
635 case 1: nFill = AnimationFill::REMOVE;
break;
636 case 2: nFill = AnimationFill::FREEZE;
break;
637 case 3: nFill = AnimationFill::HOLD;
break;
638 case 4: nFill = AnimationFill::TRANSITION;
break;
640 xNode->setFill( nFill );
653 aDuration <<= Timing_INDEFINITE;
655 xNode->setDuration( aDuration );
661 Sequence< NamedValue > aUserData;
666 sal_Int32 nPPTNodeType = 0;
669 sal_Int16 nNodeType = css::presentation::EffectNodeType::DEFAULT;
670 switch( nPPTNodeType )
683 sal_Int32 nSize = aUserData.getLength();
684 aUserData.realloc(nSize+1);
685 auto pUserData = aUserData.getArray();
686 pUserData[nSize].Name =
"node-type";
687 pUserData[nSize].Value <<= nNodeType;
696 sal_Int32 nSize = aUserData.getLength();
697 aUserData.realloc(nSize+1);
698 auto pUserData = aUserData.getArray();
699 pUserData[nSize].Name =
"group-id";
700 pUserData[nSize].Value <<= nGroupId;
704 sal_Int16 nEffectPresetClass = EffectPresetClass::CUSTOM;
705 sal_Int32 nPresetId = 0;
709 sal_Int32 nPresetClass = 0;
712 switch( nPresetClass )
721 sal_Int32 nSize = aUserData.getLength();
722 aUserData.realloc(nSize+1);
723 auto pUserData = aUserData.getArray();
724 pUserData[nSize].Name =
"preset-class";
725 pUserData[nSize].Value <<= nEffectPresetClass;
733 sal_Int32 nSize = aUserData.getLength();
734 aUserData.realloc(nSize+1);
735 auto pUserData = aUserData.getArray();
736 pUserData[nSize].Name =
"preset-id";
739 while(
p->mpStrPresetId && ((
p->mnPresetClass != nEffectPresetClass) || (
p->mnPresetId != nPresetId )) )
742 if(
p->mpStrPresetId )
744 pUserData[nSize].Value <<= OUString::createFromAscii(
p->mpStrPresetId );
748 OUStringBuffer sBuffer(
"ppt_" );
749 switch( nEffectPresetClass )
751 case EffectPresetClass::ENTRANCE: sBuffer.append(
"entrance_" );
break;
752 case EffectPresetClass::EXIT: sBuffer.append(
"exit_" );
break;
753 case EffectPresetClass::EMPHASIS: sBuffer.append(
"emphasis_" );
break;
754 case EffectPresetClass::MOTIONPATH: sBuffer.append(
"motionpath_" );
break;
755 case EffectPresetClass::OLEACTION: sBuffer.append(
"oleaction_" );
break;
756 case EffectPresetClass::MEDIACALL: sBuffer.append(
"mediacall_" );
break;
758 sBuffer.append( nPresetId );
760 pUserData[nSize].Value <<= sBuffer.makeStringAndClear();
767 sal_Int32 nPresetSubType = 0;
772 sal_Int32 nSize = aUserData.getLength();
773 aUserData.realloc(nSize+1);
774 auto pUserData = aUserData.getArray();
775 pUserData[nSize].Name =
"preset-sub-type";
785 sal_Int32 nSize = aUserData.getLength();
786 aUserData.realloc(nSize+1);
787 auto pUserData = aUserData.getArray();
788 pUserData[nSize].Name =
"after-effect";
789 pUserData[nSize].Value <<= bAfterEffect;
795 sal_Int32 nMasterRel = 2;
798 sal_Int32 nSize = aUserData.getLength();
799 aUserData.realloc(nSize+1);
800 auto pUserData = aUserData.getArray();
801 pUserData[nSize].Name =
"master-rel";
802 pUserData[nSize].Value <<= nMasterRel;
806 xNode->setUserData( aUserData );
831 Reference< XAnimate > xAnim( xNode, UNO_QUERY );
836 if( !aString.isEmpty() )
840 sal_Int32 fromIndex = 0;
843 fromIndex = aString.indexOf(
';', fromIndex );
844 if( fromIndex == -1 )
851 Sequence< TimeFilterPair > aTimeFilter(
nElements );
853 TimeFilterPair*
pValues = aTimeFilter.getArray();
859 size_t nPos = aToken.find(
',' );
860 if(
nPos != std::u16string_view::npos )
868 xAnim->setTimeFilter( aTimeFilter );
874 Reference< XAnimateColor > xColor( xNode, UNO_QUERY );
880 bool bDirection =
false;
882 xColor->setDirection( !bDirection );
887 sal_Int32 nColorSpace = 0;
889 xColor->setColorInterpolation( (nColorSpace == 0) ? AnimationColorSpace::RGB : AnimationColorSpace::HSL );
897 DBG_ASSERT( pAtom && xNode.is(),
"invalid call to ppt::AnimationImporter::importTimeContainer()!");
898 if( pAtom && xNode.is() )
911 switch( pChildAtom->
getType() )
924 Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
925 Reference< XAnimationNode > xChildNode( Command::create(xContext), UNO_QUERY_THROW );
927 Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY );
928 if( xParentContainer.is() && xChildNode.is() )
929 xParentContainer->appendChild( xChildNode );
946 float fInterval(0.0);
947 sal_Int32 nTextUnitEffect(0), nU1(0), nU2(0), nU3(0);
951 Reference< XIterateContainer > xIter( xNode, UNO_QUERY );
954 sal_Int16 nIterateType = TextAnimationType::BY_PARAGRAPH;
955 switch( nTextUnitEffect )
957 case 1: nIterateType = TextAnimationType::BY_WORD;
break;
958 case 2: nIterateType = TextAnimationType::BY_LETTER;
break;
960 xIter->setIterateType( nIterateType );
961 xIter->setIterateInterval(
static_cast<double>(fInterval) );
967 dump(
" iterateType=\"%s\"", (nTextUnitEffect == 0) ?
"byElement" : (nTextUnitEffect == 1) ?
"byWord" :
"byLetter" );
968 dump(
" iterateInterval=\"%g\"", fInterval );
969 dump(
" u1=\"%ld\"", nU1 );
970 dump(
" u2=\"%ld\"", nU2 );
971 dump(
" u3=\"%ld\"/>\n", nU3 );
982 fprintf( mpFile,
"<unknown_0xf136 nU1=\"%" SAL_PRIdINT32
"\" nU2=\"%" SAL_PRIdINT32
"\"/>\n", nU1, nU2 );
1007 DBG_ASSERT( pAtom && xNode.is(),
"invalid call to ppt::AnimationImporter::importAnimationNodeContainer()!");
1008 if( pAtom && xNode.is() )
1019 switch( pChildAtom->
getType() )
1079 Reference< XTransitionFilter > xFilter( xNode, UNO_QUERY );
1082 if( !(pAtom && xFilter.is()) )
1085 sal_uInt32 nBits = 0;
1097 switch( pChildAtom->
getType() )
1101 sal_uInt32 transition(0);
1106 xFilter->setMode( transition == 0 );
1108 dump(
" transition=\"%s\"", (transition == 0) ?
"in" :
"out" );
1114 if( (nBits & 2 ) && ( pChildAtom->
getInstance() == 1 ) )
1127 xFilter->setTransition( pTransition->
mnType );
1128 xFilter->setSubtype( pTransition->
mnSubType );
1129 xFilter->setDirection( pTransition->
mbDirection );
1133 OSL_FAIL(
"unknown transition!" );
1145 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1160 Reference< XAnimate > xAnimate( xNode, UNO_QUERY );
1162 bool bWrongContext =
false;
1176 switch( pChildAtom->
getType() )
1187 if( aContext !=
"PPT" )
1188 bWrongContext =
true;
1200 sal_uInt32 nBits(0);
1201 sal_uInt32 nAdditive(0);
1202 sal_uInt32 nAccumulate(0);
1203 sal_uInt32 nTransformType(0);
1212 if( nBits & 3 && xAnimate.is() )
1216 sal_Int16 nTemp = AnimationAdditiveMode::BASE;
1219 case 1: nTemp = AnimationAdditiveMode::SUM;
break;
1220 case 2: nTemp = AnimationAdditiveMode::REPLACE;
break;
1221 case 3: nTemp = AnimationAdditiveMode::MULTIPLY;
break;
1222 case 4: nTemp = AnimationAdditiveMode::NONE;
break;
1224 xAnimate->setAdditive( nTemp );
1229 xAnimate->setAccumulate( nAccumulate == 0 );
1234 fprintf( mpFile,
" additive=\"%s\"", (nAdditive == 0) ?
"base" : (nAdditive == 2) ?
"replace" : (nAdditive == 1) ?
"sum" : (nAdditive == 3 ) ?
"multiply" : (nAdditive == 4) ?
"none" :
"unknown" );
1237 fprintf( mpFile,
" accumulate=\"%s\"", (nAccumulate == 0) ?
"none" :
"always" );
1240 fprintf( mpFile,
" transformType=\"%s\"", (nTransformType == 0) ?
"property" :
"image" );
1250 OUString aAttributeName;
1253 xAnimate->setAttributeName( aAttributeName );
1254 dump(
" attributeName=\"%s\"", aAttributeName );
1264 xAnimate->setSubItem( nSubType );
1266 dump(
" target=\"" );
1273 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1285 xAnimate->setTarget( aTarget );
1288 Reference< XCommand > xCommand( xNode, UNO_QUERY );
1290 xCommand->setTarget( aTarget );
1301 return AnimationColorSpace::RGB;
1304 return AnimationColorSpace::HSL;
1314 dump(
"rgb(%ld", nA );
1316 dump(
",%ld)", nC );
1322 dump(
"hsl(%ld", nA );
1324 dump(
",%ld)", nC );
1325 Sequence< double > aHSL{ nA * 360.0/255.0,
1335 dump(
"index(%ld", nA );
1336 dump(
" [%ld",
static_cast<sal_Int32
>(aColor.
GetRed()) );
1337 dump(
",%ld",
static_cast<sal_Int32
>(aColor.
GetGreen()) );
1338 dump(
",%ld])",
static_cast<sal_Int32
>(aColor.
GetBlue()) );
1344 dump(
"unknown_%ld(", nMode );
1347 dump(
",%ld)", nC );
1348 OSL_FAIL(
"ppt::implGetColorAny(), unhandled color type" );
1358 Reference< XAnimateColor > xColor( xNode, UNO_QUERY );
1361 if( !(pAtom && xColor.is()) )
1374 switch( pChildAtom->
getType() )
1379 sal_Int32 nByMode, nByA, nByB, nByC;
1380 sal_Int32 nFromMode, nFromA, nFromB, nFromC;
1381 sal_Int32 nToMode, nToA, nToB, nToC;
1389 SAL_WARN(
"filter.ms",
"DFF_msofbtAnimateColorData: short read");
1397 xColor->setColorInterpolation(
implGetColorSpace( nByMode, nByA, nByB, nByC ) );
1404 xColor->setFrom(
implGetColorAny( nFromMode, nFromA, nFromB, nFromC ) );
1405 xColor->setColorInterpolation(
implGetColorSpace( nFromMode, nFromA, nFromB, nFromC ) );
1413 xColor->setColorInterpolation(
implGetColorSpace( nToMode, nToA, nToB, nToC ) );
1424 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1434 Reference< XAnimateSet > xSet( xNode, UNO_QUERY );
1437 if( !(pAtom && xSet.is()) )
1450 switch( pChildAtom->
getType() )
1457 dump(
" set_1=\"%ld\"", nU1 );
1458 dump(
" set_2=\"%ld\"", nU2 );
1469 dump(
" value=\"" );
1481 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1491 Reference< XAnimate > xAnim( xNode, UNO_QUERY );
1494 if( !(pAtom && xAnim.is()) )
1507 switch( pChildAtom->
getType() )
1511 sal_uInt32 nCalcmode(0), nBits(0), nValueType(0);
1516 sal_Int16
n = (nCalcmode == 1) ? AnimationCalcMode::LINEAR : AnimationCalcMode::DISCRETE;
1517 xAnim->setCalcMode(
n );
1518 dump(
" calcmode=\"%s\"", (nCalcmode == 0) ?
"discrete" : (nCalcmode == 1) ?
"linear" : (nCalcmode == 2) ?
"formula" :
"unknown" );
1523 sal_Int16
n = (nValueType == 1) ? AnimationValueType::NUMBER : (nValueType == 2 ) ? AnimationValueType::COLOR : AnimationValueType::STRING;
1524 xAnim->setValueType(
n );
1525 dump(
" valueType=\"%s\"", (nValueType == 0) ?
"string" : (nValueType == 1) ?
"number" : (nValueType == 2) ?
"color" :
"unknown" );
1545 case 1: xAnim->setBy(
a );
dump(
" by=\"" );
break;
1546 case 2: xAnim->setFrom(
a );
dump(
" from=\"" );
break;
1547 case 3: xAnim->setTo(
a );
dump(
" to=\"" );
break;
1549 dump(
" unknown_value=\"" );
1558 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1568 Reference< XAnimateMotion > xMotion( xNode, UNO_QUERY );
1571 if( !(pAtom && xMotion.is()) )
1584 switch( pChildAtom->
getType() )
1588 sal_uInt32 nBits, nOrigin;
1589 float fByX, fByY, fFromX, fFromY, fToX, fToY;
1595 fprintf( mpFile,
" by=\"%g,%g\"", (
double)fByX, (
double)fByY );
1598 fprintf( mpFile,
" from=\"%g,%g\"", (
double)fFromX, (
double)fFromY );
1601 fprintf( mpFile,
" to=\"%g,%g\"", (
double)fToX, (
double)fToY );
1604 fprintf( mpFile,
" origin=\"%s\"", (nOrigin == 1) ?
"parent" : (nOrigin == 2) ?
"layout" :
"unknown" );
1616 if ( aPath >>=
aStr )
1620 if (
aStr.endsWith(
"E"))
1624 xMotion->setPath( aPath );
1638 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1648 Reference< XCommand > xCommand( xNode, UNO_QUERY );
1650 if( !(pAtom && xCommand.is()) )
1653 sal_Int32 nBits = 0;
1666 switch( pChildAtom->
getType() )
1670 sal_Int32 nCommandType;
1678 dump(
" type=\"%s\"", (nCommandType == 0) ?
"event" : ( nCommandType == 1) ?
"call" :
"verb" );
1702 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1715 sal_Int16 nCommand = EffectCommands::CUSTOM;
1717 NamedValue aParamValue;
1719 if ( aParam ==
"onstopaudio" )
1721 nCommand = EffectCommands::STOPAUDIO;
1723 else if ( aParam ==
"play" )
1725 nCommand = EffectCommands::PLAY;
1727 else if( aParam.startsWith(
"playFrom" ) )
1729 const std::u16string_view aMediaTime( aParam.subView( 9, aParam.getLength() - 10 ) );
1730 rtl_math_ConversionStatus eStatus;
1731 double fMediaTime = ::rtl::math::stringToDouble( aMediaTime,
u'.',
u',', &eStatus );
1732 if( eStatus == rtl_math_ConversionStatus_Ok )
1734 aParamValue.Name =
"MediaTime";
1735 aParamValue.Value <<= fMediaTime;
1737 nCommand = EffectCommands::PLAY;
1739 else if ( aParam ==
"togglePause" )
1741 nCommand = EffectCommands::TOGGLEPAUSE;
1743 else if ( aParam ==
"stop" )
1745 nCommand = EffectCommands::STOP;
1748 xCommand->setCommand( nCommand );
1749 if( nCommand == EffectCommands::CUSTOM )
1751 OSL_FAIL(
"sd::AnimationImporter::importCommandContainer(), unknown command!");
1752 aParamValue.Name =
"UserDefined";
1753 aParamValue.Value <<= aParam;
1756 if( aParamValue.Value.hasValue() )
1758 Sequence< NamedValue > aParamSeq( &aParamValue, 1 );
1759 xCommand->setParameter(
Any( aParamSeq ) );
1767 Reference< XAudio > xAudio( xNode, UNO_QUERY );
1771 if( pAtom && xAudio.is() )
1789 switch( pChildAtom->
getType() )
1804 dump(
" value=\"" );
1817 xAudio->setSource( aSource );
1824 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1833 xAudio->setBegin( aEmpty );
1834 xAudio->setEnd( aEmpty );
1842 Reference< XAnimateTransform > xTransform( xNode, UNO_QUERY );
1845 if( !(pAtom && xTransform.is()) )
1848 xTransform->setTransformType( AnimationTransformType::SCALE );
1860 switch( pChildAtom->
getType() )
1864 sal_uInt32 nBits(0), nZoomContents(0);
1865 float fByX(0.0), fByY(0.0), fFromX(0.0), fFromY(0.0), fToX(0.0), fToY(0.0);
1874 aPair.First <<=
static_cast<double>(fFromX) / 100.0;
1875 aPair.Second <<=
static_cast<double>(fFromY) / 100.0;
1876 xTransform->setFrom(
Any( aPair ) );
1882 aPair.First <<=
static_cast<double>(fToX) / 100.0;
1883 aPair.Second <<=
static_cast<double>(fToY) / 100.0;
1884 xTransform->setTo(
Any( aPair ) );
1890 aPair.First <<=
static_cast<double>(fByX) / 100.0;
1891 aPair.Second <<=
static_cast<double>(fByY) / 100.0;
1896 xTransform->setBy(
Any( aPair ) );
1905 xTransform->setTo(
Any( aPair ) );
1911 fprintf( mpFile,
" by=\"%g,%g\"", (
double)fByX, (
double)fByY );
1914 fprintf( mpFile,
" from=\"%g,%g\"", (
double)fFromX, (
double)fFromY );
1917 fprintf( mpFile,
" to=\"%g,%g\"", (
double)fToX, (
double)fToY );
1920 fprintf( mpFile,
" zoomContents=\"%s\"", nZoomContents ?
"true" :
"false" );
1930 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
1940 Reference< XAnimateTransform > xTransform( xNode, UNO_QUERY );
1943 if( !(pAtom && xTransform.is()) )
1946 xTransform->setTransformType( AnimationTransformType::ROTATE );
1958 switch( pChildAtom->
getType() )
1962 sal_uInt32 nBits(0), nU1(0);
1963 float fBy(0.0), fFrom(0.0), fTo(0.0);
1969 xTransform->setBy(
Any(
static_cast<double>(fBy) ) );
1972 xTransform->setFrom(
Any(
static_cast<double>(fFrom) ) );
1975 xTransform->setTo(
Any(
static_cast<double>(fTo) ) );
1979 fprintf( mpFile,
" by=\"%g\"", (
double)fBy );
1982 fprintf( mpFile,
" from=\"%g\"", (
double)fFrom );
1985 fprintf( mpFile,
" to=\"%g\"", (
double)fTo );
1988 fprintf( mpFile,
" rotation_1=\"%" SAL_PRIdINT32
"\"", nU1 );
1998 dump(
" unknown_atom=\"%ld\"",
static_cast<sal_Int32
>(pChildAtom->
getType()) );
2008 OUStringBuffer aNames;
2015 while( pAttributeValueAtom )
2021 if( aAny >>=
aName )
2023 if( !aNames.isEmpty() )
2024 aNames.append(
';' );
2026 aNames.append(
aName );
2031 OSL_FAIL(
"error during ppt::AnimationImporter::importAttributeName()!" );
2038 rAttributeNames = aNames.makeStringAndClear();
2043 DBG_ASSERT( pAtom,
"invalid call to ppt::AnimationImporter::importAnimationValues()!" );
2052 sal_uInt32
nType(0);
2060 xNode->setRepeatCount( (fRepeat < (
float(3.40282346638528860e+38))) ?
Any(
static_cast<double>(fRepeat) ) :
Any( Timing_INDEFINITE ) );
2063 if( (fRepeat < ((
float)3.40282346638528860e+38)) )
2065 dump(
" repeat=\"%g\"", (
double)fRepeat );
2069 dump(
" repeat=\"indefinite\"" );
2077 float faccelerate(0.0);
2079 xNode->setAcceleration( faccelerate );
2080 dump(
" accelerate=\"%g\"",
static_cast<double>(faccelerate) );
2086 float fdecelerate(0.0);
2088 xNode->setDecelerate( fdecelerate );
2089 dump(
" decelerate=\"%g\"",
static_cast<double>(fdecelerate) );
2095 sal_Int32 nAutoreverse(0);
2097 xNode->setAutoReverse( nAutoreverse != 0 );
2098 dump(
" autoreverse=\"%#lx\"", nAutoreverse );
2104 sal_uInt32 nUnknown;
2107 fprintf(mpFile,
" attribute_%d=\"%#lx\"",
nType, nUnknown );
2119 Reference< XAnimate > xAnim( xNode, UNO_QUERY );
2123 if( !(pAtom && xAnim.is()) )
2127 const Atom* pIter =
nullptr;
2133 Sequence< double > aKeyTimes( nKeyTimes );
2134 auto aKeyTimesRange = asNonConstRange(aKeyTimes);
2135 Sequence< Any > aValues( nKeyTimes );
2136 auto aValuesRange = asNonConstRange(aValues);
2140 bool bToNormalize =
false;
2141 for(
int nKeyTime = 0; (nKeyTime < nKeyTimes) && pIter; nKeyTime++ )
2147 double fTemp =
static_cast<double>(nTemp) / 1000.0;
2148 aKeyTimesRange[nKeyTime] = fTemp;
2150 bToNormalize =
true;
2155 Any aValue1, aValue2;
2163 aValue2 >>= aFormula;
2165 aValuesRange[nKeyTime] = aValue1;
2173 dump(
" keyTimes=\"" );
2174 for(
int i=0;
i<nKeyTimes; ++
i )
2175 dump(
"%f;", aKeyTimes[
i] );
2177 if( !aFormula.isEmpty() )
2179 dump(
"formula=\"%s", aFormula );
2182 dump(
"\" values=\"" );
2185 for(
int i=0;
i<nKeyTimes; ++
i )
2190 if( aValues[
i] >>=
aStr )
2193 RTL_TEXTENCODING_ASCII_US ).getStr() );
2194 else if( aValues[
i] >>= nVal )
2198 ValuePair aValuePair;
2200 if( aValues[
i] >>= aValuePair )
2202 if( aValuePair.First >>=
aStr )
2205 RTL_TEXTENCODING_ASCII_US ).getStr() );
2206 else if( aValuePair.First >>= nVal )
2209 dump(
"%X", (sal_Int64)&aValuePair.First );
2211 if( aValuePair.Second >>=
aStr )
2214 RTL_TEXTENCODING_ASCII_US ).getStr() );
2215 else if( aValuePair.Second >>= nVal )
2216 dump(
",%f", nVal );
2218 dump(
",%X", (sal_Int64)&aValuePair.Second );
2224 if( bToNormalize && nKeyTimes >= 2 )
2227 for(
int nKeyTime = 0; nKeyTime < nKeyTimes; ++nKeyTime )
2229 aKeyTimesRange[nKeyTime] =
static_cast<double>(nKeyTime) /
static_cast<double>(nKeyTimes - 1);
2233 if (aValues.getLength() != aKeyTimes.getLength())
2234 throw css::io::WrongFormatException();
2236 xAnim->setKeyTimes( aKeyTimes );
2237 xAnim->setValues( aValues );
2238 xAnim->setFormula( aFormula );
2249 sal_uInt32 nRecLen = pAtom->
getLength();
2273 sal_uInt32 nInt32(0);
2288 rAny <<= static_cast<double>(fFloat);
2297 if ( ( nRecLen & 1 ) && ( nRecLen > 1 ) )
2310 DBG_ASSERT( bOk,
"invalid value inside ppt::AnimationImporter::importAttributeValue()!" );
2316 DBG_ASSERT( xNode.is() && pAtom,
"invalid call to ppt::AnimationImporter::importAnimationEvents()!" );
2318 Any aBegin, aEnd, aNext, aPrev;
2323 Any* pEvents =
nullptr;
2327 case 1: pEvents = &aBegin;
break;
2328 case 2: pEvents = &aEnd;
break;
2329 case 3: pEvents = &aNext;
break;
2330 case 4: pEvents = &aPrev;
break;
2336 aEvent.Trigger = EventTrigger::NONE;
2343 switch( pChildAtom->
getType() )
2347 sal_Int32 nU1(0), nTrigger(0), nU3(0), nBegin(0);
2355 case 0:
aEvent.Trigger = EventTrigger::NONE;
break;
2356 case 1:
aEvent.Trigger = EventTrigger::ON_BEGIN;
break;
2357 case 2:
aEvent.Trigger = EventTrigger::ON_END;
break;
2358 case 3:
aEvent.Trigger = EventTrigger::BEGIN_EVENT;
break;
2359 case 4:
aEvent.Trigger = EventTrigger::END_EVENT;
break;
2360 case 5:
aEvent.Trigger = EventTrigger::ON_CLICK;
break;
2361 case 6:
aEvent.Trigger = EventTrigger::ON_DBL_CLICK;
break;
2362 case 7:
aEvent.Trigger = EventTrigger::ON_MOUSE_ENTER;
break;
2363 case 8:
aEvent.Trigger = EventTrigger::ON_MOUSE_LEAVE;
break;
2364 case 9:
aEvent.Trigger = EventTrigger::ON_NEXT;
break;
2365 case 10:
aEvent.Trigger = EventTrigger::ON_PREV;
break;
2366 case 11:
aEvent.Trigger = EventTrigger::ON_STOP_AUDIO;
break;
2369 if( (nBegin != 0) || (
aEvent.Trigger == EventTrigger::NONE) )
2370 aEvent.Offset = (nBegin == -1) ?
Any( Timing_INDEFINITE ) :
Any( nBegin / 1000.0 );
2381 OSL_FAIL(
"unknown atom inside ppt::AnimationImporter::importAnimationEvents()!");
2394 xNode->setBegin( aBegin );
2395 xNode->setEnd( aEnd );
2400 if( aBegin.hasValue() )
2402 dump(
" begin=\"" );
2407 if( aEnd.hasValue() )
2414 if( aNext.hasValue() )
2421 if( aPrev.hasValue() )
2432 DBG_ASSERT( pAtom && xNode.is(),
"invalid call to ppt::AnimationImporter::importAnimationActions()!");
2442 sal_Int32 nConcurrent(0), nNextAction(0), nEndSync(0), nU4(0), nU5(0);
2450 xNode->setEndSync(
Any( AnimationEndSync::ALL ) );
2453 dump(
" concurrent=\"%s\"", nConcurrent == 0 ?
"disabled" : (nConcurrent == 1 ?
"enabled" :
"unknown") );
2455 dump(
" nextAction=\"%s\"", nNextAction == 0 ?
"none" : (nNextAction == 1 ?
"seek" :
"unknown") );
2459 dump(
" endSync=\"%s\"", nEndSync == 1 ?
"all" :
"unknown" );
2462 dump(
" action_4=\"%#lx\"", nU4 );
2463 dump(
" action_5=\"%#lx\"", nU5 );
2469 rSubType = ShapeAnimationSubType::AS_WHOLE;
2470 sal_Int32 nRefMode = -1;
2479 switch( pChildAtom->
getType() )
2483 sal_Int32 nRefType(0), nRefId(0);
2496 if( pSdrObject ==
nullptr )
2503 case 6: rSubType = ShapeAnimationSubType::ONLY_BACKGROUND;
break;
2504 case 8: rSubType = ShapeAnimationSubType::ONLY_TEXT;
break;
2515 if( pOPO ==
nullptr )
2522 sal_Int32 nPara = 0;
2524 while( (nPara < nParaCount) && (
begin > 0) )
2526 sal_Int32 nParaLength = rEditTextObject.
GetText( nPara ).getLength() + 1;
2527 begin -= nParaLength;
2532 if( nPara < nParaCount )
2534 ParagraphTarget aParaTarget;
2535 rTarget >>= aParaTarget.Shape;
2537 aParaTarget.Paragraph =
static_cast<sal_Int16
>(nPara);
2540 rSubType = ShapeAnimationSubType::ONLY_TEXT;
2541 dump(
" paragraph %d,", nPara);
2542 dump(
" %d characters",
end );
2553 dump(
" srcRef=\"%s\"", aSoundURL );
2560 if( pSdrObject ==
nullptr )
2567 OSL_FAIL(
"unknown reference type");
2579 OSL_FAIL(
"unknown atom inside ppt::AnimationImporter::importTargetElementContainer()!");
2606 OSL_FAIL(
"unknown atom inside ppt::AnimationImporter::importPropertySetContainer()!");
2649 static char buffer[128];
2657 fprintf(mpFile,
"<%s", pTitle );
2659 fprintf(mpFile,
" instance=\"%hu\"%s",
2661 bAppend ?
"" :
">\n");
2666 fprintf(mpFile,
"/>\n");
2668 fprintf(mpFile,
"</%s>\n", pTitle );
2675 char * faul =
"0123456789abcdef";
2681 for( i = 0;
i < nLen;
i++ )
2685 fprintf( mpFile,
"%c%c ", faul[ (nData >> 4) & 0x0f ], faul[ nData & 0x0f ] );
2688 if( bNewLine && (b == 32) )
2690 fprintf(mpFile,
"\n");
2694 if( (b != 0) && bNewLine )
2695 fprintf(mpFile,
"\n");
2702 if( pAtom->isContainer() )
2704 const Atom* pChildAtom = pAtom->findFirstChildAtom();
2709 fprintf(mpFile,
"<attributeValue instance=\"%hu\"", pChildAtom->getInstance() );
2718 if( aValue >>= nInt )
2720 fprintf(mpFile,
" value=\"%" SAL_PRIdINT32
"\"", nInt );
2722 else if( aValue >>= aString )
2724 fprintf(mpFile,
" value=\"%s\"",
2726 RTL_TEXTENCODING_UTF8).getStr());
2728 else if( aValue >>= fDouble )
2730 fprintf(mpFile,
" value=\"%g\"", fDouble );
2735 if( pChildAtom->seekToContent() )
2737 fprintf(mpFile,
" value=\"" );
2739 fprintf(mpFile,
"\"");
2743 fprintf(mpFile,
"/>\n" );
2755 else if( pAtom->seekToContent() )
2757 dump( pAtom->getLength(), bNewLine );
2762void AnimationImporter::dump_anim_group(
const Atom* pAtom,
const AnimationNode& rNode,
const PropertySet& rSet,
bool bOpen )
2764 fprintf( mpFile, bOpen ?
"<" :
"</" );
2766 switch( rNode.mnGroupType )
2769 fprintf( mpFile,
"par" );
2772 fprintf( mpFile,
"seq" );
2775 switch( rNode.mnNodeType )
2778 fprintf( mpFile,
"animateFilter" );
2782 fprintf( mpFile,
"set" );
2784 fprintf( mpFile,
"animateColor" );
2786 fprintf( mpFile,
"animateScale" );
2788 fprintf( mpFile,
"animateRotation" );
2790 fprintf( mpFile,
"animateMotion" );
2792 fprintf( mpFile,
"command" );
2794 fprintf( mpFile,
"animation" );
2798 fprintf( mpFile,
"unknown_node_%#lx", rNode.mnNodeType );
2804 fprintf( mpFile,
"media" );
2807 fprintf( mpFile,
"unknown_group_%#lx", rNode.mnGroupType );
2817 fprintf(mpFile,
">\n");
2823 if( rNode.mnRestart != 0 )
2825 fprintf(mpFile,
" restart=\"%s\"",
2826 rNode.mnRestart == 1 ?
"always" : (rNode.mnRestart == 2 ?
"whenOff" : (rNode.mnRestart == 3 ?
"never" :
"unknown")) );
2831 fprintf(mpFile,
" fill=\"%s\"",
2832 rNode.mnFill == 1 ?
"remove" : (rNode.mnFill == 3 ?
"hold" : (rNode.mnFill == 2 ?
"freeze" :
"unknown")) );
2835 if( rNode.mnDuration > 0 )
2837 double fSeconds = rNode.mnDuration;
2839 fprintf(mpFile,
" dur=\"%g\"", fSeconds);
2841 else if( rNode.mnDuration < 0 )
2843 fprintf(mpFile,
" dur=\"indefinite\"" );
2846 if( rNode.mnU1 ) fprintf(mpFile,
" u1=\"%#lx\"", rNode.mnU1);
2847 if( rNode.mnU3 ) fprintf(mpFile,
" u3=\"%#lx\"", rNode.mnU3);
2848 if( rNode.mnU4 ) fprintf(mpFile,
" u4=\"%#lx\"", rNode.mnU4);
2853 Sequence< Any >
aSeq;
2863 const sal_Int32 nSize =
aSeq.getLength();
2865 while( nIndex < nSize )
2867 dump( aSeq[nIndex++] );
2869 fprintf( mpFile,
"," );
2872 else if( rAny >>= aString )
2875 RTL_TEXTENCODING_UTF8).getStr() );
2877 else if( rAny >>= nInt )
2879 fprintf( mpFile,
"%" SAL_PRIdINT32, nInt );
2881 else if( rAny >>= bBool )
2883 fprintf( mpFile,
"%s", bBool ?
"true" :
"false" );
2885 else if( rAny >>= fDouble )
2887 fprintf( mpFile,
"%g", fDouble );
2889 else if( rAny >>= aTiming )
2891 fprintf( mpFile,
"%s", aTiming == (Timing_INDEFINITE) ?
"indefinite" :
"media" );
2893 else if( rAny >>= aEvent )
2895 if(
aEvent.Trigger != EventTrigger::NONE )
2897 static const char* triggers[] =
2899 "none",
"onbegin",
"onend",
"begin",
2900 "end",
"onclick",
"ondoubleclick",
"onmouseenter",
2901 "onmouseleave",
"onpptnext",
"onpptprev",
"onstopaudio"
2904 if(
aEvent.Source.hasValue() )
2913 if(
aEvent.Offset.hasValue() )
2916 if(
aEvent.Offset >>= fOffset )
2917 fprintf( mpFile,
"%g", fOffset );
2919 dump(
"indefinite" );
2928 for(
const auto& rProp :
rSet.maProperties )
2930 bool bKnown =
false;
2932 const sal_Int32 nInstance = rProp.first;
2933 Any aAny( rProp.second );
2935 switch ( nInstance )
2939 sal_Int32 nColorSpace;
2940 if( aAny >>= nColorSpace )
2942 fprintf( mpFile,
" colorSpace=\"%s\"", (nColorSpace == 0) ?
"rgb" : (nColorSpace == 1) ?
"hsl" :
"unknown" );
2951 if( aAny >>= bDirection )
2953 fprintf( mpFile,
" direction=\"%s\"", bDirection ?
"cclockwise" :
"clockwise" );
2958 sal_Int32 nMasterRel;
2959 if( aAny >>= nMasterRel )
2961 fprintf( mpFile,
" direction=\"%s\"", nMasterRel == 0 ?
"sameClick" : ( nMasterRel == 2 ?
"nextClick" :
"lastClick" ) );
2970 sal_Int32 nOverride;
2971 if( aAny >>= nOverride )
2973 fprintf( mpFile,
" override=\"%s\"", (nOverride == 1) ?
"childStyle" : (nOverride == 0) ?
"normal" :
"unknown" );
2982 if( aAny >>= bPathEditMode )
2984 fprintf( mpFile,
" pptPathEditMode=\"%s\"", bPathEditMode ?
"relative" :
"fixed" );
2992 sal_Int32 nPresetId ;
2993 if( aAny >>= nPresetId )
2995 fprintf(mpFile,
" presetid=\"%" SAL_PRIdINT32
"\"", nPresetId );
3003 sal_Int32 nPointsType ;
3004 if( aAny >>= nPointsType )
3006 fprintf(mpFile,
" presetSubType=\"%" SAL_PRIdINT32
"\"", nPointsType );
3014 sal_Int32 nPresetClass;
3015 if ( aAny >>= nPresetClass )
3018 switch( nPresetClass )
3033 fprintf(mpFile,
" class=\"%s\"", pMode);
3035 fprintf(mpFile,
" class =\"%" SAL_PRIdINT32
"\"", nPresetClass);
3043 sal_Int32 nNodeType;
3044 if ( aAny >>= nNodeType )
3057 static char buffer[128];
3058 sprintf( buffer,
"%" SAL_PRIdINT32, nNodeType );
3064 fprintf(mpFile,
" nodeType=\"%s\"", pNode);
3073 if ( aAny >>= nGroupId )
3075 fprintf( mpFile,
" groupId=\"%" SAL_PRIdINT32
"\"", nGroupId );
3084 if( aAny >>= aString )
3086 fprintf( mpFile,
" id=\"%s\"",
3088 RTL_TEXTENCODING_UTF8).getStr() );
3097 if( aAny >>= aString )
3099 fprintf( mpFile,
" eventFilter=\"%s\"",
3101 RTL_TEXTENCODING_UTF8).getStr() );
3109 sal_Int32 nEndAfterSlide;
3110 if( aAny >>= nEndAfterSlide )
3112 fprintf(mpFile,
" endAfterSlide=\"%" SAL_PRIdINT32
"\"", nEndAfterSlide );
3120 if( aAny >>= aString )
3122 fprintf( mpFile,
" timeFilter=\"%s\"",
3124 RTL_TEXTENCODING_UTF8).getStr() );
3133 if( aAny >>= aString )
3135 fprintf( mpFile,
" runtimeContext=\"%s\"",
3137 RTL_TEXTENCODING_UTF8).getStr() );
3145 double fVolume(0.0);
3146 if( aAny >>= fVolume )
3148 fprintf( mpFile,
" volume=\"%g%%\"", (
double)(fVolume * 100.0) );
3157 if( aAny >>= bAfterEffect )
3159 fprintf( mpFile,
"afterEffect=\"%s\"", bAfterEffect ?
"true" :
"false" );
3169 fprintf( mpFile,
" unknown_%" SAL_PRIdINT32
"=\"", nInstance );
3171 fprintf( mpFile,
"\"" );
3178 Any aSource, aSourceData;
3179 Sequence< Any >
aSeq;
3182 if(
aSeq.getLength() >= 1 ) aSource =
aSeq[0];
3183 if(
aSeq.getLength() >= 2 ) aSourceData =
aSeq[1];
3190 Reference< XShape > xShape;
3194 OUString
aStr( xShape->getShapeType() );
3197 if( aSourceData.hasValue() )
3200 dump( aSourceData );
3208 fprintf( mpFile,
"%s", pText );
3214 RTL_TEXTENCODING_UTF8).getStr() );
3219 fprintf( mpFile, pText, nInt );
3224 fprintf( mpFile, pText, nInt );
3229 fprintf( mpFile, pText, fDouble );
3234 fprintf( mpFile, pText, pText2 );
3240 RTL_TEXTENCODING_UTF8).getStr() );
const PropertyValue * pValues
Color GetRGBColor() const
sal_uInt8 GetBlue() const
sal_uInt8 GetGreen() const
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
OUString ReadSound(sal_uInt32 nSoundRef) const
const EditTextObject & GetTextObject() const
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color &rColor) const override
virtual OutlinerParaObject * GetOutlinerParaObject() const override
SvStream & ReadFloat(float &rFloat)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadChar(char &rChar)
SvStream & ReadInt32(sal_Int32 &rInt32)
SvStream & ReadSChar(signed char &rChar)
SvStream & ReadUChar(unsigned char &rChar)
SdrObject * getShapeForId(sal_Int32 nShapeId)
static OUString MSDFFReadZString(SvStream &rIn, sal_uInt32 nMaxLen, bool bUniCode)
std::vector< sd::AfterEffectNode > maAfterEffectNodes
int importAudioContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
static sal_Int16 implGetColorSpace(sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC)
int importAnimationContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xParent)
void importAttributeNamesContainer(const Atom *pAtom, OUString &rAttributeNames)
static void dump_atom(const Atom *pAtom, bool bNewLine=true)
void importCommandContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importAnimateFilterContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
ImplSdPPTImport * mpPPTImport
void importAnimateRotationContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importAnimateContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
css::uno::Reference< css::animations::XAnimationNode > mxRootNode
void importAnimateScaleContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importAnimateSetContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
static void dump(css::uno::Any &rAny)
void importAnimationValues(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
static css::uno::Reference< css::animations::XAnimationNode > createNode(const Atom *pAtom, const AnimationNode &rNode)
int import(const css::uno::Reference< css::drawing::XDrawPage > &xPage, const DffRecordHeader &rProgTagContentHd)
int importAnimationNodeContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
css::uno::Any implGetColorAny(sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC)
void importAnimateMotionContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importAnimateColorContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
bool convertAnimationNode(const css::uno::Reference< css::animations::XAnimationNode > &xNode, const css::uno::Reference< css::animations::XAnimationNode > &xParent)
static void dump_atom_header(const Atom *pAtom, bool bOpen, bool bAppend)
bool importAttributeValue(const Atom *pAtom, css::uno::Any &rAny)
void importAnimateKeyPoints(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importPropertySetContainer(const Atom *pAtom, PropertySet &rSet)
int importTimeContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
static void dump_target(css::uno::Any &rAny)
static void fillNode(css::uno::Reference< css::animations::XAnimationNode > const &xTiming, const AnimationNode &rNode, const PropertySet &rSet)
void importTargetElementContainer(const Atom *pAtom, css::uno::Any &rTarget, sal_Int16 &nSubType)
void importAnimateAttributeTargetContainer(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
void importAnimationEvents(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
AnimationImporter(ImplSdPPTImport *pPPTImport, SvStream &rStCtrl)
void importAnimationActions(const Atom *pAtom, const css::uno::Reference< css::animations::XAnimationNode > &xNode)
const Atom * findFirstChildAtom(sal_uInt16 nRecType) const
bool seekToContent() const
seeks to the contents of this atom
sal_uInt16 getType() const
bool hasChildAtom(sal_uInt16 nRecType) const
sal_uInt16 getInstance() const
sal_uInt32 getLength() const
static Atom * import(const DffRecordHeader &rRootRecordHeader, SvStream &rStCtrl)
imports this atom and its child atoms
const Atom * findNextChildAtom(sal_uInt16 nRecType, const Atom *pLast) const
returns the next child atom after pLast with nRecType or NULL
bool hasProperty(sal_Int32 nProperty) const
PropertySetMap_t maProperties
css::uno::Any getProperty(sal_Int32 nProperty) const
#define DBG_ASSERT(sCon, aError)
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
int sprintf(char(&s)[N], char const *format, T &&... arguments)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
double toDouble(std::u16string_view str)
enumrange< T >::Iterator begin(enumrange< T >)
bool convertMeasure(OUString &rString)
const ImplAttributeNameConversion * getAttributeConversionList()
void fixMainSequenceTiming(const css::uno::Reference< css::animations::XAnimationNode > &xNode)
bool convertAnimationValue(AnimationAttributeEnum eAttribute, css::uno::Any &rValue)
void fixInteractiveSequenceTiming(const css::uno::Reference< css::animations::XAnimationNode > &xNode)
OUString getConvertedSubType(sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType)
Any addToSequence(const Any &rOldValue, const Any &rNewValue)
const sal_Int32 mso_Anim_GroupType_MEDIA
const sal_Int32 mso_Anim_Behaviour_ANIMATION
static SvStream & operator>>(SvStream &rIn, AnimationNode &rNode)
const sal_Int32 mso_Anim_GroupType_PAR
const sal_Int32 mso_Anim_GroupType_SEQ
const sal_Int32 mso_Anim_Behaviour_FILTER
static bool is_random(const AnimationNode &rNode, const PropertySet &rSet, sal_Int32 &rPresetClass)
const sal_Int32 mso_Anim_GroupType_NODE
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
void stl_process_after_effect_node_func(AfterEffectNode const &rNode)
inserts the animation node in the given AfterEffectNode at the correct position in the timing hierarc...
Reference< XInterface > RandomAnimationNode_createInstance(sal_Int16 nPresetClass)
#define DFF_ANIM_RUNTIMECONTEXT
#define DFF_ANIM_PRESS_CLASS_OLE_ACTION
#define DFF_msofbtAnimateRotationData
#define DFF_msofbtAnimAction
#define DFF_msofbtAnimateMotionData
#define DFF_ANIM_GROUP_ID
#define DFF_msofbtAnimateTargetSettings
#define DFF_msofbtAnimPropertySet
#define DFF_msofbtAnimCommand
#define DFF_ANIM_NODE_TYPE_WITH_GROUP
#define DFF_msofbtAnimateFilterData
#define DFF_msofbtAnimateSetData
#define DFF_msofbtAnimValue
#define DFF_ANIM_DIRECTION
#define DFF_msofbtAnimKeyPoints
#define DFF_msofbtAnimSubGoup
#define DFF_ANIM_PRESS_CLASS_USER_DEFINED
#define DFF_ANIM_NODE_TYPE_ON_CLICK
#define DFF_ANIM_EVENT_FILTER
#define DFF_msofbtAnimateTarget
#define DFF_ANIM_PRESET_SUB_TYPE
#define DFF_ANIM_NODE_TYPE
#define DFF_ANIM_NODE_TYPE_CLICK_PARALLEL
#define DFF_ANIM_NODE_TYPE_AFTER_GROUP
#define DFF_ANIM_PATH_EDIT_MODE
#define DFF_ANIM_AFTEREFFECT
#define DFF_msofbtAnimReference
#define DFF_msofbtAnimGroup
#define DFF_msofbtAnimateAttributeNames
#define DFF_msofbtAnimateTargetElement
#define DFF_msofbtAnimIteration
#define DFF_ANIM_TIMEFILTER
#define DFF_ANIM_NODE_TYPE_WITH_PREVIOUS
#define DFF_ANIM_OVERRIDE
#define DFF_msofbtAnimKeyTime
#define DFF_ANIM_PRESET_CLASS
#define DFF_ANIM_MASTERREL
#define DFF_ANIM_NODE_TYPE_INTERACTIVE_SEQ
#define DFF_ANIM_NODE_TYPE_AFTER_PREVIOUS
#define DFF_msofbtAnimTrigger
#define DFF_msofbtAnimAttributeValue
#define DFF_ANIM_PRESS_CLASS_EXIT
#define DFF_msofbtAnimNode
#define DFF_ANIM_PRESS_CLASS_EMPHASIS
#define DFF_ANIM_PROP_TYPE_UNISTRING
#define DFF_msofbtAnimateData
#define DFF_ANIM_NODE_TYPE_TIMING_ROOT
#define DFF_msofbtAnimateScale
#define DFF_ANIM_NODE_TYPE_MAIN_SEQUENCE
#define DFF_msofbtAnimEvent
#define DFF_msofbtAnimateScaleData
#define DFF_msofbtAnimateSet
#define DFF_ANIM_PRESET_ID
#define DFF_msofbtAnimateRotation
#define DFF_ANIM_PROP_TYPE_BYTE
#define DFF_ANIM_PRESS_CLASS_MOTIONPATH
#define DFF_ANIM_PROP_TYPE_INT32
#define DFF_ANIM_PRESS_CLASS_ENTRANCE
#define DFF_ANIM_ENDAFTERSLIDE
#define DFF_msofbtAnimateMotion
#define DFF_ANIM_COLORSPACE
#define DFF_ANIM_PROP_TYPE_FLOAT
#define DFF_msofbtAnimateFilter
#define DFF_msofbtCommandData
#define DFF_ANIM_PRESS_CLASS_MEDIACALL
#define DFF_msofbtAnimate
#define DFF_msofbtAnimateColorData
#define DFF_msofbtAnimateColor
static const preset_mapping * getList()
static const transition * find(std::u16string_view rName)
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
stores the link between an after effect node and its master for later insertion into the timing hiera...
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)