summaryrefslogtreecommitdiff
path: root/sd/source/core/EffectMigration.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/core/EffectMigration.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/core/EffectMigration.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index cbb9a1019baf..26d032d8bb6f 100644..100755
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/presentation/ParagraphTarget.hpp>
#include <svx/unoshape.hxx>
#include <svx/svdotext.hxx>
+#include <svx/svdopath.hxx>
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include <CustomAnimationPreset.hxx>
@@ -1342,3 +1343,28 @@ sal_Bool EffectMigration::GetSoundOn( SvxShape* pShape )
return GetSoundFile( pShape ).getLength() != 0;
}
+// --------------------------------------------------------------------
+
+void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj )
+{
+ if( pShape && pPathObj )
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+
+ if( pObj )
+ {
+ //sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->GetPage())->getMainSequence();
+
+ const Reference< XShape > xShape( pShape );
+ SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 );
+ if( pPage )
+ {
+ boost::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
+ if( pMainSequence.get() )
+ CustomAnimationEffectPtr pCreated( pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0 ) );
+ }
+ }
+ }
+}
+
+