diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-04-04 13:14:45 +0200 |
---|---|---|
committer | root <root@linux-3qg3.site> | 2014-04-04 19:06:11 +0200 |
commit | f470f3c72efb3fad109e62247c4d0abebc359345 (patch) | |
tree | f3a7969c13bae5d43ba5bc09935117c78deb5742 /svx/source/svdraw | |
parent | 97b20c9deee46195357896197440cc1cc43d3452 (diff) |
Introduce a new media shape property to handle mime type
Default mime-type for all media objects:
"application/vnd.sun.star.media"
The problem of missing mime-type detection
still exists. For now only glTF model has
a concrete type.
Change-Id: I4dca26c1c47a564579bbed926bffa3aa5eda6c04
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdomedia.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index e60b44632e1b..8bc8f4ddd7ab 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -244,10 +244,11 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly / -void SdrMediaObj::setURL( const OUString& rURL, const OUString& rReferer ) +void SdrMediaObj::setURL( const OUString& rURL, const OUString& rReferer, const OUString& rMimeType ) { ::avmedia::MediaItem aURLItem; - + if( !rMimeType.isEmpty() ) + m_pImpl->m_MediaProperties.setMimeType(rMimeType); aURLItem.setURL( rURL, "", rReferer ); setMediaProperties( aURLItem ); } @@ -418,6 +419,9 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper const sal_uInt32 nMaskSet = rNewProperties.getMaskSet(); // use only a subset of MediaItem properties for own own properties + if( AVMEDIA_SETMASK_MIME_TYPE & nMaskSet ) + m_pImpl->m_MediaProperties.setMimeType( rNewProperties.getMimeType() ); + if( ( AVMEDIA_SETMASK_URL & nMaskSet ) && ( rNewProperties.getURL() != getURL() )) { |