diff options
Diffstat (limited to 'sd/source/ui/dlg/animobjs.cxx')
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index a9b324d1fd24..5ca6bab37ebd 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -777,12 +777,8 @@ void AnimationWindow::AddObj (::sd::View& rView ) for( size_t nObject = 0; nObject < pObjList->GetObjCount(); ++nObject ) { - SdrObject* pSnapShot = pObjList->GetObj( nObject ); - - BitmapEx *const pBitmapEx = new BitmapEx( - SdrExchangeView::GetObjGraphic( - pSnapShot->GetModel(), pSnapShot).GetBitmapEx() ); - + SdrObject* pSnapShot(pObjList->GetObj(nObject)); + BitmapEx *const pBitmapEx = new BitmapEx(SdrExchangeView::GetObjGraphic(*pSnapShot).GetBitmapEx()); ::tools::Time* pTime = new ::tools::Time( m_pTimeField->GetTime() ); size_t nIndex = m_nCurrentFrame + 1; m_FrameList.insert( @@ -830,14 +826,9 @@ void AnimationWindow::AddObj (::sd::View& rView ) for( size_t nObject= 0; nObject < nMarkCount; ++nObject ) { // Clone - SdrObject* pObject = rMarkList.GetMark( nObject )->GetMarkedSdrObj(); - - BitmapEx *const pBitmapEx = new BitmapEx( - SdrExchangeView::GetObjGraphic( - pObject->GetModel(), pObject).GetBitmapEx() ); - + SdrObject* pObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()); + BitmapEx *const pBitmapEx = new BitmapEx(SdrExchangeView::GetObjGraphic(*pObject).GetBitmapEx()); ::tools::Time* pTime = new ::tools::Time( m_pTimeField->GetTime() ); - size_t nIndex = m_nCurrentFrame + 1; m_FrameList.insert( m_FrameList.begin() + nIndex, @@ -852,7 +843,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) } else { - SdrObjGroup* pCloneGroup = new SdrObjGroup; + SdrObjGroup* pCloneGroup = new SdrObjGroup(rView.getSdrModelFromSdrView()); SdrObjList* pObjList = pCloneGroup->GetSubList(); for (size_t nObject= 0; nObject < nMarkCount; ++nObject) @@ -1000,7 +991,9 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) aAnimation.SetLoopCount( nLoopCount ); } - SdrGrafObj* pGrafObj = new SdrGrafObj( Graphic( aAnimation ) ); + SdrGrafObj* pGrafObj = new SdrGrafObj( + rView.getSdrModelFromSdrView(), + Graphic(aAnimation)); const Point aOrg( aWindowCenter.X() - ( aMaxSizeLog.Width() >> 1 ), aWindowCenter.Y() - ( aMaxSizeLog.Height() >> 1 ) ); pGrafObj->SetLogicRect( ::tools::Rectangle( aOrg, aMaxSizeLog ) ); @@ -1073,7 +1066,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) if(pTargetSdPage) { // create animation group - SdrObjGroup* pGroup = new SdrObjGroup; + SdrObjGroup* pGroup = new SdrObjGroup(rView.getSdrModelFromSdrView()); SdrObjList* pObjList = pGroup->GetSubList(); for (size_t i = 0; i < nCount; ++i) |