diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-07 08:42:46 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-11 09:36:16 +0000 |
commit | 1b381370b026f62397dc2d41ddcecf9d6523e044 (patch) | |
tree | f2f6283ffd09b250fe8751a6bd702a678929eb5c /include | |
parent | b7ffafe77d95c72402bdac0328ca3bfcb7444067 (diff) |
tdf#83227 oox: reuse RelId in DML/VML export for the same graphic
So that large images are written only once to the ZIP container when
they are exported using both markups. This affects drawinglayer images,
the Writer ones are handled directly in sw and were already
deduplicated.
(cherry picked from commit b484e9814c66d8d51cea974390963a6944bc9d73)
Conflicts:
oox/source/export/drawingml.cxx
Change-Id: Iff7c769329b42939833056b727b070f6a60da5e3
Reviewed-on: https://gerrit.libreoffice.org/18491
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/export/drawingml.hxx | 4 | ||||
-rw-r--r-- | include/oox/export/vmlexport.hxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 3b9d84713c06..fff1e2cacf8d 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -74,6 +74,10 @@ public: virtual void WriteOutliner(const OutlinerParaObject& rParaObj) = 0; /// Write the contents of the textbox that is associated to this shape. virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) = 0; + /// Look up the RelId of a graphic based on its checksum. + virtual OUString FindRelId(BitmapChecksum nChecksum) = 0; + /// Store the RelId of a graphic based on its checksum. + virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) = 0; protected: DMLTextExport() {} virtual ~DMLTextExport() {} diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index a87ed16eb90a..922b019c9b27 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -39,6 +39,10 @@ public: virtual oox::drawingml::DrawingML& GetDrawingML() = 0; /// Write the contents of the textbox that is associated to this shape in VML format. virtual void WriteVMLTextBox(css::uno::Reference<css::drawing::XShape> xShape) = 0; + /// Look up the RelId of a graphic based on its checksum. + virtual OUString FindRelId(BitmapChecksum nChecksum) = 0; + /// Store the RelId of a graphic based on its checksum. + virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) = 0; protected: VMLTextExport() {} virtual ~VMLTextExport() {} |