[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - 2 commits - kit/ChildSession.cpp loleaflet/src
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 18 20:31:39 UTC 2019
kit/ChildSession.cpp | 15 +++++++++------
loleaflet/src/control/Control.PartsPreview.js | 8 ++++++++
2 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 11558dff1a90692575a3cd2c63fa9ddbf8cd547d
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Oct 4 15:43:17 2019 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Oct 18 22:31:33 2019 +0200
tdf#127942: Make a slide that is being dragged (for re-ordering) the selected
Otherwise we would have to add a new message to to the protocol to
move an arbitrary part of a document. (Currently there only is the
'moveselectedclientparts' message.) Also a new API would be needed in
LibreOfficeKit to move an arbitrary part.
Change-Id: I3012982cb0c2bc18e55f47554be51958817f9015
Reviewed-on: https://gerrit.libreoffice.org/80214
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
(cherry picked from commit 71be6ce1ac3533df4cd04b8c01beef89888d5809)
Reviewed-on: https://gerrit.libreoffice.org/80584
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 92bbd2673..f40d4fe7a 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -357,6 +357,14 @@ L.Control.PartsPreview = L.Control.extend({
},
_handleDragStart: function (e) {
+ // To avoid having to add a new message to move an arbitrary part, let's select the
+ // slide that is being dragged.
+ var part = $('#slide-sorter .mCSB_container .preview-frame').index(e.target.parentNode);
+ if (part !== null) {
+ var partId = parseInt(part) - 1; // The first part is just a drop-site for reordering.
+ this.partsPreview._map.setPart(partId);
+ this.partsPreview._map.selectPart(partId, 1, false); // And select.
+ }
// By default we move when dragging, but can
// support duplication with ctrl in the future.
e.dataTransfer.effectAllowed = 'move';
commit 34f2a934f7d9c57c08818dd0458f1f36ff2a0188
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Jan 20 16:44:28 2019 -0500
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Oct 18 22:31:20 2019 +0200
wsd: don't warn incorrectly when selecting current part
Change-Id: I3c872469911b1f232e40cc110859402fc0814f3a
Reviewed-on: https://gerrit.libreoffice.org/69640
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 3b931560b945c25bb820ba0b24dab7d229f3336b)
Reviewed-on: https://gerrit.libreoffice.org/80583
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index fdccb6ae4..6699c67a5 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1815,14 +1815,17 @@ bool ChildSession::selectClientPart(const char* /*buffer*/, int /*length*/, cons
getLOKitDocument()->setView(_viewId);
- if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT && nPart != getLOKitDocument()->getPart())
+ if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
{
- getLOKitDocument()->selectPart(nPart, nSelect);
+ if (nPart != getLOKitDocument()->getPart())
+ {
+ getLOKitDocument()->selectPart(nPart, nSelect);
- // Notify the client of the selection update.
- const std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get());
- if (!status.empty())
- return sendTextFrame("statusupdate: " + status);
+ // Notify the client of the selection update.
+ const std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get());
+ if (!status.empty())
+ return sendTextFrame("statusupdate: " + status);
+ }
}
else
{
More information about the Libreoffice-commits
mailing list