summaryrefslogtreecommitdiff
path: root/sd/source/core
diff options
context:
space:
mode:
authorChristian Lippka ORACLE <christian.lippka@oracle.com>2011-12-06 02:48:42 +0100
committerThorsten Behrens <tbehrens@suse.com>2011-12-06 09:39:12 +0100
commitf0a1b95f99bed6d184e3020b5c7e30bc6c1597f6 (patch)
treee30279438605a800855f9e2ce65accbdc6b88d91 /sd/source/core
parent15aeab6cbd0b50b1d78646f03588237b8473285c (diff)
impress210: #i41995# fixed import of path animation from sxi files
# HG changeset patch # User Christian Lippka ORACLE <christian.lippka@oracle.com> # Date 1299691949 -3600 # Node ID 8edc33ef50a3b6ebbc4e88d574b6b1ba57b1dbaa # Parent 0b9b11216b0d3401f8824542dd5f2794eb141035 impress210: #i41995# fixed import of path animation from sxi files
Diffstat (limited to 'sd/source/core')
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx1
-rw-r--r--sd/source/core/EffectMigration.cxx25
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 054fcd0c4748..7deb7cfa0ed9 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1735,6 +1735,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj
SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() );
if( pObj )
{
+ pObj->RecalcBoundRect(true);
const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const Point aCenter( aBoundRect.Center() );
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 9d03a10fafed..f90808d9368a 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -32,6 +32,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>
@@ -1319,4 +1320,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 ) );
+ }
+ }
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */