loleaflet/reference.html | 4 ++-- loolwsd/LOOLSession.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit fe7ae3cc2a5173ac5b5dde72f30560d60f4f386e Author: Mihai Varga <[email protected]> Date: Fri Dec 18 15:40:03 2015 +0200 fire the `commandresult` when the saveAs command has finished diff --git a/loleaflet/reference.html b/loleaflet/reference.html index 3e28ec0..730fe05 100644 --- a/loleaflet/reference.html +++ b/loleaflet/reference.html @@ -1862,7 +1862,7 @@ unexpected behaviour.</h4> <tr> <td><code><b>commandresult</b></code></td> <td><code><a href="#commandresult-event">CommandResultEvent</a></code></td> - <td>Fired when the a dispatched uno command has finished.</td> + <td>Fired when a dispatched uno command or the 'saveas' command has finished.</td> </tr> <tr> <td><code><b>commandstatechanged</b></code></td> @@ -1977,7 +1977,7 @@ unexpected behaviour.</h4> <tr> <td><code><b>commandName</b></code></td> <td><code><a href="#commandstatechanged-values">CommandStateChangedValues</a></code></td> - <td>UNO command.</td> + <td>UNO command or 'saveas'.</td> </tr> <tr> <td><code><b>success</b></code></td> diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp index fbfea8b..513cd5c 100644 --- a/loolwsd/LOOLSession.cpp +++ b/loolwsd/LOOLSession.cpp @@ -1505,11 +1505,15 @@ bool ChildProcessSession::saveAs(const char* /*buffer*/, int /*length*/, StringT } } - _loKitDocument->pClass->saveAs(_loKitDocument, url.c_str(), + bool success = _loKitDocument->pClass->saveAs(_loKitDocument, url.c_str(), format.size() == 0 ? NULL :format.c_str(), filterOptions.size() == 0 ? NULL : filterOptions.c_str()); sendTextFrame("saveas: url=" + url); + std::string successStr = success ? "true" : "false"; + sendTextFrame("unocommandresult: {" + "\"commandName\":\"saveas\"," + "\"success\":\"" + successStr + "\"}"); return true; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
