diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-12-03 00:10:10 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-03 00:48:16 +0100 |
commit | 59307a7164e35396f34bf621ad7e9d2f265b1c7f (patch) | |
tree | 3282a95522303ff1553e0b4f3fda8f1978ce4830 /sd/source/ui/view | |
parent | 116ad02ae89a0036a223ef943352587119a47f65 (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 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index f42ad34cbc24..4e6218dbeb2e 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -287,6 +287,8 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc const Point& rPos, const Size& rSize, bool const bLink ) { + uno::Reference<frame::XModel> const xModel( + GetDoc()->GetObjectShell()->GetModel()); ::rtl::OUString realURL; if (bLink) { @@ -294,8 +296,6 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc } else { - uno::Reference<frame::XModel> const xModel( - GetDoc()->GetObjectShell()->GetModel()); bool const bRet = ::avmedia::EmbedMedia(xModel, rMediaURL, realURL); if (!bRet) { return 0; } } @@ -322,7 +322,7 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc if( mnAction == DND_ACTION_LINK && pPickObj && pPV && pPickObj->ISA( SdrMediaObj ) ) { pNewMediaObj = static_cast< SdrMediaObj* >( pPickObj->Clone() ); - pNewMediaObj->setURL( realURL ); + pNewMediaObj->setURL( realURL, (bLink) ? 0 : xModel ); BegUndo(String(SdResId(STR_UNDO_DRAGDROP))); ReplaceObjectAtView(pPickObj, *pPV, pNewMediaObj); @@ -353,7 +353,7 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc else InsertObjectAtView( pNewMediaObj, *pPV, SDRINSERT_SETDEFLAYER ); - pNewMediaObj->setURL( realURL ); + pNewMediaObj->setURL( realURL, (bLink) ? 0 : xModel ); if( pPickObj ) { |