summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-12-03 00:10:10 +0100
committerMichael Stahl <mstahl@redhat.com>2011-12-03 00:48:16 +0100
commit59307a7164e35396f34bf621ad7e9d2f265b1c7f (patch)
tree3282a95522303ff1553e0b4f3fda8f1978ce4830 /sw
parent116ad02ae89a0036a223ef943352587119a47f65 (diff)
actually play embedded media:
In order to do this, the media is written to a temp file by avmedia::MediaWindowBaseImpl. This requires some rather ugly hacks to transport the Storage that contains the media to the avmedia stuff, including adding a XModel reference to avmedia::MediaItem.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/shells/grfshex.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index 4b98002c3b57..e3807cba4a78 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -136,6 +136,8 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
else
aSize = Size( 2835, 2835 );
+ uno::Reference<frame::XModel> const xModel(
+ rSh.GetDoc()->GetDocShell()->GetModel());
::rtl::OUString realURL;
if (bLink)
{
@@ -143,15 +145,13 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
}
else
{
- uno::Reference<frame::XModel> const xModel(
- rSh.GetDoc()->GetDocShell()->GetModel());
bRet = ::avmedia::EmbedMedia(xModel, aURL, realURL);
if (!bRet) { return bRet; }
}
SdrMediaObj* pObj = new SdrMediaObj( Rectangle( aPos, aSize ) );
- pObj->setURL( realURL );
+ pObj->setURL( realURL, (bLink) ? 0 : xModel );
rSh.EnterStdMode();
rSh.SwFEShell::InsertDrawObj( *pObj, aPos );
bRet = true;