diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/drawingml/fillproperties.hxx | 26 | ||||
-rw-r--r-- | include/oox/drawingml/fillpropertiesgroupcontext.hxx | 42 | ||||
-rw-r--r-- | include/oox/export/drawingml.hxx | 4 | ||||
-rw-r--r-- | include/oox/ole/oleobjecthelper.hxx | 3 |
4 files changed, 74 insertions, 1 deletions
diff --git a/include/oox/drawingml/fillproperties.hxx b/include/oox/drawingml/fillproperties.hxx index 447cba2fa76c..dcf3afbfd230 100644 --- a/include/oox/drawingml/fillproperties.hxx +++ b/include/oox/drawingml/fillproperties.hxx @@ -26,6 +26,7 @@ #include <oox/drawingml/color.hxx> #include <oox/helper/helper.hxx> #include <oox/drawingml/embeddedwavaudiofile.hxx> +#include <oox/ole/oleobjecthelper.hxx> namespace oox { class GraphicHelper; @@ -65,6 +66,29 @@ struct PatternFillProperties void assignUsed( const PatternFillProperties& rSourceProps ); }; +struct ArtisticEffectProperties +{ + OUString msName; + std::map< OUString, css::uno::Any > + maAttribs; + ::oox::ole::OleObjectInfo mrOleObjectInfo; /// The original graphic as embedded object. + + bool isEmpty() const; + + /** Returns the struct as a PropertyValue with Name = msName and + * Value = maAttribs as a Sequence< PropertyValue >. */ + css::beans::PropertyValue getEffect(); + + /** Overwrites all members that are explicitly set in rSourceProps. */ + void assignUsed( const ArtisticEffectProperties& rSourceProps ); + + /** Translate effect tokens to strings. */ + static OUString getEffectString( sal_Int32 nToken ); + + /** Translate effect strings to tokens. */ + static sal_Int32 getEffectToken( OUString sName ); +}; + struct BlipFillProperties { ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > @@ -89,6 +113,8 @@ struct BlipFillProperties Color maColorChangeTo; /// Destination color of color transformation. Color maDuotoneColors[2]; /// Duotone Colors + ArtisticEffectProperties maEffect; /// Artistic effect, not supported by core. + /** Overwrites all members that are explicitly set in rSourceProps. */ void assignUsed( const BlipFillProperties& rSourceProps ); }; diff --git a/include/oox/drawingml/fillpropertiesgroupcontext.hxx b/include/oox/drawingml/fillpropertiesgroupcontext.hxx index bbeed0837903..aae88df408be 100644 --- a/include/oox/drawingml/fillpropertiesgroupcontext.hxx +++ b/include/oox/drawingml/fillpropertiesgroupcontext.hxx @@ -78,6 +78,48 @@ private: +/** Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers + and the a14:artistic* effect tags defined in the MS-ODRAWXML extension. */ +class ArtisticEffectContext : public ::oox::core::ContextHandler2 +{ +public: + explicit ArtisticEffectContext( + ::oox::core::ContextHandler2Helper& rParent, + ArtisticEffectProperties& rEffect ); + virtual ~ArtisticEffectContext(); + + virtual ::oox::core::ContextHandlerRef + onCreateContext( + sal_Int32 nElement, + const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + ArtisticEffectProperties& maEffect; +}; + + + +/** Context handler that imports the a:extLst element inside a:blip and its + children a:ext, which can contain transformations to the bitmap. */ +class BlipExtensionContext : public ::oox::core::ContextHandler2 +{ +public: + explicit BlipExtensionContext( + ::oox::core::ContextHandler2Helper& rParent, + BlipFillProperties& rBlipProps ); + virtual ~BlipExtensionContext(); + + virtual ::oox::core::ContextHandlerRef + onCreateContext( + sal_Int32 nElement, + const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + +private: + BlipFillProperties& mrBlipProps; +}; + + + /** Context handler that imports the a:duotone element containing the colors of a bitmap duotone transformation. */ class DuotoneContext : public ::oox::core::ContextHandler2 diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 86e3d0769449..e97f05da8cf5 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -82,6 +82,8 @@ public: private: static int mnImageCounter; + static int mnWdpImageCounter; + static std::map<OUString, OUString> maWdpCache; /// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC). DocumentType meDocumentType; @@ -176,6 +178,8 @@ public: void WriteShapeEffects( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps ); void WriteShape3DEffects( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); + void WriteArtisticEffect( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); + OString WriteWdpPicture( const OUString& rFileId, const ::com::sun::star::uno::Sequence< sal_Int8 >& rPictureData ); static void ResetCounters(); diff --git a/include/oox/ole/oleobjecthelper.hxx b/include/oox/ole/oleobjecthelper.hxx index a723949f539c..ef32483d74ab 100644 --- a/include/oox/ole/oleobjecthelper.hxx +++ b/include/oox/ole/oleobjecthelper.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_OOX_OLE_OLEOBJECTHELPER_HXX #define INCLUDED_OOX_OLE_OLEOBJECTHELPER_HXX +#include <oox/dllapi.h> #include <oox/helper/binarystreambase.hxx> namespace com { namespace sun { namespace star { @@ -36,7 +37,7 @@ namespace ole { /** Contains generic information about an OLE object. */ -struct OleObjectInfo +struct OOX_DLLPUBLIC OleObjectInfo { StreamDataSequence maEmbeddedData; ///< Data of an embedded OLE object. OUString maTargetLink; ///< Path to external data for linked OLE object. |