[Libreoffice-commits] online.git: 2 commits - loolwsd/DocumentBroker.cpp loolwsd/DocumentBroker.hpp
Jan Holesovsky
kendy at collabora.com
Fri Apr 29 13:17:33 UTC 2016
loolwsd/DocumentBroker.cpp | 7 +++++++
loolwsd/DocumentBroker.hpp | 12 ++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
New commits:
commit d906bba7d183d85ab03640d92635c0ce516daf3c
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Apr 29 15:14:13 2016 +0200
Added a FIXME explanatory comment.
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index ac1ed91..aa110cc 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -154,6 +154,13 @@ bool DocumentBroker::save()
const auto uri = _uriPublic.toString();
// If the file hasn't been modified within the past 10 seconds, skip saving.
+ // FIXME this is because currently the ChildProcessSession broadcasts the
+ // unocommandresult, so we get called several times here, and have no real
+ // possibility to distinguish who was the 1st caller.
+ // The refactor to un-thread the ChildProcessSession, and move the
+ // broadcasting up in the hierarchy (so that we can 'sniff' the
+ // unocommandresult for .uno:Save at the place where it appears just once)
+ // is planned post-release.
const auto newFileModifiedTime = Poco::File(_storage->getLocalRootPath()).getLastModified();
const auto elapsed = newFileModifiedTime - _lastFileModifiedTime;
if (std::abs(elapsed) > 10 * 1000 * 1000)
commit 9f5ca3f0ffb44252933cc200bd196271e3182fac
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Apr 29 12:06:45 2016 +0200
Help the autodoc.
diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp
index d8eff26..3a2e4d5 100644
--- a/loolwsd/DocumentBroker.hpp
+++ b/loolwsd/DocumentBroker.hpp
@@ -40,8 +40,8 @@ public:
{
}
- /// pid is the process ID of the child.
- /// ws is the control WebSocket to the child.
+ /// @param pid is the process ID of the child.
+ /// @param ws is the control WebSocket to the child.
ChildProcess(const Poco::Process::PID pid, const std::shared_ptr<Poco::Net::WebSocket>& ws) :
_pid(pid),
_ws(ws)
@@ -158,11 +158,11 @@ public:
void setModified(const bool value);
/// Save the document if the document is modified.
- /// force when true, will force saving if there
+ /// @param force when true, will force saving if there
/// has been any recent activity after the last save.
- /// waitTimeoutMs when >0 will wait for the save to
+ /// @param waitTimeoutMs when >0 will wait for the save to
/// complete before returning, or timeout.
- /// Returns true if attempts to save or it also waits
+ /// @return true if attempts to save or it also waits
/// and receives save notification. Otherwise, false.
bool autoSave(const bool force, const size_t waitTimeoutMs);
@@ -179,7 +179,7 @@ public:
return _sessions.size();
}
- /// Returns the time in milliseconds since last save.
+ /// @eturn the time in milliseconds since last save.
double getTimeSinceLastSaveMs() const
{
const auto duration = (std::chrono::steady_clock::now() - _lastSaveTime);
More information about the Libreoffice-commits
mailing list