summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/grfshex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/shells/grfshex.cxx')
-rw-r--r--sw/source/uibase/shells/grfshex.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 6536cf576d97..e31d5a148b62 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -123,9 +123,10 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq )
if (!bRet) { return bRet; }
}
- SdrMediaObj* pObj = new SdrMediaObj( tools::Rectangle( aPos, aSize ) );
+ SdrMediaObj* pObj = new SdrMediaObj(
+ *rSh.GetDoc()->getIDocumentDrawModelAccess().GetDrawModel(),
+ tools::Rectangle(aPos, aSize));
- pObj->SetModel(rSh.GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()); // set before setURL
pObj->setURL( realURL, "" );
rSh.EnterStdMode();
rSh.SwFEShell::InsertDrawObj( *pObj, aPos );