summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/shapeexport.cxx
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2018-03-27 12:25:40 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-03-28 08:56:10 +0200
commit1c1160967acf49cffae8921f3ab8361821bbaaaf (patch)
tree0bcc1f841d81625f86649c907ca344d729a45c87 /xmloff/source/draw/shapeexport.cxx
parent1a43481a1d8913a2c5fcb0c2e4363deaf439caff (diff)
tdf#115005: New option to prevent adding fallback images
A new option AddReplacementImages was added to prevent addition of fallback images that could increase the file size of the package in several times. Added unit test. Change-Id: I50eebba51072d3c93bfe6bed59e9f007568810c0 Reviewed-on: https://gerrit.libreoffice.org/51939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index a670d6dad8ec..b0422e8fde8b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -85,6 +85,7 @@
#include <comphelper/graphicmimetype.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
+#include <officecfg/Office/Common.hxx>
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
@@ -2438,7 +2439,8 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
//Resolves: fdo#62461 put preferred image first above, followed by
//fallback here
- if( !bIsEmptyPresObj )
+ const bool bAddReplacementImages = officecfg::Office::Common::Save::Graphic::AddReplacementImages::get();
+ if( !bIsEmptyPresObj && bAddReplacementImages)
{
uno::Reference<graphic::XGraphic> xReplacementGraphic;
xPropSet->getPropertyValue("ReplacementGraphic") >>= xReplacementGraphic;