xmloff/source/text/txtparae.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 2d4608ac3b958aaaff032725ded152a13b3bac7d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sun Feb 3 22:30:05 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Feb 5 10:35:48 2019 +0100 tdf#118879 don't embed base64 image data if we have an origin URL If an Graphic has an OriginURL it means it was created from an external source. We want to preserve this so we don't want to add the image base64 data - used in Flat ODF format. Change-Id: I2782ec53cf8dc78b0c360365d3eed3e5c54bf271 Reviewed-on: https://gerrit.libreoffice.org/67338 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459) Reviewed-on: https://gerrit.libreoffice.org/67346 Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 3d27ac07ffeb..c9d84b5885d0 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -120,6 +120,7 @@ #include <algorithm> #include <iterator> #include <officecfg/Office/Common.hxx> +#include <vcl/graph.hxx> using namespace ::std; using namespace ::com::sun::star; @@ -3178,7 +3179,12 @@ void XMLTextParagraphExport::_exportTextGraphic( if (xGraphic.is()) { 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); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits