From 5e7401c2feea20e9405c1059c8fd4d8e5b756d6f Mon Sep 17 00:00:00 2001 From: merttumer Date: Wed, 13 Feb 2019 18:01:11 +0300 Subject: [PATCH] Added passing watermark text to saveAs for tiled watermark Change-Id: I2cc7c942a646a57e39d3c5862bbcc45ddfbafe4c Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/67780 --- kit/ChildSession.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 85941b08b..35144618c 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -856,6 +856,11 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int /*length*/, const std: } } + // Hack pass watermark by filteroptions to saveas + if ( getWatermarkText().length() > 0) { + filterOptions += std::string(",Watermark=") + getWatermarkText() + std::string("WATERMARKEND"); + } + // The file is removed upon downloading. const std::string tmpDir = FileUtil::createRandomDir(JAILED_DOCUMENT_ROOT); // Prevent user inputting anything funny here.