diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-02-05 16:45:33 +0100 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-02-06 12:51:21 +0100 |
commit | ddba20f863e9dc638eef493aaaf45e588f7a4576 (patch) | |
tree | b8f30acecc54b369baa8e41fbe4d7a3768ff0bc7 /xmloff | |
parent | 954c23f3393fc1d6e06687db8718f072723c8355 (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>
(cherry picked from commit a7da594593eb2d63004a91dc471683713ce9742a)
Reviewed-on: https://gerrit.libreoffice.org/67422
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 8a918aeeff00..74707b3c6380 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1902,8 +1902,12 @@ bool SvXMLExport::AddEmbeddedXGraphicAsBase64(uno::Reference<graphic::XGraphic> Reference<XInputStream> xInputStream(mxGraphicStorageHandler->createInputStream(rxGraphic)); if (xInputStream.is()) { - XMLBase64Export aBase64Exp(*this); - return aBase64Exp.exportOfficeBinaryDataElement(xInputStream); + 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); + } } } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index c9d84b5885d0..3d27ac07ffeb 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; @@ -3179,12 +3178,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); } } |