kit/ChildSession.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 7e9ba2e8c68f6904177272bee9453860224174ec Author: Miklos Vajna <[email protected]> Date: Fri Apr 27 14:32:25 2018 +0200 tdf#117077 kit: opt-in to embed images in HTML export Changing the default in core.git has various up and downsides, so just opt in for embedding here. Change-Id: I3f8013800e3fdf759fcb09bce848e8754c8aa44c diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 04ec7d93f..b6d5ee408 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1176,8 +1176,19 @@ bool ChildSession::saveAs(const char* /*buffer*/, int /*length*/, const std::vec getLOKitDocument()->setView(_viewId); if (filterOptions.empty()) + { + std::vector<std::string> filterOptionsVector; + // Save and no arguments, provide our default. - filterOptions = "NoFileSync"; + filterOptionsVector.push_back("NoFileSync"); + + if (format == "html") + // Opt-in to avoid linked images, those would not leave the + // chroot. + filterOptionsVector.push_back("EmbedImages"); + + filterOptions = Poco::cat(std::string(","), filterOptionsVector.begin(), filterOptionsVector.end()); + } LOG_DBG("Calling LOK's saveAs with: '" << url.c_str() << "', '" << (format.size() == 0 ? "(nullptr)" : format.c_str()) << "', '" << _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
