diff options
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 835b9ea18f80..f941109516df 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1910,8 +1910,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); + } } } |