[Libreoffice-commits] online.git: 2 commits - kit/ChildSession.cpp
Jan Holesovsky
kendy at collabora.com
Thu May 10 07:53:42 UTC 2018
kit/ChildSession.cpp | 34 ++++------------------------------
1 file changed, 4 insertions(+), 30 deletions(-)
New commits:
commit 62df2c114fd114c195356ef884978db214ee03ac
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu May 10 09:39:50 2018 +0200
Revert "ChildSession: use NoFileSync as default during convert-to as well"
This reverts commit 684d7302219752cbbb03e7df45a3765c9166a0d1.
Change-Id: I4500e09f678f889ee5ea35cb0f36896de1e11824
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index b7398b389..a09968a93 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1158,19 +1158,10 @@ bool ChildSession::saveAs(const char* /*buffer*/, int /*length*/, const std::vec
getLOKitDocument()->setView(_viewId);
- if (filterOptions.empty())
+ if (filterOptions.empty() && format == "html")
{
- std::vector<std::string> filterOptionsVector;
-
- // Save and no arguments, provide our default.
- 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());
+ // Opt-in to avoid linked images, those would not leave the chroot.
+ filterOptions = "EmbedImages";
}
LOG_DBG("Calling LOK's saveAs with: '" << url.c_str() << "', '" <<
commit 7f3c4b9dd8f5bae8cdc9624ecebb83d257ba8f15
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu May 10 09:23:50 2018 +0200
Revert "kit: use NoFileSync flag for save"
Turned out this might corrupt .ods files...
This reverts commit d0d87401c14aeedcded192680f05080c3dc08591.
Change-Id: I251de8c7d450fffb3b13a3c8eccf3921eddb9f80
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index b6d5ee408..b7398b389 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -952,25 +952,8 @@ bool ChildSession::unoCommand(const char* /*buffer*/, int /*length*/, const std:
}
else
{
- std::string arguments;
- if (tokens[1] == ".uno:Save" && tokens[2] == "{}")
- {
- // Save and no arguments, provide our default.
- std::ostringstream oss;
- oss << "{"
- << "\"NoFileSync\":"
- << "{"
- << "\"type\":\"boolean\","
- << "\"value\":true"
- << "}"
- << "}";
- arguments = oss.str();
- }
- else
- arguments = Poco::cat(std::string(" "), tokens.begin() + 2, tokens.end());
-
getLOKitDocument()->postUnoCommand(tokens[1].c_str(),
- arguments.c_str(),
+ Poco::cat(std::string(" "), tokens.begin() + 2, tokens.end()).c_str(),
bNotify);
}
More information about the Libreoffice-commits
mailing list