[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-03-02 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit d2c1d60c34adab0ea50443cd5ef54c5f4571d640
Author: mert 
AuthorDate: Mon Mar 2 16:48:50 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 2 21:28:34 2020 +0100

Fix hyperlinkclicked message is not properly parsed

$.inArray does not work because the parsed msg
is not an array
Change-Id: I68a8312da17b0832b09a88afeaf05ad75a2c6e2d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89833
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 41d065af2a8e58d76f53c9b57ff55093e0210531)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89804

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index e9b5ed12b..9de7db98d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1095,13 +1095,15 @@ L.TileLayer = L.GridLayer.extend({
_onHyperlinkClickedMsg: function (textMsg) {
var link = null;
var coords = null;
+   var hyperlinkMsgStart = 'hyperlinkclicked: ';
+   var coordinatesMsgStart = ' coordinates: ';
 
-   if ($.inArray('coordinates', textMsg) !== -1) {
-   var coordpos = textMsg.indexOf(' coordinates');
-   link = textMsg.substring(18, coordpos);
-   coords = textMsg.substring(coordpos+12);
+   if (textMsg.indexOf(coordinatesMsgStart) !== -1) {
+   var coordpos = textMsg.indexOf(coordinatesMsgStart);
+   link = textMsg.substring(hyperlinkMsgStart.length, 
coordpos);
+   coords = 
textMsg.substring(coordpos+coordinatesMsgStart.length);
} else
-   link = textMsg.substring(18);
+   link = textMsg.substring(hyperlinkMsgStart.length);
 
this._map.fire('hyperlinkclicked', {url: link, coordinates: 
coords});
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-28 Thread Aron Budea (via logerrit)
 loleaflet/src/control/Control.ContextMenu.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a85baf056536213197c6f551081c2c17048a029f
Author: Aron Budea 
AuthorDate: Wed Feb 26 16:51:48 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Feb 28 16:37:23 2020 +0100

Replace 'includes' with '$.inArray' for IE11

Regression from b36d56bf5b022bf4b41d062a82326b5ea57b8dbf.

Change-Id: I270afb92366fa8992c08a79bd1c561117a18bb9c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89560
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 
(cherry picked from commit 6fdad3ba94ddbc35791b89da475d11446fea420f)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89573
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index b5db30d02..5b29ce168 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -109,7 +109,7 @@ L.Control.ContextMenu = L.Control.extend({
var contextMenu = this._createContextMenuStructure(obj);
var spellingContextMenu = false;
for (var menuItem in contextMenu) {
-   if (menuItem.includes('.uno:SpellCheckIgnore')) {
+   if ($.inArray('.uno:SpellCheckIgnore', menuItem) !== 
-1) {
spellingContextMenu = true;
break;
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-28 Thread Aron Budea (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 73b9d56999d9f7e53ef08fec7ef1ad80eb388d26
Author: Aron Budea 
AuthorDate: Wed Feb 26 21:10:37 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Feb 28 16:36:39 2020 +0100

Replace 'includes' with '$.inArray' for IE11

Regression from 864749bb1681e352f3c6e63548f31d3ede63422a.

Change-Id: Ie4fdc673f9e08fbfce24220656380cc3e183da37
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89593
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 
(cherry picked from commit 1173d8df303670441bd8aee14bd75c29b18b422a)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89576
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index c38e132d0..e9b5ed12b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1096,7 +1096,7 @@ L.TileLayer = L.GridLayer.extend({
var link = null;
var coords = null;
 
-   if (textMsg.includes('coordinates')) {
+   if ($.inArray('coordinates', textMsg) !== -1) {
var coordpos = textMsg.indexOf(' coordinates');
link = textMsg.substring(18, coordpos);
coords = textMsg.substring(coordpos+12);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Dennis Francis (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |4 
 1 file changed, 4 insertions(+)

New commits:
commit 19190f539e10358dd7584e34438d8d11f9ec2498
Author: Dennis Francis 
AuthorDate: Wed Feb 26 21:50:03 2020 +0530
Commit: Jan Holesovsky 
CommitDate: Wed Feb 26 21:58:06 2020 +0100

Fix js crash when jsdialog invoked on piecharts

For some reason, the parsed jsdialog message for piecharts
in calc has element(s) with children that evaluates to undefined.
Although we need to fix why there is such an child for any ui object,
this is a quick fix that skips such entries, so that the chart dialog
is shown without a crash in the console. Else the dialog wont appear.

Change-Id: Iff11051bf775ece63ac9f0ca180b3c76d7d14e84
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89574
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 45a00d502..27781a8f8 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1595,6 +1595,8 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
 
for (var idx = 0; idx < data.length; ++idx) {
+   if (!data[idx])
+   continue;
var controlId = data[idx].id;
if (controlId && 
this._missingLabelData.hasOwnProperty(controlId)) {
data.splice(idx, 0, 
this._missingLabelData[controlId]);
@@ -1613,6 +1615,8 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._amendJSDialogData(data);
for (var childIndex in data) {
var childData = data[childIndex];
+   if (!childData)
+   continue;
this._parentize(childData);
var childType = childData.type;
var processChildren = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Ashod Nakashian (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 1ac490e0ebad6327c09718502327f3bb80854a5e
Author: Ashod Nakashian 
AuthorDate: Wed Feb 19 09:47:56 2020 -0500
Commit: Andras Timar 
CommitDate: Wed Feb 26 17:13:46 2020 +0100

leaflet: remove redundant check

Map.editorHasFocus() implies map.getWinId === 0.

Change-Id: I522a377df095683453d2499a87485465437f9abb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89356
Tested-by: Ashod Nakashian 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit af58e1975028d1f35171b94b1a1393814607d023)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89510
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index b91f44350..c38e132d0 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1135,7 +1135,7 @@ L.TileLayer = L.GridLayer.extend({
.openOn(this._map);
}
 
-   if (!this._map.editorHasFocus() && (modifierViewId === 
this._viewId) && (this._map.getWinId === 0) && (this._map._permission === 
'edit')) {
+   if (!this._map.editorHasFocus() && (modifierViewId === 
this._viewId) && (this._map._permission === 'edit')) {
// Regain cursor if we had been out of focus and now 
have input.
// (only if it is our own cursor and the input is 
actually not
// going into a dialog)
@@ -2108,8 +2108,7 @@ L.TileLayer = L.GridLayer.extend({
var updated = true;
if (!this._cursorMarker) {
this._cursorMarker = L.cursor(cursorPos, 
pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())), 
{blink: true});
-   }
-   else {
+   } else {
var oldLatLng = this._cursorMarker.getLatLng();
this._cursorMarker.setLatLng(cursorPos, 
pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom(;
var newLatLng = this._cursorMarker.getLatLng();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Ashod Nakashian (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 60431983475c211cc4f875fa7bcbb30c3126e8c9
Author: Ashod Nakashian 
AuthorDate: Tue Feb 25 20:51:58 2020 -0500
Commit: Andras Timar 
CommitDate: Wed Feb 26 17:11:43 2020 +0100

leaflet: don't hide the keyboard when changing selection

We now don't change the keyboard state when the user
drags the selection markers.

Change-Id: Ic3dec8011808df8d1028e1925190854a50588e1c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89492
Tested-by: Ashod Nakashian 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 23f484813116a9e130e697708dbb4621da163712)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89513
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 3fb939a49..b91f44350 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2624,7 +2624,6 @@ L.TileLayer = L.GridLayer.extend({
}
if (e.type === 'dragend') {
e.target.isDragged = false;
-   this._map.focus();
this._map.fire('scrollvelocity', {vx: 0, vy: 0});
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Ashod Nakashian (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |5 +++--
 loleaflet/src/layer/tile/TileLayer.js|1 +
 loleaflet/src/map/Map.js |   13 +
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 772dd0d30619561ad5d78aec086d4307e16ca001
Author: Ashod Nakashian 
AuthorDate: Tue Feb 11 08:34:04 2020 -0500
Commit: Andras Timar 
CommitDate: Wed Feb 26 17:11:11 2020 +0100

leaflet: fix searching in document functionality

This makes searching work again, but typing 'r'
still triggers F3, which simply matches the next
hit (on desktop, on mobile it works fine).

So (on desktop) typing 'your' will match the first 'you'
and the 'r' will move the search results to the
second 'you' (assuming there are at least two 'you'
entries in the document and one 'your').

Change-Id: Iab425afdfb3848ecff97f5599ceb7cae160b097d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89357
Tested-by: Ashod Nakashian 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 8ad7c4790c4a34d3e6a5ebfe5810b6cb00354acc)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89511
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 6c47153f2..95c36dedd 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1372,8 +1372,9 @@ function onSearchKeyPress(e) {
 }
 
 function onSearchFocus() {
-   // hide the caret in the main document
-   map._onLostFocus();
+   // Start searching.
+   map.fire('searchstart');
+
updateSearchButtons();
 }
 
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index a0fff8280..3fb939a49 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2160,6 +2160,7 @@ L.TileLayer = L.GridLayer.extend({
if (this._map._permission === 'edit'
&& this._map._isCursorVisible   // only when LOK has told us it 
is ok
&& this._map.editorHasFocus()   // not when document is not 
focused
+   && !this._map.isSearching() // not when searching within 
the doc
&& !this._isZooming // not when zooming
 // && !this.isGraphicVisible() // not when sizing / 
positioning graphics
&& !this._isEmptyRectangle(this._visibleCursor)) {
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index cd2c8aad1..4aa7fd7c7 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -120,6 +120,8 @@ L.Map = L.Evented.extend({
this._winId = 0;
// The object of the dialog, if any (must have .focus callable).
this._activeDialog = null;
+   // True only when searching within the doc, as we need to use 
winId==0.
+   this._isSearching = false;
 
 
vex.dialogID = -1;
@@ -248,6 +250,8 @@ L.Map = L.Evented.extend({
// Fired to signal that the input focus is being changed.
this.on('changefocuswidget', this._onChangeFocusWidget, this);
 
+   this.on('searchstart', this._onSearchStart, this);
+
// View info (user names and view ids)
this._viewInfo = {};
this._viewInfoByUserName = {};
@@ -947,6 +951,10 @@ L.Map = L.Evented.extend({
this.fire('hyperlinkclicked', {url: helpURL});
},
 
+   isSearching: function() {
+   return this._isSearching;
+   },
+
_fireInitComplete: function (condition) {
if (this.initComplete) {
return;
@@ -1358,6 +1366,7 @@ L.Map = L.Evented.extend({
 
this._winId = winId;
this._activeDialog = dialog;
+   this._isSearching = false;
 
var doclayer = this._docLayer;
if (doclayer)
@@ -1402,6 +1411,10 @@ L.Map = L.Evented.extend({
}
},
 
+   _onSearchStart: function () {
+   this._isSearching = true;
+   },
+
_onUpdateProgress: function (e) {
if (e.statusType === 'start') {
if (this._socket.socket.readyState === 1) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Michael Meeks (via logerrit)
 loleaflet/src/control/Control.Menubar.js |5 -
 1 file changed, 5 deletions(-)

New commits:
commit cb2000e0ef2aee65e065e3a6f6875849882fe0ce
Author: Michael Meeks 
AuthorDate: Wed Feb 26 14:59:19 2020 +
Commit: Andras Timar 
CommitDate: Wed Feb 26 17:06:15 2020 +0100

remove less-useful / non-functioning impress fields.

Change-Id: Ie3e4a118c3069abf928c93b03a9e3a1c60b1d251
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89569
Reviewed-by: Miklos Vajna 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index a4b876536..4cc533f17 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -684,11 +684,6 @@ L.Control.Menubar = L.Control.extend({
{uno: 
'.uno:InsertDateFieldVar'},
{uno: 
'.uno:InsertTimeFieldFix'},
{uno: 
'.uno:InsertTimeFieldVar'},
-   {type: 'separator'},
-   {uno: '.uno:InsertSlideField'},
-   {uno: 
'.uno:InsertSlideTitleField'},
-   {uno: '.uno:InsertSlidesField'},
-   {uno: '.uno:InsertFileField'},
]},
]
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Pranam Lashkari (via logerrit)
 loleaflet/src/map/handler/Map.TouchGesture.js |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 1983a194e8cb67fd8d60d1545105c63d9526932c
Author: Pranam Lashkari 
AuthorDate: Tue Feb 11 08:20:47 2020 +0530
Commit: Andras Timar 
CommitDate: Wed Feb 26 16:28:11 2020 +0100

Stop unnecessary calculation: ergonomic scrolling

Even when the document reached the boundary,
autoscrolling function was being called unnecessary
 until certain conditions are met
 this did not cause the document to scroll beyond the boundary
 bu it used to consume some CPU

 follow up for: https://gerrit.libreoffice.org/c/online/+/88072

Change-Id: I1cb6d6917c70de18af369d827e986a16eeb50c99
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89445
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 849f64d69..1fc7479c6 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -637,6 +637,7 @@ L.Map.TouchGesture = L.Handler.extend({
 
_autoscroll: function() {
var elapsed, delta;
+
elapsed = Date.now() - this._timeStamp;
delta = this._amplitude.multiplyBy(Math.exp(-elapsed / 325));
var e = this._constructFakeEvent({
@@ -646,13 +647,24 @@ L.Map.TouchGesture = L.Handler.extend({
}, 'mousemove');
e.autoscroll = true;
if (delta.x > 0.2 || delta.x < -0.2 || delta.y > 0.2 || delta.y 
< -0.2) {
+   var org = this._map.getPixelOrigin();
+   var docSize = 
this._map.getLayerMaxBounds().getSize().subtract(this._map.getSize());
+   var horizontalEnd, verticalEnd;
+
if (this._map.getDocSize().x < this._map.getSize().x) {
//don't scroll horizontally if document fits 
the view
delta.x = 0;
+   horizontalEnd = true;
+   } else {
+   horizontalEnd = Math.max(Math.min(org.x, 
this._newPos.x), org.x - Math.max(docSize.x, 0)) !== this._newPos.x;
}
+
if (this._map.getDocSize().y < this._map.getSize().y) {
//don't scroll vertically if document fits the 
view
delta.y = 0;
+   verticalEnd = true;
+   } else {
+   verticalEnd = Math.max(Math.min(org.y, 
this._newPos.y), org.y - Math.max(docSize.y, 0)) !== this._newPos.y;
}
 
this._map.dragging._draggable._startPoint = 
this._startSwipePoint;
@@ -666,7 +678,9 @@ L.Map.TouchGesture = L.Handler.extend({
this._map._docLayer._preFetchBorder = null;
this._map._docLayer._preFetchTiles();
 
-   this.autoscrollAnimReq = 
L.Util.requestAnimFrame(this._autoscroll, this, true);
+   if (!horizontalEnd || !verticalEnd) {
+   this.autoscrollAnimReq = 
L.Util.requestAnimFrame(this._autoscroll, this, true);
+   }
}
else {
this._map.dragging._draggable._onUp(e);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-26 Thread Ashod Nakashian (via logerrit)
 loleaflet/src/control/Control.LokDialog.js |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b97592ee5ea537684f51a1ce43911963f939a838
Author: Ashod Nakashian 
AuthorDate: Tue Feb 25 19:27:14 2020 -0500
Commit: Jan Holesovsky 
CommitDate: Wed Feb 26 12:59:46 2020 +0100

leaflet: don't lose focus when the dialog cursor is hiden

The cursor visibility can change rapidly, and the formula-bar
seems to do this when typing into it. The result is that
because of losing the input focus we lose some of the input.

Instead, we only use the dialog cursor update to show the keyboard
rather than to hide it. For hiding, other messages will do it.

Change-Id: I0e8674170aa9d05b6ddc15de8d35792377b6725b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89490
Tested-by: Ashod Nakashian 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 16f1c624ea7070748d1ef05acd8f448b9af14419)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89512
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 2a8d5688a..d106b1504 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -414,8 +414,11 @@ L.Control.LokDialog = L.Control.extend({
L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'left', x + 
'px');
L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'top', y + 
'px');
 
-   // Make sure the keyboard is visible if the user can type.
-   this._map.focus(cursorVisible);
+   // Make sure the keyboard is visible if there is a cursor.
+   // But don't hide the keyboard otherwise.
+   // At least the formula-input hides the cursor after each key 
input.
+   if (cursorVisible)
+   this._map.focus(true);
},
 
_createDialogCursor: function(dialogId) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-02-25 Thread Tamás Zolnai (via logerrit)
 loleaflet/src/control/Control.Menubar.js |2 +-
 loleaflet/src/core/LOUtil.js |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 445e847e0c720c6bdb756ce3512218778ce8dd8d
Author: Tamás Zolnai 
AuthorDate: Tue Feb 25 12:10:53 2020 +0100
Commit: Andras Timar 
CommitDate: Tue Feb 25 20:44:26 2020 +0100

mobile: fix-up non-breaking space insertion.

Make it to have the icon, but also trigger the right
uno command.

Change-Id: Ic762fee0eee0f1a6bc793edc98ed2217075364f7
(cherry picked from commit 4ca5089d56369d335a39c13e428d2e932c0ac8a3)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89452
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 8517f8c0d..a4b876536 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -648,7 +648,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:HyperlinkDialog'), 
id: 'inserthyperlink', type: 'action'},
{name: _UNO('.uno:ShapesMenu'), id: 
'insertshape', type: 'action'},
{name: _UNO('.uno:FormattingMarkMenu', 
'text'), id: 'formattingmark', type: 'menu', menu: [
-   {name: 
_UNO('.uno:InsertNonBreakingSpace'), id: 'insertnonbreakingspace'},
+   {uno: 
'.uno:InsertNonBreakingSpace'},
{uno: '.uno:InsertHardHyphen'},
{uno: '.uno:InsertSoftHyphen'},
{uno: '.uno:InsertZWSP'},
diff --git a/loleaflet/src/core/LOUtil.js b/loleaflet/src/core/LOUtil.js
index f540e6da2..7ff1a5272 100644
--- a/loleaflet/src/core/LOUtil.js
+++ b/loleaflet/src/core/LOUtil.js
@@ -92,7 +92,6 @@ L.LOUtil = {
commandWithoutIcon: [
'InsertPageHeader',
'InsertPageFooter',
-   'InsertNonBreakingSpace',
'InsertHardHyphen',
'InsertSoftHyphen',
'InsertZWSP',
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-18 Thread Jan Holesovsky (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 27bc2c2705ea44ab2abae3536f1de6a714d41946
Author: Jan Holesovsky 
AuthorDate: Wed Dec 18 23:57:00 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 19 00:27:42 2019 +0100

Revert "android: Translate the style names in the mobile wizard."

This is not needed any more when we use the .mo files correctly.

This reverts commit ddf0612e2f361af1f9284125a0dee98844ef7832.

Change-Id: I13260c30e874ced89667b4dc45ec7d6e26ec5138
Reviewed-on: https://gerrit.libreoffice.org/85453
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 4b329c40e..6d788bcac 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1037,11 +1037,6 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
}
title = builder._cleanText(title);
-
-   // FIXME find out why Android needs this & fix
-   if (window.ThisIsTheAndroidApp)
-   title = _(title);
-
data.text = title;
 
var entries = [];
@@ -1104,13 +1099,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 
_comboboxEntry: function(parentContainer, data, builder) {
var fixedtext = L.DomUtil.create('p', 'mobile-wizard', 
parentContainer);
-
-   // FIXME find out why Android needs this & fix
-   if (window.ThisIsTheAndroidApp)
-   fixedtext.innerHTML = _(builder._cleanText(data.text));
-   else
-   fixedtext.innerHTML = builder._cleanText(data.text);
-
+   fixedtext.innerHTML = builder._cleanText(data.text);
fixedtext.parent = data.parent;
 
if (data.style && data.style.length)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Ashod Nakashian (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d4903eca646120e3590c7f60c4d02963d99c238d
Author: Ashod Nakashian 
AuthorDate: Thu Dec 12 07:19:02 2019 -0500
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 13:24:43 2019 +0100

leaflet: menu mobileWizard calls are not sidebar

This fixes long-press context-menus on mobile.

Change-Id: I63df610a12a075753a277a4257d6e7c785473107
Reviewed-on: https://gerrit.libreoffice.org/85048
Reviewed-by: Szymon Kłos 
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit 7a2efacc11cbb1084a5e86782acf0a0d0440fddb)
Reviewed-on: https://gerrit.libreoffice.org/85049

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 4b8982d50..f5aa7c767 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -234,7 +234,8 @@ L.Control.MobileWizard = L.Control.extend({
_onMobileWizard: function(data) {
if (data) {
var isSidebar = data.id !== 'insert' && data.id !== 
'menubar'
-   && data.id !== 'insertshape' && data.id !== 
'funclist';
+   && data.id !== 'insertshape' && data.id !== 
'funclist'
+   && data.executionType !== 'menu';
 
if (!this._isActive && isSidebar) {
if (this.map.showSidebar == false)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Szymon Kłos (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7e42d75fbf8267d069df1522e14fd7f21bb089c6
Author: Szymon Kłos 
AuthorDate: Thu Dec 12 13:01:02 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 13:14:29 2019 +0100

jsdialog: fix insert menu

Change-Id: I97b21e3358f078d12c99718623303d3f096a8d46
Reviewed-on: https://gerrit.libreoffice.org/85047
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 2bf3ffc1f..4b8982d50 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -58,7 +58,6 @@ L.Control.MobileWizard = L.Control.extend({
_showWizard: function() {
$('#mobile-wizard').show();
$('#toolbar-down').hide();
-   this._refreshSidebar();
},
 
_showWizardSidebar: function() {
@@ -234,11 +233,14 @@ L.Control.MobileWizard = L.Control.extend({
 
_onMobileWizard: function(data) {
if (data) {
-   var isSidebar = data.id !== 'menubar' && data.id !== 
'insertshape' && data.id !== 'funclist';
+   var isSidebar = data.id !== 'insert' && data.id !== 
'menubar'
+   && data.id !== 'insertshape' && data.id !== 
'funclist';
 
if (!this._isActive && isSidebar) {
if (this.map.showSidebar == false)
return;
+   else
+   this._refreshSidebar();
}
 
this._isActive = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Jan Holesovsky (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit ddf0612e2f361af1f9284125a0dee98844ef7832
Author: Jan Holesovsky 
AuthorDate: Thu Dec 12 13:00:13 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 13:05:41 2019 +0100

android: Translate the style names in the mobile wizard.

Change-Id: Idda5f05866aea203ba30646a2b4d4109be3f46e2
Reviewed-on: https://gerrit.libreoffice.org/85046
Reviewed-by: Szymon Kłos 
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 6d788bcac..4b329c40e 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1037,6 +1037,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
}
title = builder._cleanText(title);
+
+   // FIXME find out why Android needs this & fix
+   if (window.ThisIsTheAndroidApp)
+   title = _(title);
+
data.text = title;
 
var entries = [];
@@ -1099,7 +1104,13 @@ L.Control.JSDialogBuilder = L.Control.extend({
 
_comboboxEntry: function(parentContainer, data, builder) {
var fixedtext = L.DomUtil.create('p', 'mobile-wizard', 
parentContainer);
-   fixedtext.innerHTML = builder._cleanText(data.text);
+
+   // FIXME find out why Android needs this & fix
+   if (window.ThisIsTheAndroidApp)
+   fixedtext.innerHTML = _(builder._cleanText(data.text));
+   else
+   fixedtext.innerHTML = builder._cleanText(data.text);
+
fixedtext.parent = data.parent;
 
if (data.style && data.style.length)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Marco Cecchetti (via logerrit)
 loleaflet/src/control/Control.LokDialog.js |   43 -
 1 file changed, 24 insertions(+), 19 deletions(-)

New commits:
commit a63c016215be2bdb87b3fb40be7f357eb883e2a5
Author: Marco Cecchetti 
AuthorDate: Thu Dec 12 10:55:28 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 11:31:50 2019 +0100

calc: tunneled formula bar: skip painting when width is wrong.

In the hope of minimizing flikering effects we skip to paint the
formula bar when the size is not the expected one, on the contrary we
send a resize request with the correct width to the lok core.

We also skip to adjust/resize the formula bar when a sidebar resize
not really change the sidebar width.

Change-Id: I11d343b2ba722f96d3cdba6a2dfb66d85a071c5f
Reviewed-on: https://gerrit.libreoffice.org/85031
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 997fb9aac..7ac61c241 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -945,7 +945,6 @@ L.Control.LokDialog = L.Control.extend({
},
 
_paintDialog: function(parentId, rectangle, imgData) {
-
var strId = this._toStrId(parentId);
var canvas = document.getElementById(strId + '-canvas');
if (!canvas)
@@ -967,6 +966,7 @@ L.Control.LokDialog = L.Control.extend({
 
// Sidebars find out their size and become visible on 
first paint.
if (that._isSidebar(parentId)) {
+   //console.log('_paintDialog: side-bar: width: ' 
+ that._currentDeck.width);
that._resizeSidebar(strId, 
that._currentDeck.width);
 
// Update the underlying canvas.
@@ -974,38 +974,42 @@ L.Control.LokDialog = L.Control.extend({
that._setCanvasWidthHeight(panelCanvas, 
that._currentDeck.width, that._currentDeck.height);
}
 
+   // calc input bar find out their size on first paint 
call
var isCalcInputBar = that._isCalcInputBar(parentId);
-   if (isCalcInputBar) {
-   var canvas = 
L.DomUtil.get(that._calcInputBar.strId + '-canvas');
-   that._setCanvasWidthHeight(canvas, 
that._calcInputBar.width, that._calcInputBar.height);
-   }
-
-   ctx.drawImage(img, x, y);
-
-   // if dialog is hidden, show it
var container = L.DomUtil.get(strId);
-   if (container)
-   $(container).parent().show();
-   if (parentId in that._dialogs) {
-   // We might have closed the dialog by the time 
we render.
-   that.focus(parentId);
-   that._dialogs[parentId].isPainting = false;
-   }
-
if (isCalcInputBar && container) {
+   //console.log('_paintDialog: calc input bar: 
width: ' + that._calcInputBar.width);
+   var canvas = 
L.DomUtil.get(that._calcInputBar.strId + '-canvas');
+   that._setCanvasWidthHeight(canvas, 
that._calcInputBar.width, that._calcInputBar.height);
+   $(container).parent().show(); // show or width 
is 0
var deckOffset = 0;
if (that._currentDeck) {
var sidebar = 
L.DomUtil.get(that._currentDeck.strId);
if (sidebar) {
-   deckOffset = sidebar.width;
+   deckOffset = 
sidebar.clientWidth;
}
}
var correctWidth = container.clientWidth - 
deckOffset;
+   // resize the input bar to the correct size
+   // the input bar is rendered only if when the 
size is the expected one
if (that._calcInputBar.width !== correctWidth) {
console.log('_paintDialog: correct 
width: ' + correctWidth + ', _calcInputBar width: ' + that._calcInputBar.width);
+   that._dialogs[parentId].isPainting = 
false;

that._map._socket.sendMessage('resizewindow ' + parentId + ' size=' + 
correctWidth + ',' + that._calcInputBar.height);
+   return;
}
  

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Marco Cecchetti (via logerrit)
 loleaflet/src/core/Socket.js |   52 ++-
 1 file changed, 51 insertions(+), 1 deletion(-)

New commits:
commit 43807db18001cdd92dedce4f735e19bf53316b78
Author: Marco Cecchetti 
AuthorDate: Thu Dec 12 10:50:19 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 11:28:44 2019 +0100

try to delay incoming messages when the js bundle is not yet loaded

Incoming message are stored and handled as soon as the js bundle is
loaded and the ui is ready.
At present this solution has been selectively enabled for the
following types of incoming messages: 'window', 'statechanged',
'celladdress'.

Change-Id: I22e98ff11c67140deb639295273be9533560536b
Reviewed-on: https://gerrit.libreoffice.org/85030
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index cdeeefe16..38c175d57 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -22,6 +22,8 @@ L.Socket = L.Class.extend({
console.debug('socket.initialize:');
this._map = map;
this._msgQueue = [];
+   this._delayedMessages = [];
+   this._handlingDelayedMessages = false;
},
 
getWebSocketBaseURI: function(map) {
@@ -817,11 +819,59 @@ L.Socket = L.Class.extend({
return;
}
 
-   if (this._map._docLayer) {
+   var msgDelayed = false;
+   if (!this._isReady() || this._delayedMessages.length || 
this._handlingDelayedMessages) {
+   msgDelayed = this._tryToDelayMessage(textMsg);
+   }
+
+   if (this._map._docLayer && !msgDelayed) {
this._map._docLayer._onMessage(textMsg, img);
}
},
 
+   _tryToDelayMessage: function(textMsg) {
+   var delayed = false;
+   if (textMsg.startsWith('window:') ||
+   textMsg.startsWith('celladdress:') ||
+   textMsg.startsWith('statechanged:')) {
+   //console.log('_tryToDelayMessage: textMsg: ' + 
textMsg);
+   var message = {msg: textMsg};
+   this._delayedMessages.push(message);
+   delayed  = true;
+   }
+
+   if (delayed && !this._delayedMsgHandlerTimeoutId) {
+   this._handleDelayedMessages();
+   }
+   return delayed;
+   },
+
+   _handleDelayedMessages: function() {
+   if (!this._isReady() || this._handlingDelayedMessages) {
+   var that = this;
+   // Retry in a bit.
+   this._delayedMsgHandlerTimeoutId = 
setTimeout(function() {
+   that._handleDelayedMessages();
+   }, 100);
+   return;
+   }
+   var messages = [];
+   for (var i = 0; i < this._delayedMessages.length; ++i) {
+   var message = this._delayedMessages[i];
+   if (message)
+   messages.push(message.msg);
+   }
+   this._delayedMessages = [];
+   this._delayedMsgHandlerTimeoutId = null;
+   this._handlingDelayedMessages = true;
+   if (this._map._docLayer) {
+   for (var k = 0; k < messages.length; ++k) {
+   this._map._docLayer._onMessage(messages[k]);
+   }
+   }
+   this._handlingDelayedMessages = false;
+   },
+
_delayedFitToScreen: function(height) {
if (this._map.getSize().y > 0) {
// If we have a presentation document and the zoom 
level has not been set
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-12 Thread Szymon Kłos (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 05ae02cde9c2643e13f5f5b6ef2d00b457094cb5
Author: Szymon Kłos 
AuthorDate: Thu Dec 12 10:17:44 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Dec 12 11:03:56 2019 +0100

jsdialog: request update on mobile wizard show

Change-Id: Ib3f90dfa23107f4f2299d05fbf227870156c54d9
Reviewed-on: https://gerrit.libreoffice.org/85027
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 912c4602d..2bf3ffc1f 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -58,6 +58,7 @@ L.Control.MobileWizard = L.Control.extend({
_showWizard: function() {
$('#mobile-wizard').show();
$('#toolbar-down').hide();
+   this._refreshSidebar();
},
 
_showWizardSidebar: function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.PartsPreview.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f8c800dba915cb8e6eefef515ccfd52304a70ca8
Author: mert 
AuthorDate: Wed Dec 11 14:10:03 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:23:40 2019 +0100

fix Keyboard pops up when switching slides

Change-Id: I6b0953e4868867786a8c63c5ccbf132baa0d0324
Reviewed-on: https://gerrit.libreoffice.org/84935
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 
(cherry picked from commit 651a4f546aa07a42e0a5416af317ef46851c69b3)
Reviewed-on: https://gerrit.libreoffice.org/84964
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index ddc9c6041..12c5bab19 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -170,6 +170,7 @@ L.Control.PartsPreview = L.Control.extend({
.on(img, 'click', this._map.focus, this._map)
.on(img, 'click', function() {
this.partsFocused = true;
+   document.activeElement.blur();
}, this);
 
var topBound = this._previewContTop;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 567c4c5ba790f7bdece8e26c7f47601800ceae04
Author: mert 
AuthorDate: Wed Dec 11 13:50:10 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:22:59 2019 +0100

Fix closing hyperlink dialog doesn't focus

The document should have the focus after
closing the hyperlink dialog

Change-Id: I5f4cf4f2cabe92b97e60a4d118ba67255f598c0b
Reviewed-on: https://gerrit.libreoffice.org/84933
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 
(cherry picked from commit 041b16202c35064df4e905115c69c3486f7cb717)
Reviewed-on: https://gerrit.libreoffice.org/84963
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index e2289a748..1a353ff67 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -470,6 +470,7 @@ L.Map.include({
}
};
map.sendUnoCommand('.uno:SetHyperlink', 
command);
+   map.focus();
}
}
});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 3bfeb807bfa1caa69f67363fe04d76cdbe3c0eee
Author: mert 
AuthorDate: Tue Dec 10 20:20:59 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:21:37 2019 +0100

Remove Find&Replace button for mobile

Change-Id: Icfffee63620cca3df52dd21a011cf2b2e30a834d
Reviewed-on: https://gerrit.libreoffice.org/84884
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 
(cherry picked from commit 4783b71920fb961daf028e02b9f28910bcfa5a4f)
Reviewed-on: https://gerrit.libreoffice.org/84961

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 91b0b3eb2..2b8af4510 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -481,9 +481,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 
'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
@@ -525,9 +523,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:TableMenu', 'text'/*HACK should be 
'presentation', but not in xcu*/), type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -571,9 +567,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 
'menu', menu: [
{name: _UNO('.uno:InsertRowsMenu', 
'spreadsheet'), type: 'menu', menu: [
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread Szymon Kłos (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 9d82390ce8769559bed7ec8eb6d3dae515a3bde8
Author: Szymon Kłos 
AuthorDate: Tue Dec 10 19:15:59 2019 +0100
Commit: Szymon Kłos 
CommitDate: Wed Dec 11 11:14:12 2019 +0100

jsdialog: correctly parse status of changed items

Change-Id: I57384b07f6df5d2d3b0afd97ee47330644083f09
Reviewed-on: https://gerrit.libreoffice.org/84889
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index e51b2f755..e7faca385 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1471,12 +1471,8 @@ L.TileLayer = L.GridLayer.extend({
var isPureJSON = textMsg.indexOf('=') === -1 && 
textMsg.indexOf('{') !== -1;
if (isPureJSON) {
var json = JSON.parse(textMsg);
-
-   for (var i = 0; i < json.items.length; i++) {
-   var item = json.items[i];
-   if (item.commandName && item.state) {
-   this._map.fire('commandstatechanged', 
item);
-   }
+   if (json.commandName && json.state) {
+   this._map.fire('commandstatechanged', json);
}
} else {
var index = textMsg.indexOf('=');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread Tamás Zolnai (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 970f8cb75a0472aef61ec256f05b20b922faf4ae
Author: Tamás Zolnai 
AuthorDate: Tue Dec 10 18:26:03 2019 +0100
Commit: Andras Timar 
CommitDate: Wed Dec 11 09:44:04 2019 +0100

Mobile: long-press on a selection, should not kill the selection

Don't clear selection unconditionally. _clearSearchResults() method
is called by mouse click and we don't want to clear selection
during opening a context menu.
If there is any search term then we can clear the selection,
otherwise don't change it.

Change-Id: I8f672e4d6d30e9bb3828a39e591a64598a7a8722
Reviewed-on: https://gerrit.libreoffice.org/84885
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 0120036ea..e51b2f755 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1423,11 +1423,13 @@ L.TileLayer = L.GridLayer.extend({
},
 
_clearSearchResults: function() {
+   if (this._searchTerm) {
+   this._selections.clearLayers();
+   }
this._lastSearchResult = null;
this._searchResults = null;
this._searchTerm = null;
this._searchResultsLayer.clearLayers();
-   this._selections.clearLayers();
},
 
_drawSearchResults: function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-10 Thread Pranam Lashkari (via logerrit)
 loleaflet/src/map/Map.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 37a47497a3041595cdaa8240cd44d1e0221fdf49
Author: Pranam Lashkari 
AuthorDate: Tue Dec 10 05:06:17 2019 +0530
Commit: Andras Timar 
CommitDate: Tue Dec 10 21:19:38 2019 +0100

Document focus stopped when renaming sheet

while rename sheet popup is focused and same document is opened where else
popup used to lose the focus and document is focused.
So the name used to get typed in document instead of popup

Change-Id: I18aa3ba9d5485fd9f5928635aa611d7db5771495
Reviewed-on: https://gerrit.libreoffice.org/84794
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit c099715fecdc0d43b4175a28e6e6cd988d0a801c)
Reviewed-on: https://gerrit.libreoffice.org/84881
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 1a26c4b2e..a199716c9 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1186,7 +1186,7 @@ L.Map = L.Evented.extend({
}
 
this._startInactiveTimer();
-   if (!L.Browser.mobile) {
+   if (!L.Browser.mobile && !isAnyVexDialogActive()) {
this.focus();
}
return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-10 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b8317170aad2d05b967d284935752c7a0939f7e8
Author: mert 
AuthorDate: Tue Dec 10 16:01:00 2019 +0300
Commit: Michael Meeks 
CommitDate: Tue Dec 10 18:37:23 2019 +0100

fix Selected language in the bottom status bar

disappears, also fixed language selection
does not work at all

Change-Id: I1349e6ccc786f4c17130f14ff95e44f4ea858550
Reviewed-on: https://gerrit.libreoffice.org/84845
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 9cc80474a8d00fcbe21a532b43179c5440fc672e)
Reviewed-on: https://gerrit.libreoffice.org/84886
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 5d9de3baf..1537062ce 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1833,15 +1833,13 @@ function onCommandStateChanged(e) {
else if (commandName === '.uno:LanguageStatus') {
var code = state;
var language = _(state);
-
var split = code.split(';');
if (split.length > 1) {
language = _(split[0]);
code = split[1];
}
-   updateToolbarItem(statusbar, 'LanguageStatus', 
$('#LanguageStatus').html(language).parent().html());
w2ui['editbar'].set('languagecode', {text: code});
-   $('#tb_actionbar_item_LanguageStatus table table 
td:first-of-type').html(language+' ');
+   w2ui['actionbar'].set('LanguageStatus', {text: language, 
selected: language});
}
else if (commandName === '.uno:ModifiedStatus') {
if (e.state === 'true') {
@@ -1962,7 +1960,9 @@ function onCommandValues(e) {
for (var lang in languages) {
translated = languages[lang].translated;
neutral = languages[lang].neutral;
-   toolbaritems.push({ id: neutral, text: translated, uno: 
constLang + encodeURIComponent('Default_' + neutral) });
+   var splitTranslated = translated.split(';');
+   var splitNeutral = neutral.split(';');
+   toolbaritems.push({ id: neutral, text: 
splitTranslated[0], uno: constLang + encodeURIComponent('Default_' + 
splitNeutral[0]) });
}
 
toolbaritems.push({ id: 'reset', text: resetLang, uno: 
constLang + constDefault });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-10 Thread Szymon Kłos (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 668cd8c0bf2eddc6ea8a3be9852ed059b2d3e874
Author: Szymon Kłos 
AuthorDate: Tue Dec 10 10:34:49 2019 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 10 10:37:14 2019 +0100

jsdialog: reset current path when switched tab

Change-Id: I01221134c9726a858670584cb308a71ed049321a

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index a66479c33..0a17ac6bf 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -190,7 +190,7 @@ L.Control.MobileWizard = L.Control.extend({
 
selectedTab: function(tabText) {
if (this._currentPath && this._currentPath.length) {
-   this._currentPath[0] = tabText;
+   this._currentPath = [tabText];
}
},
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits