diff options
Diffstat (limited to 'sd/source/ui/func/fuinsert.cxx')
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
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) ) { |