summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-02-05 16:45:33 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-02-05 18:42:36 +0100
commita7da594593eb2d63004a91dc471683713ce9742a (patch)
tree635b4ba16d1341d5e37123ef2dd4f0523b4556af /xmloff
parentdb9e1ef04d13ecc1b8f8f156b059173143ea03ea (diff)
tdf#122625: Use solution for tdf#118879 in a more general case
Partially revert commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459 Change-Id: Ia554d3e64da2ee620c69bc66b33a6cd305502c64 Reviewed-on: https://gerrit.libreoffice.org/67418 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx7
-rw-r--r--xmloff/source/text/txtparae.cxx8
2 files changed, 8 insertions, 7 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index b8e8b96f51d5..03edbb51b731 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1906,6 +1906,13 @@ bool SvXMLExport::AddEmbeddedXGraphicAsBase64(uno::Reference<graphic::XGraphic>
Reference<XInputStream> xInputStream(mxGraphicStorageHandler->createInputStream(rxGraphic));
if (xInputStream.is())
{
+ Graphic aGraphic(rxGraphic);
+ if (aGraphic.getOriginURL().isEmpty()) // don't add the base64 if the origin URL is set (image is from an external URL)
+ {
+ XMLBase64Export aBase64Exp(*this);
+ return aBase64Exp.exportOfficeBinaryDataElement(xInputStream);
+ }
+
XMLBase64Export aBase64Exp(*this);
return aBase64Exp.exportOfficeBinaryDataElement(xInputStream);
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 3b3b52b5f635..9a7776eec9e3 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -120,7 +120,6 @@
#include <algorithm>
#include <iterator>
#include <officecfg/Office/Common.hxx>
-#include <vcl/graph.hxx>
using namespace ::std;
using namespace ::com::sun::star;
@@ -3182,12 +3181,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
if (xGraphic.is())
{
SvXMLElementExport aElement(GetExport(), XML_NAMESPACE_DRAW, XML_IMAGE, false, true );
-
- Graphic aGraphic(xGraphic);
- if (aGraphic.getOriginURL().isEmpty()) // don't add the base64 if the origin URL is set (image is from an external URL)
- {
- GetExport().AddEmbeddedXGraphicAsBase64(xGraphic);
- }
+ GetExport().AddEmbeddedXGraphicAsBase64(xGraphic);
}
}