summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-02-08 05:13:49 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-02-11 07:34:53 +0100
commitd4a44dc4cd5b4a1679a5325bc202dc9ca39d75c5 (patch)
treef603ba2b15ef0fb2668668bc05659d1d740b1d56 /include/svx
parent2a6997ddd7b48a2e53f6e53b81de8eccd5e5083b (diff)
extend XGraphicStorageHandler with saveGraphicByName
We want to save the graphic with a specific name, usually this is when we want to use the same name that was used when reading the image from the document. Change-Id: I7419f0593dea333a60ce513190211e0409480e66 Reviewed-on: https://gerrit.libreoffice.org/49553 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/xmlgrhlp.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx
index 0137f0044b67..a9eca5495a20 100644
--- a/include/svx/xmlgrhlp.hxx
+++ b/include/svx/xmlgrhlp.hxx
@@ -48,6 +48,7 @@ class SVX_DLLPUBLIC SvXMLGraphicHelper final : public cppu::WeakComponentImplHel
css::document::XGraphicStorageHandler,
css::document::XBinaryStreamResolver>
{
+private:
typedef ::std::pair< OUString, OUString > URLPair;
typedef ::std::vector< URLPair > URLPairVector;
typedef ::std::vector< GraphicObject > GraphicObjectVector;
@@ -94,6 +95,8 @@ class SVX_DLLPUBLIC SvXMLGraphicHelper final : public cppu::WeakComponentImplHel
virtual void SAL_CALL disposing() override;
+ SVX_DLLPRIVATE OUString implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic, OUString const & rRequestName);
+
public:
SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode );
@@ -111,11 +114,14 @@ public:
// XGraphicStorageHandler
virtual css::uno::Reference<css::graphic::XGraphic> SAL_CALL
- loadGraphic(const OUString& aURL) override;
+ loadGraphic(OUString const & aURL) override;
virtual OUString SAL_CALL
saveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic) override;
+ virtual OUString SAL_CALL
+ saveGraphicByName(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic, OUString const & rRequestName) override;
+
virtual css::uno::Reference<css::io::XInputStream> SAL_CALL
createInputStream(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic) override;