summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fucon3d.cxx38
-rw-r--r--sd/source/ui/func/fuconarc.cxx15
-rw-r--r--sd/source/ui/func/fuconbez.cxx5
-rw-r--r--sd/source/ui/func/fuconcs.cxx7
-rw-r--r--sd/source/ui/func/fuconrec.cxx31
-rw-r--r--sd/source/ui/func/fuconstr.cxx12
-rw-r--r--sd/source/ui/func/fuconuno.cxx5
-rw-r--r--sd/source/ui/func/fuinsert.cxx13
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sd/source/ui/func/fumorph.cxx7
-rw-r--r--sd/source/ui/func/futext.cxx9
-rw-r--r--sd/source/ui/func/unoaprms.cxx2
12 files changed, 95 insertions, 53 deletions
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index 5fe097765688..f74db13144eb 100644
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -89,6 +89,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
case SID_3D_CUBE:
{
p3DObj = new E3dCubeObj(
+ mpView->getSdrModelFromSdrView(),
mpView->Get3DDefaultAttributes(),
::basegfx::B3DPoint(-2500, -2500, -2500),
::basegfx::B3DVector(5000, 5000, 5000));
@@ -98,6 +99,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
case SID_3D_SPHERE:
{
p3DObj = new E3dSphereObj(
+ mpView->getSdrModelFromSdrView(),
mpView->Get3DDefaultAttributes(),
::basegfx::B3DPoint(0, 0, 0),
::basegfx::B3DVector(5000, 5000, 5000));
@@ -114,7 +116,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
{
aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
}
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aB2DPolygon));
/* this is an open object, therefore it has to be handled double-
sided by default */
@@ -141,7 +146,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
{
aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
}
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aB2DPolygon));
break;
}
@@ -152,7 +160,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
{
aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
}
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aB2DPolygon));
break;
}
@@ -178,7 +189,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
aInnerPoly.append(::basegfx::B2DPoint(0, -1000*5));
aInnerPoly.setClosed(true);
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aInnerPoly));
break;
}
@@ -202,7 +216,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5));
aInnerPoly.setClosed(true);
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aInnerPoly));
break;
}
@@ -226,7 +243,10 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5));
aInnerPoly.setClosed(true);
- p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly));
+ p3DObj = new E3dLatheObj(
+ mpView->getSdrModelFromSdrView(),
+ mpView->Get3DDefaultAttributes(),
+ ::basegfx::B2DPolyPolygon(aInnerPoly));
p3DObj->SetMergedItem(makeSvx3DHorizontalSegmentsItem(4));
break;
}
@@ -373,7 +393,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const
double fW(aVolume.getWidth());
double fH(aVolume.getHeight());
::tools::Rectangle a3DRect(0, 0, static_cast<long>(fW), static_cast<long>(fH));
- E3dScene* pScene = new E3dScene;
+ E3dScene* pScene = new E3dScene(*mpDoc);
// copied code from E3dView::InitScene
double fCamZ(aVolume.getMaxZ() + ((fW + fH) / 4.0));
@@ -387,13 +407,9 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const
aCam.SetFocalLength(mpView->GetDefaultCamFocal());
aCam.SetDefaults(::basegfx::B3DPoint(0.0, 0.0, fDefaultCamPosZ), aLookAt);
pScene->SetCamera(aCam);
-
pScene->Insert3DObj(p3DObj);
pScene->NbcSetSnapRect(a3DRect);
- pScene->SetModel(mpDoc);
-
ImpPrepareBasic3DShape(p3DObj, pScene);
-
SfxItemSet aAttr(mpDoc->GetPool());
SetStyleSheet(aAttr, p3DObj);
aAttr.Put(XLineStyleItem (drawing::LineStyle_NONE));
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 7d6aca665a37..6967a1495017 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -91,10 +91,12 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
Activate(); // sets aObjKind
SdrCircObj* pNewCircle =
- new SdrCircObj(static_cast<SdrObjKind>(mpView->GetCurrentObjIdentifier()),
- aNewRectangle,
- static_cast<long>(pPhiStart->GetValue () * 10.0),
- static_cast<long>(pPhiEnd->GetValue () * 10.0));
+ new SdrCircObj(
+ mpView->getSdrModelFromSdrView(),
+ static_cast<SdrObjKind>(mpView->GetCurrentObjIdentifier()),
+ aNewRectangle,
+ static_cast<long>(pPhiStart->GetValue () * 10.0),
+ static_cast<long>(pPhiEnd->GetValue () * 10.0));
SdrPageView *pPV = mpView->GetSdrPageView();
mpView->InsertObjectAtView(pNewCircle, *pPV, SdrInsertFlags::SETDEFLAYER);
@@ -202,8 +204,9 @@ SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const ::too
{
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier());
if(pObj)
{
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index e7cc868d495b..cad7080afd6b 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -309,8 +309,9 @@ SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, c
// case SID_DRAW_BEZIER_NOFILL: // BASIC
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier());
if(pObj)
{
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 6396eeb46e82..97a60a302c11 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -188,7 +188,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest(
- pObj->GetModel()->GetItemPool(),
+ pObj->getSdrModelFromSdrObject().GetItemPool(),
svl::Items<
// Ranges from SdrAttrObj:
SDRATTR_START, SDRATTR_SHADOW_LAST,
@@ -236,8 +236,9 @@ const OUString& FuConstructCustomShape::GetShapeType() const
SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& rRectangle)
{
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier());
if( pObj )
{
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 1377429ed056..d78fd866755d 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -109,7 +109,10 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
pCenterY->GetValue () - pAxisY->GetValue () / 2,
pCenterX->GetValue () + pAxisX->GetValue () / 2,
pCenterY->GetValue () + pAxisY->GetValue () / 2);
- SdrCircObj *pNewCircle = new SdrCircObj (OBJ_CIRC, aNewRectangle);
+ SdrCircObj *pNewCircle = new SdrCircObj(
+ mpView->getSdrModelFromSdrView(),
+ OBJ_CIRC,
+ aNewRectangle);
SdrPageView *pPV = mpView->GetSdrPageView();
mpView->InsertObjectAtView(pNewCircle, *pPV, SdrInsertFlags::SETDEFLAYER | SdrInsertFlags::SETDEFATTR);
@@ -127,7 +130,9 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
pMouseStartY->GetValue (),
pMouseEndX->GetValue (),
pMouseEndY->GetValue ());
- SdrRectObj *pNewRect = new SdrRectObj (aNewRectangle);
+ SdrRectObj *pNewRect = new SdrRectObj(
+ mpView->getSdrModelFromSdrView(),
+ aNewRectangle);
SdrPageView *pPV = mpView->GetSdrPageView();
mpView->InsertObjectAtView(pNewRect, *pPV, SdrInsertFlags::SETDEFLAYER | SdrInsertFlags::SETDEFATTR);
@@ -477,9 +482,9 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
// dimension line
SdPage* pPage = static_cast<SdPage*>( mpView->GetSdrPageView()->GetPage() );
OUString aName(SdResId(STR_POOLSHEET_MEASURE));
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pPage->GetModel()->
- GetStyleSheetPool()->
- Find(aName, SfxStyleFamily::Para));
+ SfxStyleSheet* pSheet(
+ static_cast< SfxStyleSheet* >(
+ pPage->getSdrModelFromSdrPage().GetStyleSheetPool()->Find(aName, SfxStyleFamily::Para)));
DBG_ASSERT(pSheet, "StyleSheet missing");
if (pSheet)
@@ -496,10 +501,10 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
/**
* set line starts and ends for the object to be created
*/
-::basegfx::B2DPolyPolygon getPolygon(const char* pResId, SdrModel const * pDoc)
+::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& rModel)
{
::basegfx::B2DPolyPolygon aRetval;
- XLineEndListRef pLineEndList = pDoc->GetLineEndList();
+ XLineEndListRef pLineEndList(rModel.GetLineEndList());
if( pLineEndList.is() )
{
@@ -536,9 +541,10 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj
nSlotId == SID_LINE_SQUARE_ARROW )
{
// set attributes of line start and ends
+ SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
// arrowhead
- ::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, mpDoc ) );
+ ::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) );
if( !aArrow.count() )
{
::basegfx::B2DPolygon aNewArrow;
@@ -550,7 +556,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj
}
// Circles
- ::basegfx::B2DPolyPolygon aCircle( getPolygon( RID_SVXSTR_CIRCLE, mpDoc ) );
+ ::basegfx::B2DPolyPolygon aCircle( getPolygon( RID_SVXSTR_CIRCLE, rModel ) );
if( !aCircle.count() )
{
::basegfx::B2DPolygon aNewCircle;
@@ -560,7 +566,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj
}
// Square
- ::basegfx::B2DPolyPolygon aSquare( getPolygon( RID_SVXSTR_SQUARE, mpDoc ) );
+ ::basegfx::B2DPolyPolygon aSquare( getPolygon( RID_SVXSTR_SQUARE, rModel ) );
if( !aSquare.count() )
{
::basegfx::B2DPolygon aNewSquare;
@@ -764,8 +770,9 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const
// case SID_CONNECTOR_LINES_CIRCLES:
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier());
if(pObj)
{
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 8f376fb3d72a..9e15f47a070a 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -318,9 +318,9 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
OUString aName( pPage->GetLayoutName() );
sal_Int32 n = aName.indexOf(SD_LT_SEPARATOR) + strlen(SD_LT_SEPARATOR);
aName = aName.copy(0, n) + STR_LAYOUT_BACKGROUNDOBJECTS;
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()->
- GetStyleSheetPool()->
- Find(aName, SfxStyleFamily::Page));
+ SfxStyleSheet* pSheet(
+ static_cast< SfxStyleSheet* >(
+ pPage->getSdrModelFromSdrPage().GetStyleSheetPool()->Find(aName, SfxStyleFamily::Page)));
DBG_ASSERT(pSheet, "StyleSheet missing");
if (pSheet)
{
@@ -348,9 +348,9 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
if ( bForceNoFillStyle )
{
OUString aName(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()->
- GetStyleSheetPool()->
- Find(aName, SfxStyleFamily::Para));
+ SfxStyleSheet* pSheet(
+ static_cast< SfxStyleSheet* >(
+ pPage->getSdrModelFromSdrPage().GetStyleSheetPool()->Find(aName, SfxStyleFamily::Para)));
DBG_ASSERT(pSheet, "Stylesheet missing");
if (pSheet)
{
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index 935cb0c50157..8ff99fdb7e00 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -138,8 +138,9 @@ SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const ::
// case SID_FM_CREATE_CONTROL:
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier());
if(pObj)
{
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 0cdd22da3807..ad22e00dc71b 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -386,7 +386,11 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
aRect = ::tools::Rectangle(aPos, aSize);
}
- SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
+ SdrOle2Obj* pOleObj = new SdrOle2Obj(
+ mpView->getSdrModelFromSdrView(),
+ svt::EmbeddedObjectRef( xObj, nAspect ),
+ aObjName,
+ aRect);
SdrPageView* pPV = mpView->GetSdrPageView();
// if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
@@ -613,8 +617,11 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
Point aPnt ((aPageSize.Width() - aSize.Width()) / 2,
(aPageSize.Height() - aSize.Height()) / 2);
::tools::Rectangle aRect (aPnt, aSize);
-
- SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect);
+ SdrOle2Obj* pObj = new SdrOle2Obj(
+ mpView->getSdrModelFromSdrView(),
+ aObjRef,
+ aName,
+ aRect);
if( mpView->InsertObjectAtView(pObj, *pPV, SdrInsertFlags::SETDEFLAYER) )
{
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index fae84526e97f..5ad65b627063 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -506,7 +506,9 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
}
else
{
- SdrRectObj* pTO = new SdrRectObj(OBJ_TEXT);
+ SdrRectObj* pTO = new SdrRectObj(
+ mpView->getSdrModelFromSdrView(),
+ OBJ_TEXT);
pTO->SetOutlinerParaObject(pOPO);
const bool bUndo = mpView->IsUndoEnabled();
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index b78c018747ed..03aa0b0ad656 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -384,7 +384,7 @@ void FuMorph::ImpInsertPolygons(
if ( pPageView )
{
SfxItemSet aSet( aSet1 );
- SdrObjGroup* pObjGroup = new SdrObjGroup;
+ SdrObjGroup* pObjGroup = new SdrObjGroup(mpView->getSdrModelFromSdrView());
SdrObjList* pObjList = pObjGroup->GetSubList();
const size_t nCount = rPolyPolyList3D.size();
const double fStep = 1. / ( nCount + 1 );
@@ -397,7 +397,10 @@ void FuMorph::ImpInsertPolygons(
for ( size_t i = 0; i < nCount; i++, fFactor += fStep )
{
const ::basegfx::B2DPolyPolygon& rPolyPoly3D = *rPolyPolyList3D[ i ];
- SdrPathObj* pNewObj = new SdrPathObj(OBJ_POLY, rPolyPoly3D);
+ SdrPathObj* pNewObj = new SdrPathObj(
+ mpView->getSdrModelFromSdrView(),
+ OBJ_POLY,
+ rPolyPoly3D);
// line color
if ( bLineColor )
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 300e17c09cc5..b6d81901f870 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -691,7 +691,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// outliner object up to now; also it needs to be set back to not
// vertical when there was a vertical one used last time.
OutlinerParaObject* pOPO = GetTextObj()->GetOutlinerParaObject();
- SdrOutliner& rOutl = mxTextObj->GetModel()->GetDrawOutliner(GetTextObj());
+ SdrOutliner& rOutl(mxTextObj->getSdrModelFromSdrObject().GetDrawOutliner(GetTextObj()));
bool bVertical((pOPO && pOPO->IsVertical())
|| nSlotId == SID_ATTR_CHAR_VERTICAL
|| nSlotId == SID_TEXT_FITTOSIZE_VERTICAL);
@@ -1304,10 +1304,11 @@ void FuText::DoubleClick(const MouseEvent& )
*/
SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle)
{
-
SdrObject* pObj = SdrObjFactory::MakeNewObject(
- mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- nullptr, mpDoc);
+ mpView->getSdrModelFromSdrView(),
+ mpView->GetCurrentObjInventor(),
+ mpView->GetCurrentObjIdentifier(),
+ nullptr);
if(pObj)
{
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index 021dc5ba7a02..ab46b90ac8ee 100644
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -27,7 +27,7 @@ void SdAnimationPrmsUndoAction::Undo()
// no new info created: restore data
if (!bInfoCreated)
{
- SdDrawDocument* pDoc = static_cast<SdDrawDocument*>(pObject->GetModel());
+ SdDrawDocument* pDoc(dynamic_cast< SdDrawDocument* >(&pObject->getSdrModelFromSdrObject()));
if( pDoc )
{
SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo( pObject );