[Libreoffice-commits] core.git: include/xmloff xmloff/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Tue Feb 13 19:29:08 UTC 2018


 include/xmloff/xmlexp.hxx     |    2 +-
 xmloff/source/core/xmlexp.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1fa153966332f57d23ee31fe97a24fd73317af9c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Sun Feb 11 14:28:55 2018 +0900

    AddEmbeddedXGraphic: add parameter for requested name
    
    Change-Id: Id5f028d3286513b468bc0637484507a34b2188a2
    Reviewed-on: https://gerrit.libreoffice.org/49644
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index 203be8fdfd0f..6024d9f877ca 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -463,7 +463,7 @@ public:
     OUString AddEmbeddedGraphicObject(
                             const OUString& rGraphicObjectURL );
 
-    OUString AddEmbeddedXGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
+    OUString AddEmbeddedXGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic, OUString const & rRequestedName = OUString());
     bool AddEmbeddedXGraphicAsBase64(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic);
 
     css::uno::Reference<css::io::XInputStream> GetEmbeddedGraphicObjectStream(
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index cfee78ca7762..a3015b8903ef 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1882,7 +1882,7 @@ OUString SvXMLExport::AddEmbeddedGraphicObject( const OUString& rGraphicObjectUR
     return sRet;
 }
 
-OUString SvXMLExport::AddEmbeddedXGraphic(uno::Reference<graphic::XGraphic> const & rxGraphic)
+OUString SvXMLExport::AddEmbeddedXGraphic(uno::Reference<graphic::XGraphic> const & rxGraphic, OUString const & rRequestedName)
 {
     OUString sInternalURL;
 
@@ -1892,7 +1892,7 @@ OUString SvXMLExport::AddEmbeddedXGraphic(uno::Reference<graphic::XGraphic> cons
     {
         if (!(getExportFlags() & SvXMLExportFlags::EMBEDDED))
         {
-            sInternalURL = xGraphicStorageHandler->saveGraphic(rxGraphic);
+            sInternalURL = xGraphicStorageHandler->saveGraphicByName(rxGraphic, rRequestedName);
         }
     }
 


More information about the Libreoffice-commits mailing list