From 5668e73beb30b95abc6520b7432c54972ca3ab2c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 20 Nov 2013 14:43:45 +0100 Subject: avmedia: Implement "block untrusted referer links" feature See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 'block untrusted referer links' feature" for details. This adds some further /*TODO?*/ comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not blocked during a slideshow presentation. Change-Id: Ib2d0c7e4f7b02c4bdec0d8a90cee5e7e1bee8325 --- include/svx/svdomedia.hxx | 2 +- include/svx/unoapi.hxx | 2 +- include/svx/unoshape.hxx | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include/svx') diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 849f8ef0bb90..018adfe5e2b6 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -60,7 +60,7 @@ public: public: - void setURL( const OUString& rURL ); + void setURL( const OUString& rURL, const OUString& rReferer ); const OUString& getURL() const; void setMediaProperties( const ::avmedia::MediaItem& rState ); diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx index 3bab954c37ae..1f81aa9e218c 100644 --- a/include/svx/unoapi.hxx +++ b/include/svx/unoapi.hxx @@ -38,7 +38,7 @@ class SfxItemPool; * Creates a StarOffice API wrapper with the given type and inventor * Deprecated: This will be replaced with a function returning XShape. */ -SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw(); +SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, OUString const & referer ) throw(); /** Returns a StarOffice API wrapper for the given SdrObject */ SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw (); diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index f7558b834fdf..c27f8b7c6bf1 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -857,13 +857,16 @@ public: class SvxMediaShape : public SvxShape { public: - SvxMediaShape( SdrObject* pObj ) throw(); + SvxMediaShape( SdrObject* pObj, OUString const & referer ) throw(); virtual ~SvxMediaShape() throw(); protected: // overide these for special property handling in subcasses. Return true if property is handled virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +private: + OUString referer_; }; #endif -- cgit