kit/ChildSession.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
New commits: commit d0d87401c14aeedcded192680f05080c3dc08591 Author: Miklos Vajna <[email protected]> Date: Tue Jan 16 09:06:49 2018 +0100 kit: use NoFileSync flag for save What LibreOffice sees as a save destination is just a temporary output from the outside, so there is no point in doing fsync for that file. This depends on core.git e90a16d71cdcfbd785401613a2e5a29cb1167acf (sfx2 store: handle NoFileSync for Save (not SaveAs), 2018-01-15). diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 6c7223bd..a6609d8c 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -917,8 +917,25 @@ 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(), - Poco::cat(std::string(" "), tokens.begin() + 2, tokens.end()).c_str(), + arguments.c_str(), bNotify); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
