summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2018-01-07 13:16:25 +0100
committerjan Iversen <jani@libreoffice.org>2018-01-07 14:20:06 +0100
commit54982d5fea21d9e81e1561a74fd341ddb0570c91 (patch)
tree00d26967ef77aaf78a28368957af62861ef090c4 /svx/source/unodraw
parent8fad35be9fe598c447fb0a76c086b59a15045c8b (diff)
svx, check HAVE_FEATURE_AVMEDIA
unoshap4.cxx did not obey HAVE_FEATURE_AVMEDIA. Change-Id: Id41cddd0a74c43819adc0b64c0dd84ae9d4f54ed
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unoshap4.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 080a2cb154c9..5a0de83053eb 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -54,6 +54,8 @@
#include <vcl/wmf.hxx>
#include <svtools/embedhlp.hxx>
+#include <config_features.h>
+
using namespace ::cppu;
using namespace ::com::sun::star;
@@ -797,6 +799,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
switch( pProperty->nWID )
{
case OWN_ATTR_MEDIA_URL:
+#if HAVE_FEATURE_AVMEDIA
{
OUString aURL;
if( rValue >>= aURL )
@@ -805,9 +808,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setURL( aURL, "", referer_ );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_LOOP:
+#if HAVE_FEATURE_AVMEDIA
{
bool bLoop;
@@ -817,9 +822,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setLoop( bLoop );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_MUTE:
+#if HAVE_FEATURE_AVMEDIA
{
bool bMute;
@@ -829,9 +836,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setMute( bMute );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_VOLUMEDB:
+#if HAVE_FEATURE_AVMEDIA
{
sal_Int16 nVolumeDB = sal_Int16();
@@ -841,9 +850,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setVolumeDB( nVolumeDB );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_ZOOM:
+#if HAVE_FEATURE_AVMEDIA
{
css::media::ZoomLevel eLevel;
@@ -853,9 +864,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setZoom( eLevel );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_MIMETYPE:
+#if HAVE_FEATURE_AVMEDIA
{
OUString sMimeType;
if( rValue >>= sMimeType )
@@ -864,9 +877,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
aItem.setMimeType( sMimeType );
}
}
+#endif
break;
case OWN_ATTR_MEDIA_STREAM:
+#if HAVE_FEATURE_AVMEDIA
try
{
uno::Reference<io::XInputStream> xStream;
@@ -889,6 +904,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
static_cast<OWeakObject *>(this),
makeAny(e));
}
+#endif
break;
default:
@@ -925,23 +941,33 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
switch( pProperty->nWID )
{
case OWN_ATTR_MEDIA_URL:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.getURL();
+#endif
break;
case OWN_ATTR_MEDIA_LOOP:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.isLoop();
+#endif
break;
case OWN_ATTR_MEDIA_MUTE:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.isMute();
+#endif
break;
case OWN_ATTR_MEDIA_VOLUMEDB:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.getVolumeDB();
+#endif
break;
case OWN_ATTR_MEDIA_ZOOM:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.getZoom();
+#endif
break;
case OWN_ATTR_MEDIA_STREAM:
@@ -967,11 +993,15 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
break;
case OWN_ATTR_MEDIA_TEMPFILEURL:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.getTempURL();
+#endif
break;
case OWN_ATTR_MEDIA_MIMETYPE:
+#if HAVE_FEATURE_AVMEDIA
rValue <<= aItem.getMimeType();
+#endif
break;
case OWN_ATTR_FALLBACK_GRAPHIC: