kit/ChildSession.cpp | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit a8b41b0cbb855e56a56f44c8254cacdc8518a990 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Jul 11 12:08:53 2018 +0300
Log also when retrying the saveAs Although, at least for me, after calling LOK's saveAs with an intentionally bogus file extension 'file:///user/docs/u0.frobozz' retrying with 'file:///user/docs/u0.frobozz.odt' does not work either. Actually, I am not sure how useful this retry feature is as it is now. If the user tries to save as some unsupported format, why can we assume that maybe they want to save in some other format instead, and possibly overwrite an existing file? Maybe the retry should be done only if the file name to saveAs was without extension? But that was already discussed in gerrit, I see. Change-Id: I8bd4fbf241cb492d9654ae893af4baaf28b6b3a0 diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index a09968a93..d56a81597 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1187,6 +1187,10 @@ bool ChildSession::saveAs(const char* /*buffer*/, int /*length*/, const std::vec if (retry) { + LOG_DBG("Retry: calling LOK's saveAs with: '" << url.c_str() << "', '" << + (format.size() == 0 ? "(nullptr)" : format.c_str()) << "', '" << + (filterOptions.size() == 0 ? "(nullptr)" : filterOptions.c_str()) << "'."); + success = getLOKitDocument()->saveAs(url.c_str(), format.size() == 0 ? nullptr :format.c_str(), filterOptions.size() == 0 ? nullptr : filterOptions.c_str()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits