summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/inc/svx/svdomedia.hxx4
-rw-r--r--svx/source/svdraw/svdomedia.cxx11
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
3 files changed, 14 insertions, 5 deletions
diff --git a/svx/inc/svx/svdomedia.hxx b/svx/inc/svx/svdomedia.hxx
index c2a3e53f0540..ffb2d9b8ec9b 100644
--- a/svx/inc/svx/svdomedia.hxx
+++ b/svx/inc/svx/svdomedia.hxx
@@ -69,7 +69,9 @@ public:
public:
- void setURL( const ::rtl::OUString& rURL );
+ void setURL( const ::rtl::OUString& rURL,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel> const& xModel = 0);
const ::rtl::OUString& getURL() const;
void setMediaProperties( const ::avmedia::MediaItem& rState );
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index f2900327bb77..526d30fdd25e 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -35,6 +35,9 @@
#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
#include <avmedia/mediawindow.hxx>
+
+using namespace ::com::sun::star;
+
// ---------------
// - SdrMediaObj -
// ---------------
@@ -198,11 +201,12 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /
// ------------------------------------------------------------------------------
-void SdrMediaObj::setURL( const ::rtl::OUString& rURL )
+void SdrMediaObj::setURL( const ::rtl::OUString& rURL,
+ uno::Reference<frame::XModel> const& xModel )
{
::avmedia::MediaItem aURLItem;
- aURLItem.setURL( rURL );
+ aURLItem.setURL( rURL, xModel );
setMediaProperties( aURLItem );
}
@@ -253,7 +257,8 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper
( rNewProperties.getURL() != getURL() ) )
{
setGraphic();
- maMediaProperties.setURL( rNewProperties.getURL() );
+ maMediaProperties.setURL(rNewProperties.getURL(),
+ rNewProperties.getModel());
}
if( AVMEDIA_SETMASK_LOOP & nMaskSet )
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 0f3aee95474b..ebbbe38bcb15 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -878,7 +878,9 @@ bool SvxMediaShape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sf
if( rValue >>= aURL )
{
bOk = true;
- aItem.setURL( aURL );
+ uno::Reference<frame::XModel> const xModel(
+ mpModel->getUnoModel(), uno::UNO_QUERY_THROW);
+ aItem.setURL( aURL, xModel);
}
}
break;