summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-09-11 19:30:55 -0400
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-09-03 01:53:12 -0400
commit36b5109d212f583feaf20b2e7a576443004754f8 (patch)
tree37397d6e9c77a55570c5ac57185fdd5c951718ca
parentleaflet: support arbitrary sized sidebar (diff)
downloadonline-36b5109d212f583feaf20b2e7a576443004754f8.tar.gz
online-36b5109d212f583feaf20b2e7a576443004754f8.zip
wsd: cosmetic formatting
Change-Id: I552b2468432ce6ed52c50e22b6f19d8055c5dbb1
-rw-r--r--common/Session.cpp1
-rw-r--r--kit/ChildSession.cpp18
-rw-r--r--kit/Kit.cpp3
-rw-r--r--loleaflet/src/control/Parts.js1
-rw-r--r--net/Socket.cpp1
-rw-r--r--wsd/ClientSession.cpp1
-rw-r--r--wsd/DocumentBroker.cpp1
-rw-r--r--wsd/Storage.cpp1
8 files changed, 15 insertions, 12 deletions
diff --git a/common/Session.cpp b/common/Session.cpp
index 116d2786fb..e5a70c0818 100644
--- a/common/Session.cpp
+++ b/common/Session.cpp
@@ -226,6 +226,7 @@ void Session::handleMessage(bool /*fin*/, WSOpCode /*code*/, std::vector<char> &
_handleInput(replace->data(), replace->size());
return;
}
+
if (!data.empty())
_handleInput(&data[0], data.size());
}
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 0d2c0ad7a3..b1bee8ccf7 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2120,28 +2120,30 @@ void ChildSession::rememberEventsForInactiveUser(const int type, const std::stri
}
}
-void ChildSession::updateSpeed() {
-
+void ChildSession::updateSpeed()
+{
std::chrono::steady_clock::time_point now(std::chrono::steady_clock::now());
- while(_cursorInvalidatedEvent.size() != 0 &&
- std::chrono::duration_cast<std::chrono::milliseconds>(now - _cursorInvalidatedEvent.front()).count() > _eventStorageIntervalMs)
+ while (_cursorInvalidatedEvent.size() != 0 &&
+ std::chrono::duration_cast<std::chrono::milliseconds>(now - _cursorInvalidatedEvent.front()).count() > _eventStorageIntervalMs)
{
_cursorInvalidatedEvent.pop();
}
+
_cursorInvalidatedEvent.push(now);
_docManager->updateEditorSpeeds(_viewId, _cursorInvalidatedEvent.size());
}
-int ChildSession::getSpeed() {
-
+int ChildSession::getSpeed()
+{
std::chrono::steady_clock::time_point now(std::chrono::steady_clock::now());
- while(_cursorInvalidatedEvent.size() > 0 &&
- std::chrono::duration_cast<std::chrono::milliseconds>(now - _cursorInvalidatedEvent.front()).count() > _eventStorageIntervalMs)
+ while (_cursorInvalidatedEvent.size() > 0 &&
+ std::chrono::duration_cast<std::chrono::milliseconds>(now - _cursorInvalidatedEvent.front()).count() > _eventStorageIntervalMs)
{
_cursorInvalidatedEvent.pop();
}
+
return _cursorInvalidatedEvent.size();
}
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index ad20beb863..a167ae513b 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -989,7 +989,7 @@ public:
// session is being removed.
for (auto it = _sessions.cbegin(); it != _sessions.cend(); )
{
- if (it->second->isCloseFrame())
+ if (it->second->isCloseFrame())
{
deadSessions.push_back(it->second);
it = _sessions.erase(it);
@@ -1234,6 +1234,7 @@ public:
pushRendered(renderedTiles, tiles[tileIndex], wireId, data->size());
});
}
+
LOG_TRC("Encoded tile #" << tileIndex << " at (" << positionX << "," << positionY << ") with oldWireId=" <<
tiles[tileIndex].getOldWireId() << ", hash=" << hash << " wireId: " << wireId << " in " << imgSize << " bytes.");
tileIndex++;
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index c428408e77..95e5bc2a07 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -63,6 +63,7 @@ L.Map.include({
// part is the part index/id
// how is 0 to deselect, 1 to select, and 2 to toggle selection
selectPart: function (part, how, external) {
+ //TODO: Update/track selected parts(?).
var docLayer = this._docLayer;
var index = docLayer._selectedParts.indexOf(part);
if (index >= 0 && how != 1) {
diff --git a/net/Socket.cpp b/net/Socket.cpp
index 17ceb38586..cb5043414c 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -365,7 +365,6 @@ void SocketPoll::insertNewFakeSocket(
}
}
}
-
#endif
void ServerSocket::dumpState(std::ostream& os)
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 69e67681fc..328d1d1fc4 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1691,7 +1691,6 @@ void ClientSession::handleTileInvalidation(const std::string& message,
if( part == -1 ) // If no part is specifed we use the part used by the client
part = _clientSelectedPart;
-
std::vector<TileDesc> invalidTiles;
if(part == _clientSelectedPart || _isTextDocument)
{
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 046f916cbb..b6f7bedd98 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -648,7 +648,6 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
}
}
-
#if ENABLE_SUPPORT_KEY
if (!LOOLWSD::OverrideWatermark.empty())
watermarkText = LOOLWSD::OverrideWatermark;
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index b7fef179b2..e4b4e10292 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -424,6 +424,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const Au
Poco::Net::HTTPResponse response;
std::istream& rs = psession->receiveResponse(response);
+
callDuration = (std::chrono::steady_clock::now() - startTime);
Log::StreamLogger logger = Log::trace();