summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-22 13:54:42 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-23 10:04:00 +0200
commit2e68a1468c035fc3bb4d02ad0b3187872fe1e67b (patch)
tree0bd5ccdee8253233ca7f919a70c5bd337b3b5a37 /include
parent642a252cf1a2f1d08c4bbfcae15527bb82c7664d (diff)
ooxml: Preserve the original picture in artistic effects
When Word applies an artistic effect, it creates two embedded files; one contains the bitmap with the effect and the other one contains the original bitmap to be able to undo the effect. This patch reads the original bitmap, stores it in the shape grab bag and saves it back to the docx file. Added unit tests too. TODO: right now, if two effects point to the same original bitmap it is stored twice, we should improve this. Change-Id: Ia72034a257739abe4ffafa0f42b2a912e4bf9436
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/fillproperties.hxx2
-rw-r--r--include/oox/export/drawingml.hxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/oox/drawingml/fillproperties.hxx b/include/oox/drawingml/fillproperties.hxx
index c588deec8faa..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;
@@ -70,6 +71,7 @@ struct ArtisticEffectProperties
OUString msName;
std::map< OUString, css::uno::Any >
maAttribs;
+ ::oox::ole::OleObjectInfo mrOleObjectInfo; /// The original graphic as embedded object.
bool isEmpty() const;
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 98cc0dfb38a0..77d54b48b014 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -82,6 +82,7 @@ public:
private:
static int mnImageCounter;
+ static int mnWdpImageCounter;
/// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC).
DocumentType meDocumentType;
@@ -177,6 +178,7 @@ public:
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 ::com::sun::star::uno::Sequence< sal_Int8 >& rPictureData );
static void ResetCounters();