Kaydet (Commit) a7da5945 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Tomaž Vajngerl

tdf#122625: Use solution for tdf#118879 in a more general case

Partially revert commit 36aa3f4d

Change-Id: Ia554d3e64da2ee620c69bc66b33a6cd305502c64
Reviewed-on: https://gerrit.libreoffice.org/67418
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst db9e1ef0
...@@ -1906,6 +1906,13 @@ bool SvXMLExport::AddEmbeddedXGraphicAsBase64(uno::Reference<graphic::XGraphic> ...@@ -1906,6 +1906,13 @@ bool SvXMLExport::AddEmbeddedXGraphicAsBase64(uno::Reference<graphic::XGraphic>
Reference<XInputStream> xInputStream(mxGraphicStorageHandler->createInputStream(rxGraphic)); Reference<XInputStream> xInputStream(mxGraphicStorageHandler->createInputStream(rxGraphic));
if (xInputStream.is()) 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); XMLBase64Export aBase64Exp(*this);
return aBase64Exp.exportOfficeBinaryDataElement(xInputStream); return aBase64Exp.exportOfficeBinaryDataElement(xInputStream);
} }
......
...@@ -120,7 +120,6 @@ ...@@ -120,7 +120,6 @@
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <officecfg/Office/Common.hxx> #include <officecfg/Office/Common.hxx>
#include <vcl/graph.hxx>
using namespace ::std; using namespace ::std;
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -3182,12 +3181,7 @@ void XMLTextParagraphExport::_exportTextGraphic( ...@@ -3182,12 +3181,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
if (xGraphic.is()) if (xGraphic.is())
{ {
SvXMLElementExport aElement(GetExport(), XML_NAMESPACE_DRAW, XML_IMAGE, false, true ); SvXMLElementExport aElement(GetExport(), XML_NAMESPACE_DRAW, XML_IMAGE, false, true );
GetExport().AddEmbeddedXGraphicAsBase64(xGraphic);
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);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment