[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Ruler.js | 46 - 1 file changed, 27 insertions(+), 19 deletions(-) New commits: commit 4b48ee682cf65fb3a7024e9a6e2cebe046847194 Author: Tor Lillqvist AuthorDate: Thu Dec 5 17:32:35 2019 +0200 Commit: Tor Lillqvist CommitDate: Thu Dec 5 17:22:40 2019 +0100 tdf#128468: Tweak the ruler tick and tab stop positions to be just right Gosh that was painful. But now they seem to be correct. Some other clarifications and improvements. Also start trying to handle touch device dragging in the tab stop area, but that handler doesn't get invoked yet, and anyway any code to actually move the nearest tab stop is missing. Change-Id: I187bca84da70f03f5dcf032b997e43b5e54d7879 Reviewed-on: https://gerrit.libreoffice.org/84574 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index ec4a2ef89..9c488f8d0 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -73,6 +73,7 @@ L.Control.Ruler = L.Control.extend({ // Tab stops this._rTSWrapper = L.DomUtil.create('div', 'loleaflet-ruler-tabstopwrapper', this._rFace); this._rTSContainer = L.DomUtil.create('div', 'loleaflet-ruler-tabstopcontainer', this._rTSWrapper); + L.DomEvent.on(this._rTSContainer, 'touchstart', this._initiateTabstopDrag, this); return this._rWrapper; }, @@ -109,7 +110,7 @@ L.Control.Ruler = L.Control.extend({ if (this._map._docLayer._annotations._items.length === 0 || !this.options.marginSet) this.options.extraSize = 0; - var DraggableConvertRatio, lMargin, rMargin, wPixel, scale; + var lMargin, rMargin, wPixel, scale; lMargin = this.options.nullOffset; @@ -126,9 +127,9 @@ L.Control.Ruler = L.Control.extend({ this._fixOffset(); - DraggableConvertRatio = this.options.DraggableConvertRatio = wPixel / this.options.pageWidth; + this.options.DraggableConvertRatio = wPixel / this.options.pageWidth; this._rFace.style.width = wPixel + 'px'; - this._rBPContainer.style.marginLeft = (-1 * (DraggableConvertRatio * (500 - (lMargin % 1000))) + 1) + 'px'; + this._rBPContainer.style.marginLeft = (-1 * (this.options.DraggableConvertRatio * (500 - (lMargin % 1000))) + 1) + 'px'; var numCounter = -1 * parseInt(lMargin / 1000); @@ -143,7 +144,7 @@ L.Control.Ruler = L.Control.extend({ for (var num = 0; num <= (this.options.pageWidth / 1000) + 1; num++) { var marker = L.DomUtil.create('div', 'loleaflet-ruler-maj', this._rBPContainer); - marker.style.width = DraggableConvertRatio*1000 - 2 + 'px'; + marker.style.width = this.options.DraggableConvertRatio*1000 - 1 + 'px'; if (this.options.displayNumber) { if (numCounter !== 0) marker.innerText = Math.abs(numCounter++); @@ -157,25 +158,15 @@ L.Control.Ruler = L.Control.extend({ $('.loleaflet-ruler-tabstop').remove(); - // First an empty space - marker = L.DomUtil.create('div', 'loleaflet-ruler-tabstop', this._rTSContainer); - marker.style.marginLeft = (DraggableConvertRatio * lMargin) + 'px'; - - // Make its triangle invisible and truly zero width - marker.style.borderLeft = '0px'; - marker.style.borderRight = '0px'; - marker.style.borderBottom = '0px'; - - // Then the visible tab stops var pxPerMm100 = this._map._docLayer._docPixelSize.x / (this._map._docLayer._docWidthTwips * 2540/1440); var tabStopWidthAccum = 0; // Reduce their widths by the border - var tabstopBorder = getComputedStyle(marker, null).getPropertyValue('--loleaflet-ruler-tabstop-border'); for (num = 0; num < this.options.tabs.length; num++) { if (this.options.tabs[num].style >= 4) break; marker = L.DomUtil.create('div', 'loleaflet-ruler-tabstop', this._rTSContainer); var thisWidth = this.options.tabs[num].position - tabStopWidthAccum; + var tabstopBorder = getComputedStyle(marker, null).getPropertyValue('--loleaflet-ruler-tabstop-border'); marker.style.marginLeft = (pxPerMm100 * thisWidth - tabstopBorder) + 'px'; tabStopWidthAccum += thisWidth; } @@ -198,13 +189,18 @@ L.Control.Ruler = L.Control.extend({
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Ruler.js | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) New commits: commit da9ca774e541eb56dc906c425ee57dfcd5232d63 Author: Tor Lillqvist AuthorDate: Tue Dec 3 13:20:40 2019 +0200 Commit: Tor Lillqvist CommitDate: Tue Dec 3 13:23:02 2019 +0200 tdf#128468: Get rid of a bunch of pointless variables No reason to make the code even harder to understand by using variables that don't vary but hold a constant value. Especially when the variable names don't match their constant value. No changes in what the code does. Change-Id: If98ef6cdd741e76e8b4e383d005486736bf227a3 diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index 5bd4471db..4c243e2d4 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -91,16 +91,7 @@ L.Control.Ruler = L.Control.extend({ if (this._map._docLayer._annotations._items.length === 0 || !this.options.marginSet) this.options.extraSize = 0; - var classMajorSep = 'loleaflet-ruler-maj', - classMargin = 'loleaflet-ruler-margin', - classDraggable = 'loleaflet-ruler-drag', - rightComp = 'loleaflet-ruler-right', - leftComp = 'loleaflet-ruler-left', - lToolTip = 'loleaflet-ruler-ltooltip', - rToolTip = 'loleaflet-ruler-rtooltip', - leftMarginStr = _('Left Margin'), - rightMarginStr = _('Right Margin'), - DraggableConvertRatio, lMargin, rMargin, wPixel, scale; + var DraggableConvertRatio, lMargin, rMargin, wPixel, scale; lMargin = this.options.nullOffset; rMargin = this.options.pageWidth - (this.options.nullOffset + this.options.margin2); @@ -115,10 +106,10 @@ L.Control.Ruler = L.Control.extend({ var numCounter = -1 * parseInt(lMargin / 1000); - $('.' + classMajorSep).remove(); + $('.loleaflet-ruler-maj').remove(); for (var num = 0; num <= (this.options.pageWidth / 1000) + 1; num++) { - var marker = L.DomUtil.create('div', classMajorSep, this._rBPContainer); + var marker = L.DomUtil.create('div', 'loleaflet-ruler-maj', this._rBPContainer); marker.style.width = DraggableConvertRatio*1000 - 2 + 'px'; if (this.options.displayNumber) { if (numCounter !== 0) @@ -132,15 +123,15 @@ L.Control.Ruler = L.Control.extend({ this.options.marginSet = true; - this._lMarginMarker = L.DomUtil.create('div', classMargin + ' ' + leftComp, this._rFace); - this._rMarginMarker = L.DomUtil.create('div', classMargin + ' ' + rightComp, this._rFace); + this._lMarginMarker = L.DomUtil.create('div', 'loleaflet-ruler-margin loleaflet-ruler-left', this._rFace); + this._rMarginMarker = L.DomUtil.create('div', 'loleaflet-ruler-margin loleaflet-ruler-right', this._rFace); - this._lMarginDrag = L.DomUtil.create('div', classDraggable + ' ' + leftComp, this._rMarginWrapper); - this._lToolTip = L.DomUtil.create('div', lToolTip, this._lMarginDrag); - this._rMarginDrag = L.DomUtil.create('div', classDraggable + ' ' + rightComp, this._rMarginWrapper); - this._rToolTip = L.DomUtil.create('div', rToolTip, this._rMarginDrag); - this._lMarginDrag.title = leftMarginStr; - this._rMarginDrag.title = rightMarginStr; + this._lMarginDrag = L.DomUtil.create('div', 'loleaflet-ruler-drag loleaflet-ruler-left', this._rMarginWrapper); + this._lToolTip = L.DomUtil.create('div', 'loleaflet-ruler-ltooltip', this._lMarginDrag); + this._rMarginDrag = L.DomUtil.create('div', 'loleaflet-ruler-drag loleaflet-ruler-right', this._rMarginWrapper); + this._rToolTip = L.DomUtil.create('div', 'loleaflet-ruler-rtooltip', this._rMarginDrag); + this._lMarginDrag.title = _('Left Margin'); + this._rMarginDrag.title = _('Right Margin'); if (window.ThisIsTheiOSApp) { this.options.interactive = 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Ruler.js | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 4e42bae4a73fe8342921f4d695e9c84e723e3f33 Author: Tor Lillqvist AuthorDate: Mon Dec 2 16:43:18 2019 +0200 Commit: Tor Lillqvist CommitDate: Mon Dec 2 17:49:12 2019 +0100 tdf#128468: Make the margin handles in the ruler work better in the iOS app There is too much state that isn't necessarily in sync. Get rid of some of the coupling. Instead of turning on the catching of touchstart events in the _changeInteractions function, which does not work if you tap the make-editable button before the document has been loaded completely, start catching them right away after creation, but in the handler, the _initiateDrag function, ignore the event if the "map" is not yet marked as editable. Change-Id: Ief7a98e9b6ffa4db9d41f558d1081687032c4bcc Reviewed-on: https://gerrit.libreoffice.org/84235 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index 7855ae11d..5bd4471db 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -44,12 +44,7 @@ L.Control.Ruler = L.Control.extend({ this._lMarginDrag.style.cursor = 'e-resize'; this._rMarginDrag.style.cursor = 'w-resize'; - if (window.ThisIsTheiOSApp) { - this.options.interactive = true; - L.DomEvent.on(this._rMarginDrag, 'touchstart', this._initiateDrag, this); - L.DomEvent.on(this._lMarginDrag, 'touchstart', this._initiateDrag, this); - } - else { + if (!window.ThisIsTheiOSApp) { L.DomEvent.on(this._rMarginDrag, 'mousedown', this._initiateDrag, this); L.DomEvent.on(this._lMarginDrag, 'mousedown', this._initiateDrag, this); } @@ -58,11 +53,7 @@ L.Control.Ruler = L.Control.extend({ this._lMarginDrag.style.cursor = 'default'; this._rMarginDrag.style.cursor = 'default'; - if (window.ThisIsTheiOSApp) { - L.DomEvent.off(this._rMarginDrag, 'touchstart', this._initiateDrag, this); - L.DomEvent.off(this._lMarginDrag, 'touchstart', this._initiateDrag, this); - } - else { + if (!window.ThisIsTheiOSApp) { L.DomEvent.off(this._rMarginDrag, 'mousedown', this._initiateDrag, this); L.DomEvent.off(this._lMarginDrag, 'mousedown', this._initiateDrag, this); } @@ -150,6 +141,12 @@ L.Control.Ruler = L.Control.extend({ this._rToolTip = L.DomUtil.create('div', rToolTip, this._rMarginDrag); this._lMarginDrag.title = leftMarginStr; this._rMarginDrag.title = rightMarginStr; + + if (window.ThisIsTheiOSApp) { + this.options.interactive = true; + L.DomEvent.on(this._rMarginDrag, 'touchstart', this._initiateDrag, this); + L.DomEvent.on(this._lMarginDrag, 'touchstart', this._initiateDrag, this); + } } this._lMarginMarker.style.width = (DraggableConvertRatio*lMargin) + 'px'; @@ -195,6 +192,9 @@ L.Control.Ruler = L.Control.extend({ e.clientX = e.touches[0].clientX; } + if (window.ThisIsTheiOSApp && this._map._permission !== 'edit') + return; + this._map.rulerActive = true; var dragableElem = e.srcElement || e.target; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Scroll.js | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit 67793ef9ece4a44bccd7cd3ee739990511919a51 Author: Tor Lillqvist AuthorDate: Thu Nov 28 14:33:20 2019 +0200 Commit: Tor Lillqvist CommitDate: Thu Nov 28 14:00:58 2019 +0100 Improve ruler behaviour when panning by dragging on a touch device Fire the 'scrolloffset' event also in L.Control.Scroll._onUpdateScrollOffset(), which gets called when panning a text document on a touch device. There are still glitches in updating the ruler when one uses a pinch gesture to zoom the document. But usually after a short moment the ruler snaps into correct state. Change-Id: Ic8dd5139ff49f6fe7961096552f1c7e6cf35356c Reviewed-on: https://gerrit.libreoffice.org/83996 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index ab3fc47c6..563711761 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -239,16 +239,18 @@ L.Control.Scroll = L.Control.extend({ _onUpdateScrollOffset: function (e) { // used on window resize + // also when dragging + var offset = new L.Point(e.x - this._prevScrollX, e.y - this._prevScrollY); + if (offset.x === 0) { + offset.x = 1; + } + if (offset.y === 0) { + offset.y = 1; + } if (this._map._docLayer._docType === 'spreadsheet') { - var offset = new L.Point(e.x - this._prevScrollX, e.y - this._prevScrollY); - if (offset.x === 0) { - offset.x = 1; - } - if (offset.y === 0) { - offset.y = 1; - } this._onUpdateRowColumnHeaders({x: e.x, y: e.y, offset: offset}); } + this._map.fire('scrolloffset', offset); this._ignoreScroll = null; $('.scroll-container').mCustomScrollbar('stop'); this._prevScrollY = e.y; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Ruler.js | 59 ++--- 1 file changed, 49 insertions(+), 10 deletions(-) New commits: commit caf37fb293a666b0a82ac8bd31df35b18b45fc01 Author: Tor Lillqvist AuthorDate: Tue Nov 26 18:44:26 2019 +0200 Commit: Tor Lillqvist CommitDate: Tue Nov 26 18:30:09 2019 +0100 Make dragging the margin handles in the ruler work better in the iOS app Several changes: On iOS, use touch events instead of mouse ones. One difference between touch and mouse events is that the touchend event naturally does not carry any position information (as the finger has been lifted from the screen). So we need to keep track of where the last touchmove event happened separately in _lastPosition. Letting go of a margin handle after dragging it did not actually move the coresponding margin in the document. The fix for this was to catch the touchend event for the this._rFace element instead of for the this._map element. Once a margin had been moved, it could not be moved another time. The reason for this was that because the document initially is readonly, the this.options.interactive was set to false (see the L.control.ruler() call in loleaflet/src/map/Map.js) and never changed after that. This caused _updateBreakPoints() to pass {perm:'readonly'} in the call to this._changeInteractions(). The fix was to set this.options.interactive to true when turning on the interaction. In theory this same problem probably would happen also in web-based Online on "mobile" (i.e. phones), but we don't show the ruler there at all, so the sitaution where a document would be initially read-only and the ruler would show up doesn't happen. Change-Id: I0393704d02a2989b4ea3358dc4bee17e48c16ae6 Reviewed-on: https://gerrit.libreoffice.org/83807 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index a48dacb6f..7855ae11d 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -44,15 +44,28 @@ L.Control.Ruler = L.Control.extend({ this._lMarginDrag.style.cursor = 'e-resize'; this._rMarginDrag.style.cursor = 'w-resize'; - L.DomEvent.on(this._rMarginDrag, 'mousedown', this._initiateDrag, this); - L.DomEvent.on(this._lMarginDrag, 'mousedown', this._initiateDrag, this); + if (window.ThisIsTheiOSApp) { + this.options.interactive = true; + L.DomEvent.on(this._rMarginDrag, 'touchstart', this._initiateDrag, this); + L.DomEvent.on(this._lMarginDrag, 'touchstart', this._initiateDrag, this); + } + else { + L.DomEvent.on(this._rMarginDrag, 'mousedown', this._initiateDrag, this); + L.DomEvent.on(this._lMarginDrag, 'mousedown', this._initiateDrag, this); + } } else { this._lMarginDrag.style.cursor = 'default'; this._rMarginDrag.style.cursor = 'default'; - L.DomEvent.off(this._rMarginDrag, 'mousedown', this._initiateDrag, this); - L.DomEvent.off(this._lMarginDrag, 'mousedown', this._initiateDrag, this); + if (window.ThisIsTheiOSApp) { + L.DomEvent.off(this._rMarginDrag, 'touchstart', this._initiateDrag, this); + L.DomEvent.off(this._lMarginDrag, 'touchstart', this._initiateDrag, this); + } + else { + L.DomEvent.off(this._rMarginDrag, 'mousedown', this._initiateDrag, this); + L.DomEvent.off(this._lMarginDrag, 'mousedown', this._initiateDrag, this); + } } } }, @@ -176,12 +189,25 @@ L.Control.Ruler = L.Control.extend({ }, _initiateDrag: function(e) { + if (e.type === 'touchstart') { + if (e.touches.length !== 1) + return; + e.clientX = e.touches[0].clientX; + } + this._map.rulerActive = true; var dragableElem = e.srcElement || e.target; - L.DomEvent.on(this._rFace, 'mousemove', this._moveMargin, this); - L.DomEvent.on(this._map, 'mouseup', this._endDrag, this); +
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |9 + 1 file changed, 9 insertions(+) New commits: commit 8f14c4104eb163dd77365e079bd153c4aa1fc1e9 Author: Tor Lillqvist AuthorDate: Fri Nov 22 15:36:59 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Nov 22 15:48:07 2019 +0200 Avoid the ugly gap between the toolbar and ruler in the iOS app This is one of those "try different changes until you come up with something that seems to have the desired effect" type of commits. If somebody actually understands what is going on and knows the right way to fix the problem, feel free. Change-Id: I4aa2a6b3ca14d0d5fc7e329daf8850cd0ca524cb diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 7f3713bc1..0d5455d83 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -189,6 +189,15 @@ L.Map = L.Evented.extend({ if (((window.ThisIsTheiOSApp && window.mode.isTablet()) || !L.Browser.mobile) && this._docLayer._docType == 'text') { var interactiveRuler = this._permission === 'edit' ? true : false; L.control.ruler({position:'topleft', interactive:interactiveRuler}).addTo(this); + + // For some unclear reason there would be a 20px gap between the + // toolbar and the ruler in the iOS app on iPad. This is a very ugly + // workaround for that. Don't ask me why something called + // ".leaflet-top" in practice seems to have impact only on where the + // ruler is located. + if (window.ThisIsTheiOSApp) { + $('.leaflet-top').css('top', '-20px'); + } } }); this.on('updatetoolbarcommandvalues', function(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/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0868d19bb7598d45c86aae1bb66dfe5394926d5b Author: Tor Lillqvist AuthorDate: Fri Nov 22 13:26:51 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Nov 22 13:33:44 2019 +0200 Make the ruler show up in the iOS app on iPad Sadly there is a gap between the toolbar and the ruler on iPad (but not when running web-based Online from the same sources). Need to figure out what is going on there. Change-Id: I54b3f8470c1e91005633de26d6e8bb4edc39287a diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 8720f3c1e..7f3713bc1 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -186,7 +186,7 @@ L.Map = L.Evented.extend({ if (!this.initComplete) { this._fireInitComplete('doclayerinit'); } - if (!L.Browser.mobile && this._docLayer._docType == 'text') { + if (((window.ThisIsTheiOSApp && window.mode.isTablet()) || !L.Browser.mobile) && this._docLayer._docType == 'text') { var interactiveRuler = this._permission === 'edit' ? true : false; L.control.ruler({position:'topleft', interactive:interactiveRuler}).addTo(this); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.ContextToolbar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7c68a7eb401c820c05b136f82d072d8306cb43e4 Author: Tor Lillqvist AuthorDate: Thu Nov 21 12:04:08 2019 +0200 Commit: Tor Lillqvist CommitDate: Thu Nov 21 11:33:52 2019 +0100 tdf#128461: Don't trust the _internalCacheEmpty crack in the iOS app The loleaflet code has no idea whether there is anything on the system clipboard or not, so let's not try to be too clever. Change-Id: I7529e0dcb5d2034efd007494b1b364c60a6e9fc6 Reviewed-on: https://gerrit.libreoffice.org/83369 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.ContextToolbar.js b/loleaflet/src/control/Control.ContextToolbar.js index 1236906d3..0fcdae7e2 100644 --- a/loleaflet/src/control/Control.ContextToolbar.js +++ b/loleaflet/src/control/Control.ContextToolbar.js @@ -124,7 +124,7 @@ L.Control.ContextToolbar = L.Control.extend({ // check commands validity var validCommands = []; - if (this._map && this._map._docLayer._internalCacheEmpty) { + if (!window.ThisIsTheiOSApp && this._map && this._map._docLayer._internalCacheEmpty) { for (var k = 0; k < commands.length; ++k) { var cmd = commands[k]; if (cmd === 'Paste') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.MobileInput.js |9 + 1 file changed, 9 insertions(+) New commits: commit 538d4fceeecc97dcb2cd47da0ece259151cff298 Author: Tor Lillqvist AuthorDate: Fri Nov 8 12:51:02 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Nov 8 12:54:26 2019 +0100 tdf#128034: Add any modifiers to the UNO keycode also for mobile devices For non-mobile devices this is done in _onKeyDown() in L.Map.Keyboard. (In master the key handling has apparently been unified for mobile and non-mobile devices, which is good.) Change-Id: If96f0da762379593285dc90dc98e5eb9da7554f1 Reviewed-on: https://gerrit.libreoffice.org/82282 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js index b9db83cbb..49ede50d5 100644 --- a/loleaflet/src/control/Control.MobileInput.js +++ b/loleaflet/src/control/Control.MobileInput.js @@ -166,6 +166,15 @@ L.Control.MobileInput = L.Control.extend({ docLayer = this._map._docLayer, unoKeyCode = handler._toUNOKeyCode(keyCode); + if (e.shiftKey) + unoKeyCode |= handler.keyModifier.shift; + if (e.ctrlKey) + unoKeyCode |= handler.keyModifier.ctrl; + if (e.altKey) + unoKeyCode |= handler.keyModifier.alt; + if (e.metaKey) + unoKeyCode |= handler.keyModifier.ctrl; + this._keyHandled = this._keyHandled || false; // console.log('==> onKeyEvents: ' + e.type + ':' + e.key + ' keyCode=' + keyCode + ' charCode=' + charCode + ' unoKeyCode=' + unoKeyCode + ' _keyHandled=' + this._keyHandled + ' _isComposing=' + this._isComposing) if (this._isComposing) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.MobileInput.js |4 1 file changed, 4 insertions(+) New commits: commit e095d28146acc3f27d739b7143a9cdb5e4f3b479 Author: Tor Lillqvist AuthorDate: Fri Nov 8 11:30:12 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Nov 8 11:08:05 2019 +0100 tdf#128506: Call preventDefault() for the Tab key (from a hardware keyboard) Otherwise the focus of keyboard input will move to some weird location. Do it only in the iOS app case for fear of breaking something on other platforms. Change-Id: Idd78863fcb4afafbe4e1a648e907631d17ffc34c Reviewed-on: https://gerrit.libreoffice.org/82274 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js index 07ab7b520..b9db83cbb 100644 --- a/loleaflet/src/control/Control.MobileInput.js +++ b/loleaflet/src/control/Control.MobileInput.js @@ -268,6 +268,10 @@ L.Control.MobileInput = L.Control.extend({ this._keyHandled = true; // console.log('_keyHandled := true'); } + if (window.ThisIsTheiOSApp && e.key === 'Tab') { + // We don't want Tab to move focus + L.DomEvent.preventDefault(e); + } L.DomEvent.stopPropagation(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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 392cd69d5e4232de684dd3c050c8f95bf766b71a Author: Tor Lillqvist AuthorDate: Wed Oct 16 15:19:20 2019 +0300 Commit: Tor Lillqvist CommitDate: Wed Oct 16 14:46:23 2019 +0200 tdf#128177: Drop the 'Bibliography Entry...' menu entry in a mobile app Invoking it would cause a crash thanks to the intentional std::abort() call in SalUserEventList::DispatchUserEvents() after the warning "Uncaught com.sun.star.uno.DeploymentException component context fails to supply service com.sun.star.frame.Bibliography of type com.sun.star.container.XNameAccess". We don't build the library ("bib") and UNO component in question for non-desktop platforms, and the customer is fine with just leaving out the menu entry. Change-Id: I2c1b0978a87d169e6cebc9462f79b5b47df4992b Reviewed-on: https://gerrit.libreoffice.org/80889 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 7702d2043..a66ffd891 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -113,7 +113,7 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:InsertRLM'}]}, {name: _UNO('.uno:IndexesMenu', 'text'), type: 'menu', menu: [ {uno: '.uno:InsertIndexesEntry'}, - {uno: '.uno:InsertAuthoritiesEntry'}, + {uno: '.uno:InsertAuthoritiesEntry', mobileapp: false}, {uno: '.uno:InsertMultiIndex'}]}, ]}, {name: _UNO('.uno:FormatMenu', 'text'), 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |1 - 1 file changed, 1 deletion(-) New commits: commit 4a491ff658313a655646409a35e378db625ed637 Author: Tomaž Vajngerl AuthorDate: Wed Oct 9 19:38:23 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Oct 9 19:38:23 2019 +0200 remove the separator before sidebar menu entry There is no separator in master so remove it here too.. Change-Id: Iea84270b023904091ac3a0b02dfed83b6895ab80 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 3c721b84f..7702d2043 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -283,7 +283,6 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, {uno: '.uno:Sidebar', mobile: false}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 14853910a1ea94566f440f2eb568b980371634f2 Author: Tomaž Vajngerl AuthorDate: Wed Oct 9 12:59:38 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Oct 9 13:47:36 2019 +0200 disable sidebar menu entry for mobile Change-Id: Ifaddc05ad837de7f62709bad967e5d6dd8afbc81 Reviewed-on: https://gerrit.libreoffice.org/80541 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index eb7818c20..3c721b84f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -284,7 +284,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, {type: 'separator'}, - {uno: '.uno:Sidebar'}] + {uno: '.uno:Sidebar', mobile: false}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit c4db2a712e5169b283148d1e60363ea3eab0645d Author: Tomaž Vajngerl AuthorDate: Wed Oct 9 09:40:04 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Oct 9 12:46:55 2019 +0200 Add sidebar to the impress menu Change-Id: Ie94c64c6fad75e1473c50e2a0ee15063bdf75ac3 Reviewed-on: https://gerrit.libreoffice.org/80516 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index dc77afce7..eb7818c20 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -282,7 +282,9 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator', mobileapp: false}, {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}] + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + {type: 'separator'}, + {uno: '.uno:Sidebar'}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |8 1 file changed, 8 insertions(+) New commits: commit 71be6ce1ac3533df4cd04b8c01beef89888d5809 Author: Tor Lillqvist AuthorDate: Fri Oct 4 15:43:17 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Oct 4 15:22:06 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 Reviewed-by: Tor Lillqvist 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'; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/handler/Map.TouchGesture.js | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) New commits: commit 915dd86b97114c2cbbcd6b2b9b91537fd328cc3a Author: Marco Cecchetti AuthorDate: Thu Oct 3 14:24:08 2019 +0200 Commit: Marco Cecchetti CommitDate: Thu Oct 3 14:25:41 2019 +0200 loleaflet: tdf#127671 - follow up Better be sure that the toolbar exists. Reported problem: no scroll in an empty spreadsheet. Change-Id: If2cc3b540bde1558d5839082552499f185586ed7 Reviewed-on: https://gerrit.libreoffice.org/80127 Reviewed-by: Marco Cecchetti Tested-by: Marco Cecchetti diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index 5d143f3f4..b94e05330 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -303,8 +303,10 @@ L.Map.TouchGesture = L.Handler.extend({ mousePos = this._map._docLayer._latLngToTwips(latlng); if (window.ThisIsTheiOSApp) { - this._toolbar.remove(); - this._toolbarAdded = null; + if (this._toolbarAdded) { + this._toolbar.remove(); + this._toolbarAdded = null; + } } this._map._contextMenu._onMouseDown({originalEvent: e.srcEvent}); this._map._docLayer._postMouseEvent('buttondown', mousePos.x, mousePos.y, 1, 1, 0); @@ -385,7 +387,8 @@ L.Map.TouchGesture = L.Handler.extend({ mousePos = this._map._docLayer._latLngToTwips(latlng); if (window.ThisIsTheiOSApp) { - this._toolbar.hide(); + if (this._toolbar.isVisible()) + this._toolbar.hide(); } var originalCellCursor = this._map._docLayer._cellCursor; @@ -487,7 +490,8 @@ L.Map.TouchGesture = L.Handler.extend({ this._pinchStartCenter = {x: e.center.x, y: e.center.y}; } if (window.ThisIsTheiOSApp) { - this._toolbar.hide(); + if (this._toolbar.isVisible()) + this._toolbar.hide(); } }, @@ -532,7 +536,8 @@ L.Map.TouchGesture = L.Handler.extend({ }, _onInputDragStartiOSOnly: function () { - this._toolbar.hide(); + if (this._toolbar.isVisible()) + this._toolbar.hide(); // not set this._toolbarAdded to null it's checked on drag end }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) New commits: commit c7bfc05dcb1c475c1bf9a70d39732790793380d9 Author: Tor Lillqvist AuthorDate: Tue Oct 1 16:34:17 2019 +0300 Commit: Tor Lillqvist CommitDate: Tue Oct 1 16:19:01 2019 +0200 tdf#127669: Add more export formats for mobile apps The same formats are offered as for "Download as" in web-based Online. But in the apps, the menu entry is called "Export as", not "Download as", because the document is not being edited on some server from which it would be downloaded. Change-Id: I5b1bfc3300bae2c213812c2534ae6b583423662c Reviewed-on: https://gerrit.libreoffice.org/79964 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 984585dde..dc77afce7 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -27,7 +27,12 @@ L.Control.Menubar = L.Control.extend({ {name: _('Word 2003 Document (.doc)'), id: 'downloadas-doc', type: 'action'}, {name: _('Word Document (.docx)'), id: 'downloadas-docx', type: 'action'}, {name: _('Rich Text (.rtf)'), id: 'downloadas-rtf', type: 'action'}]}, - {name: _('Save as PDF'), id: 'downloadas-pdf', mobileapp: true, type: 'action'}, + {name: _('Export as'), id: 'downloadas', type: 'menu', mobileapp: true, menu: [ + {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('ODF text document (.odt)'), id: 'downloadas-odt', type: 'action'}, + {name: _('Word 2003 Document (.doc)'), id: 'downloadas-doc', type: 'action'}, + {name: _('Word Document (.docx)'), id: 'downloadas-docx', type: 'action'}, + {name: _('Rich Text (.rtf)'), id: 'downloadas-rtf', type: 'action'}]}, {name: _('Sign document'), id: 'signdocument', type: 'action'}, {type: 'separator'}, {name: _('Close document'), id: 'closedocument', type: 'action'} @@ -252,7 +257,11 @@ L.Control.Menubar = L.Control.extend({ {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'}, {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'}, {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action'}]}, - {name: _('Save as PDF'), id: 'downloadas-pdf', mobileapp: true, type: 'action'}, + {name: _('Export as'), id: 'downloadas', type: 'menu', mobileapp: true, menu: [ + {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'}, + {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'}, + {name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action'}]}, {type: 'separator'}, {name: _('Close document'), id: 'closedocument', type: 'action'} ]}, @@ -342,7 +351,11 @@ L.Control.Menubar = L.Control.extend({ {name: _('ODF spreadsheet (.ods)'), id: 'downloadas-ods', type: 'action'}, {name: _('Excel 2003 Spreadsheet (.xls)'), id: 'downloadas-xls', type: 'action'}, {name: _('Excel Spreadsheet (.xlsx)'), id: 'downloadas-xlsx', type: 'action'}]}, - {name: _('Save as PDF'), id: 'downloadas-pdf', mobileapp: true, type: 'action'}, + {name: _('Export as'), id:'downloadas', type: 'menu', mobileapp: true, menu: [ + {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('ODF spreadsheet (.ods)'), id: 'downloadas-ods', type: 'action'}, + {name: _('Excel 2003 Spreadsheet (.xls)'), id: 'downloadas-xls', type: 'action'}, + {name: _('Excel Spreadsheet (.xlsx)'), id: 'downloadas-xlsx', type: 'action'}]}, {type: 'separator'},
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a165c2053dd47c0fbe1cbb86202e281072df7710 Author: Tor Lillqvist AuthorDate: Tue Oct 1 12:07:08 2019 +0300 Commit: Tor Lillqvist CommitDate: Tue Oct 1 12:41:11 2019 +0200 Revert "tdf#126972: The "file icon" button in the menubar is useless..." This reverts commit c5d6c7dd402da6987cd01f3c0759b28b3503d85c. We do want the logo to be there. Change-Id: I2378271e54cbe0763ad41c56b23c1b97a6d2a8ae Reviewed-on: https://gerrit.libreoffice.org/79950 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index e3af7e8fa..e205d794c 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -568,7 +568,7 @@ L.Control.Menubar = L.Control.extend({ }); $('#main-menu').attr('tabindex', 0); - if (!window.ThisIsTheiOSApp && this._map._permission !== 'readonly') { + if (this._map._permission !== 'readonly') { this._createFileIcon(); } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit a0c669d2ab3680c872552d890868dd74499ac92e Author: Tor Lillqvist AuthorDate: Tue Oct 1 13:33:02 2019 +0300 Commit: Tor Lillqvist CommitDate: Tue Oct 1 12:41:32 2019 +0200 Show the logo also before the 'make-editable' button is clicked in the iOS app Change-Id: I69e3a8bfa467de295a23816aa2d0c43ec2aaf61a Reviewed-on: https://gerrit.libreoffice.org/79951 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index e205d794c..984585dde 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -568,7 +568,9 @@ L.Control.Menubar = L.Control.extend({ }); $('#main-menu').attr('tabindex', 0); - if (this._map._permission !== 'readonly') { + // The _createFileIcon function shows the Collabora logo in the iOS app case, no + // need to delay that until the document has been made editable. + if (window.ThisIsTheiOSApp || this._map._permission !== 'readonly') { this._createFileIcon(); } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |1 + 1 file changed, 1 insertion(+) New commits: commit ce18e7b50a3498dc26b032605529d0f5922ca37e Author: Jan Holesovsky AuthorDate: Mon May 27 16:00:23 2019 +0200 Commit: Szymon Kłos CommitDate: Mon May 27 18:27:46 2019 +0200 Enable the Share and Print buttons even in the View mode. The user should be able to access these even in the initial View mode on Android. Change-Id: Id0631b7560c1ed0fda5f228f0c621cfa989b4cf7 Reviewed-on: https://gerrit.libreoffice.org/73039 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 35e0e1d97..02c44ad97 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -437,6 +437,7 @@ L.Control.Menubar = L.Control.extend({ allowedReadonlyMenus: ['file', 'downloadas', 'view', 'help'], allowedViewModeActions: [ + 'shareas', 'print', // file menu 'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 'downloadas-docx', 'downloadas-rtf', // file menu 'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 'print', // file menu 'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', 'closedocument', // file 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/collabora-online-4' - loleaflet/src
loleaflet/src/core/Socket.js | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) New commits: commit 1288286d453c0df2b82f0a8b7cc16f5b2d66cb13 Author: merttumer AuthorDate: Mon May 27 17:11:34 2019 +0300 Commit: merttumer CommitDate: Mon May 27 17:38:15 2019 +0300 Send postMessage after renaming the document Change-Id: Iee0854260fc0fab4de3e2a4fae54716009535b37 Signed-off-by: merttumer diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 56402e4d5..b48338420 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -742,13 +742,16 @@ L.Socket = L.Class.extend({ this._map.options.wopiSrc = encodeURIComponent(docUrl); this._map.loadDocument(); this._map.sendInitUNOCommands(); - - this._map.fire('postMessage', { - msgId: 'File_Rename', - args: { - NewName: command.filename - } - }); + + if (textMsg.startsWith('renamefile:')) { + this._map.fire('postMessage', { + msgId: 'File_Rename', + args: { + NewName: command.filename + } + }); + } + } // var name = command.name; - ignored, we get the new name via the wopi's BaseFileName } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/core/Socket.js | 10 ++ 1 file changed, 10 insertions(+) New commits: commit f426e36f69759d8bded61a62f1fcc3e0f4c0bb8c Author: merttumer AuthorDate: Mon May 27 17:11:34 2019 +0300 Commit: merttumer CommitDate: Mon May 27 17:11:34 2019 +0300 Send postMessage after renaming the document Change-Id: Iee0854260fc0fab4de3e2a4fae54716009535b37 Signed-off-by: merttumer diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 06fa5eb47..56402e4d5 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -742,6 +742,13 @@ L.Socket = L.Class.extend({ this._map.options.wopiSrc = encodeURIComponent(docUrl); this._map.loadDocument(); this._map.sendInitUNOCommands(); + + this._map.fire('postMessage', { + msgId: 'File_Rename', + args: { + NewName: command.filename + } + }); } // var name = command.name; - ignored, we get the new name via the wopi's BaseFileName } @@ -988,6 +995,9 @@ L.Socket = L.Class.extend({ else if (tokens[i].substring(0, 5) === 'name=') { command.name = tokens[i].substring(5); } + else if (tokens[i].substring(0, 9) === 'filename=') { + command.filename = tokens[i].substring(9); + } else if (tokens[i].substring(0, 5) === 'port=') { command.port = tokens[i].substring(5); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) New commits: commit b178d09ade88e913dac7a026e39d3a27b113e41a Author: Tor Lillqvist AuthorDate: Fri May 24 09:38:20 2019 +0300 Commit: Jan Holesovsky CommitDate: Fri May 24 09:13:49 2019 +0200 tdf#124752: Do post the UNO clipboard commands in a mobile app No reason to show the warn-copy-paste message in a mobile app. The native code of the app has access to the system clipboard just fine. This does not at such make the Edit>Copy etc menu entries work in the iOS app (the LibreOffice core code does not yet have system clipboard functionality for iOS, I am working on that), but this is one necessary step. This is a bit complicated, I don't like how the 'mobileappuno' properties have to be "manually" propagated from one data structure to another in the _createMenu function, but OTOH it's the same for the 'id' properties. Change-Id: I0ebe964e6eb6e4a902118714c1779451004c751f Reviewed-on: https://gerrit.libreoffice.org/72888 Reviewed-by: Tor Lillqvist Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index a8c3dd50f..35e0e1d97 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -36,9 +36,9 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:Redo'}, {name: _('Repair'), id: 'repair', type: 'action'}, {type: 'separator'}, - {name: _UNO('.uno:Cut'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Copy'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Paste'), id: 'warn-copy-paste', type: 'action'}, + {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'}, @@ -255,9 +255,9 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:Redo'}, {name: _('Repair'), id: 'repair', type: 'action'}, {type: 'separator'}, - {name: _UNO('.uno:Cut'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Copy'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Paste'), id: 'warn-copy-paste', type: 'action'}, + {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'} @@ -343,9 +343,9 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:Redo'}, {name: _('Repair'), id: 'repair', type: 'action'}, {type: 'separator'}, - {name: _UNO('.uno:Cut'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Copy'), id: 'warn-copy-paste', type: 'action'}, - {name: _UNO('.uno:Paste'), id: 'warn-copy-paste', type: 'action'}, + {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'} @@ -793,7 +793,7 @@ L.Control.Menubar = L.Control.extend({ this._map.remove(); } else if (id === 'repair') { this._map._socket.sendMessage('commandvalues
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 79468654f54358c77ee8240053cccdd69fc055b3 Author: Florin Ciornei AuthorDate: Thu May 23 13:46:22 2019 +0200 Commit: Michael Meeks CommitDate: Thu May 23 17:13:48 2019 +0200 Set focus on document after closing copy/paste/cut warning. Change-Id: I4e241278bea441f77e6b7780d69e540f9e6d4771 Reviewed-on: https://gerrit.libreoffice.org/72838 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index d4379c20a..a8c3dd50f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -794,7 +794,14 @@ L.Control.Menubar = L.Control.extend({ } else if (id === 'repair') { this._map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); } else if (id === 'warn-copy-paste') { - vex.dialog.alert(_('Your browser has very limited access to the clipboard, so use these keyboard shortcuts:Ctrl+C: For copying.Ctrl+X: For cutting.Ctrl+V: For pasting.')); + var self = this; + vex.dialog.alert({ + message: _('Your browser has very limited access to the clipboard, so use these keyboard shortcuts:Ctrl+C: For copying.Ctrl+X: For cutting.Ctrl+V: For pasting.'), + callback: function () { + self._map.focus(); + } + }); + } // Inform the host if asked if ($(item).data('postmessage') === '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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit 4bf256d4cb1d3c711a82d33aeedad9ca0d31fa70 Author: Szymon Kłos AuthorDate: Mon May 20 16:55:02 2019 +0200 Commit: Szymon Kłos CommitDate: Thu May 23 15:19:44 2019 +0200 Constraints for dialogs moving Change-Id: If489126659684cd99f2a153135cb2c05b9312c02 Reviewed-on: https://gerrit.libreoffice.org/72844 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 3ecb68773..d2907f5b9 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -58,9 +58,19 @@ L.Control.LokDialog = L.Control.extend({ var target = findZoomTarget(id); if (target) { + var newX = target.initialState.startX + ev.deltaX; + var newY = target.initialState.startY + ev.deltaY; + + // Don't allow to put dialog outside the view + if (window.mode.isDesktop() && + (newX < -target.width/2 || newY < -target.height/2 + || newX > window.innerWidth - target.width/2 + || newY > window.innerHeight - target.height/2)) + return; + target.transformation.translate = { - x: target.initialState.startX + ev.deltaX, - y: target.initialState.startY + ev.deltaY + x: newX, + y: newY }; updateTransformation(target); @@ -666,7 +676,7 @@ L.Control.LokDialog = L.Control.extend({ removeZoomTarget(targetId); } - zoomTargets.push({key: targetId, value: zoomTarget, transformation: transformation, initialState: state}); + zoomTargets.push({key: targetId, value: zoomTarget, transformation: transformation, initialState: state, width:width, height: height}); var hammerAll = new Hammer(canvas); hammerAll.add(new Hammer.Pan({ threshold: 0, pointers: 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 32 + 1 file changed, 15 insertions(+), 17 deletions(-) New commits: commit c3ffb4562f0912655464d9996c157af9d2f72ccf Author: Szymon Kłos AuthorDate: Mon May 20 15:31:53 2019 +0200 Commit: Szymon Kłos CommitDate: Thu May 23 15:19:16 2019 +0200 Allow to use pan gesture on desktop Change-Id: Ifbc6102407add31f63b1be0173c5c8eeb3e8e2db Reviewed-on: https://gerrit.libreoffice.org/72843 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index b1ea6b54e..3ecb68773 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -668,24 +668,22 @@ L.Control.LokDialog = L.Control.extend({ zoomTargets.push({key: targetId, value: zoomTarget, transformation: transformation, initialState: state}); - if (window.mode.isMobile() || window.mode.isTablet()) { - var hammerAll = new Hammer(canvas); - hammerAll.add(new Hammer.Pan({ threshold: 0, pointers: 0 })); - hammerAll.add(new Hammer.Pinch({ threshold: 0 })).recognizeWith([hammerAll.get('pan')]); - - hammerAll.on('panstart panmove', this.onPan); - hammerAll.on('pinchstart pinchmove', this.onPinch); - hammerAll.on('hammer.input', function(ev) { - if (ev.isFinal) { - var id = toZoomTargetId(ev.target.id); - var target = findZoomTarget(id); - if (target) { - target.initialState.startX = target.transformation.translate.x; - target.initialState.startY = target.transformation.translate.y; - } + var hammerAll = new Hammer(canvas); + hammerAll.add(new Hammer.Pan({ threshold: 0, pointers: 0 })); + hammerAll.add(new Hammer.Pinch({ threshold: 0 })).recognizeWith([hammerAll.get('pan')]); + + hammerAll.on('panstart panmove', this.onPan); + hammerAll.on('pinchstart pinchmove', this.onPinch); + hammerAll.on('hammer.input', function(ev) { + if (ev.isFinal) { + var id = toZoomTargetId(ev.target.id); + var target = findZoomTarget(id); + if (target) { + target.initialState.startX = target.transformation.translate.x; + target.initialState.startY = target.transformation.translate.y; } - }); - } + } + }); updateTransformation(findZoomTarget(targetId)); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 436ebf7465221eeb7d2c0326722f358651b8e66b Author: Aron Budea AuthorDate: Thu May 23 02:50:24 2019 +0200 Commit: Aron Budea CommitDate: Thu May 23 14:04:15 2019 +0200 Display correct shortcut for paste After aa1d9ce19644fd55f18635f0784225cb0bedb6e3 Change-Id: Iba5a5dc2421c2eaf5ff217d825eac70da2fb1e0c Reviewed-on: https://gerrit.libreoffice.org/72813 Reviewed-by: Michael Meeks Tested-by: Michael Meeks (cherry picked from commit 577d4a50a2b19193b5eeb419ccaa3786294c5f8a) Reviewed-on: https://gerrit.libreoffice.org/72839 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index e739715a9..d4379c20a 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -794,7 +794,7 @@ L.Control.Menubar = L.Control.extend({ } else if (id === 'repair') { this._map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); } else if (id === 'warn-copy-paste') { - vex.dialog.alert(_('Your browser has very limited access to the clipboard, so use these keyboard shortcuts:Ctrl+C: For copying.Ctrl+X: For cutting.Ctrl+P: For pasting.')); + vex.dialog.alert(_('Your browser has very limited access to the clipboard, so use these keyboard shortcuts:Ctrl+C: For copying.Ctrl+X: For cutting.Ctrl+V: For pasting.')); } // Inform the host if asked if ($(item).data('postmessage') === '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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.MobileInput.js | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) New commits: commit 10ff9c1a65a7e333d3aa6f2811d1480fa53fe75e Author: Tor Lillqvist AuthorDate: Tue May 21 15:57:36 2019 +0300 Commit: Tor Lillqvist CommitDate: Tue May 21 15:58:49 2019 +0300 tdf#125410: Handle pasting of text/plain strings into the iOS app Also, initialise this._keyHandled as true in L.Control.MobileInput, as that is the value it has between key event sequences, so presumably it should be so before the first key is hit, too. Change-Id: Ie67e9fcdd14871e76f9d9487c14f03ae54476e60 diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js index ea3bccbb7..e893a54ee 100644 --- a/loleaflet/src/control/Control.MobileInput.js +++ b/loleaflet/src/control/Control.MobileInput.js @@ -21,6 +21,11 @@ L.Control.MobileInput = L.Control.extend({ this._currentKeysDown = {}; this._ignoreKeypress = false; this._isMobileSafariOriOSApp = window.ThisIsTheiOSApp || navigator.platform === 'iPad' || navigator.platform === 'iPhone'; + + // The value of _keyHandled after a complete input sequence of a plain character, + // before the next character input, is true, so surely it should then be true from + // the start, before the first character input? + this._keyHandled = true; }, onAdd: function () { @@ -105,6 +110,7 @@ L.Control.MobileInput = L.Control.extend({ L.DomEvent.on(this._textArea, stopEvents, L.DomEvent.stopPropagation) .on(this._textArea, 'keydown keypress keyup', this.onKeyEvents, this) .on(this._textArea, 'textInput', this.onTextInput, this) + .on(this._textArea, 'paste', this.onPaste, this) .on(this._textArea, 'focus', this.onGotFocus, this) .on(this._textArea, 'blur', this.onLostFocus, this); if (!this._isMobileSafariOriOSApp) @@ -241,7 +247,7 @@ L.Control.MobileInput = L.Control.extend({ }, onTextInput: function (e) { - // console.log('==> onTextInput: _keyHandled=' + this._keyHandled); + // console.log('==> onTextInput: "' + e.data + '" _keyHandled=' + this._keyHandled); if (!this._keyHandled) { this._textData = e.data; this._textArea.value = ''; @@ -250,6 +256,23 @@ L.Control.MobileInput = L.Control.extend({ L.DomEvent.stopPropagation(e); }, + onPaste: function (e) { + var i; + for (i = 0; i < e.clipboardData.items.length; ++i) { + if (e.clipboardData.items[i].kind === 'string' && e.clipboardData.items[i].type === 'text/plain') { + var map = this._map; + e.clipboardData.items[i].getAsString(function (s) { + var k; + for (k = 0; k < s.length; ++k) { + map._docLayer._postKeyboardEvent('input', s[k].charCodeAt(), 0); + map._docLayer._postKeyboardEvent('up', s[k].charCodeAt(), 0); + } + }); + break; + } + } + }, + onInput: function (e) { // console.log('==> onInput: inputType=' + e.inputType); var backSpace = this._map.keyboard._toUNOKeyCode(8); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.ContextMenu.js | 18 +- loleaflet/src/control/Control.Menubar.js | 20 +++- 2 files changed, 12 insertions(+), 26 deletions(-) New commits: commit e98f71d9acc3d4aa2a5ca07c4fa1160dc8ca1797 Author: Jan Holesovsky AuthorDate: Mon May 20 18:50:41 2019 +0200 Commit: Andras Timar CommitDate: Mon May 20 21:50:11 2019 +0200 The Internal Copy / Internal Cut / Internal Paste is just confusing. Every user so far is confused of the existence of two clipboards - the system one, and the Online internal one. We are able to detect that the copy / paste is happening inside the document and perform the "internal copy / paste" accordingly, so let's do what the other online office suites do, and just warn when the user tries to access copy / paste from the menu. Change-Id: I904fc120fcf65b8ad4ba8fb5178803f976d707f4 Reviewed-on: https://gerrit.libreoffice.org/72613 Reviewed-by: Michael Meeks Tested-by: Andras Timar diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index 08eec4031..0bc64c95f 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -20,8 +20,7 @@ L.Control.ContextMenu = L.Control.extend({ * in following list is just for reference and ease of locating uno command * from context menu structure. */ - general: ['Cut', 'Copy', 'Paste', 'PasteSpecialMenu', 'PasteUnformatted', - 'NumberingStart', 'ContinueNumbering', 'IncrementLevel', 'DecrementLevel', + general: ['NumberingStart', 'ContinueNumbering', 'IncrementLevel', 'DecrementLevel', 'OpenHyperlinkOnCursor', 'CopyHyperlinkLocation', 'RemoveHyperlink', 'AnchorMenu', 'SetAnchorToPage', 'SetAnchorToPara', 'SetAnchorAtChar', 'SetAnchorToChar', 'SetAnchorToFrame', @@ -126,18 +125,6 @@ L.Control.ContextMenu = L.Control.extend({ // Get the translated text associated with the command itemName = _UNO(item.command, docType, true); - switch (commandName) { - case 'Cut': - itemName = _('Internal Cut'); - break; - case 'Copy': - itemName = _('Internal Copy'); - break; - case 'Paste': - itemName = _('Internal Paste'); - break; - } - contextMenu[item.command] = { name: _(itemName) }; @@ -155,9 +142,6 @@ L.Control.ContextMenu = L.Control.extend({ isLastItemText = true; } else if (item.type === 'menu') { itemName = item.text; - if (itemName.replace('~', '') === 'Paste Special') { - itemName = _('Internal Paste Special'); - } var submenu = this._createContextMenuStructure(item); // ignore submenus with all items disabled if (Object.keys(submenu).length === 0) { diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 53febfd85..e739715a9 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -36,9 +36,9 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:Redo'}, {name: _('Repair'), id: 'repair', type: 'action'}, {type: 'separator'}, - {uno: '.uno:Cut'}, - {uno: '.uno:Copy'}, - {uno: '.uno:Paste'}, + {name: _UNO('.uno:Cut'), id: 'warn-copy-paste', type: 'action'}, + {name: _UNO('.uno:Copy'), id: 'warn-copy-paste', type: 'action'}, + {name: _UNO('.uno:Paste'), id: 'warn-copy-paste', type: 'action'}, {uno: '.uno:SelectAll'}, {type: 'separator'}, {uno: '.uno:SearchDialog'}, @@ -255,9 +255,9 @@ L.Control.Menubar = L.Control.extend({
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.MobileInput.js | 52 +-- loleaflet/src/layer/tile/TileLayer.js|2 + 2 files changed, 51 insertions(+), 3 deletions(-) New commits: commit 705c2f49cba0da652b88be590e48d2938cdfee0c Author: Tor Lillqvist AuthorDate: Fri May 17 17:06:08 2019 +0300 Commit: Tor Lillqvist CommitDate: Mon May 20 11:10:39 2019 +0300 tdf#124906: Hack for dead keys in iOS app and iOS Safari against Online Handle key events fairly separately for the iOS app and Mobile Safari than for other mobile platforms. Use the key property of the keypress event and avoid looking at the keyCode property of keyboard events. There is still one problem left: After typing the dead key, it is not displayed temporarily "waiting" for the following letter, as it should. But that didn't work before either in the iOS app, as far as I see. Change-Id: I9df174ba294f855697df59dd016b39cd1b3d905b diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js index d1f65b240..ea3bccbb7 100644 --- a/loleaflet/src/control/Control.MobileInput.js +++ b/loleaflet/src/control/Control.MobileInput.js @@ -18,6 +18,9 @@ L.Control.MobileInput = L.Control.extend({ }); this._cursorHandler.on('dragend', this.onDragEnd, this); + this._currentKeysDown = {}; + this._ignoreKeypress = false; + this._isMobileSafariOriOSApp = window.ThisIsTheiOSApp || navigator.platform === 'iPad' || navigator.platform === 'iPhone'; }, onAdd: function () { @@ -101,11 +104,12 @@ L.Control.MobileInput = L.Control.extend({ this._textArea.setAttribute('spellcheck', 'false'); L.DomEvent.on(this._textArea, stopEvents, L.DomEvent.stopPropagation) .on(this._textArea, 'keydown keypress keyup', this.onKeyEvents, this) - .on(this._textArea, 'compositionstart compositionupdate compositionend', this.onCompEvents, this) .on(this._textArea, 'textInput', this.onTextInput, this) - .on(this._textArea, 'input', this.onInput, this) .on(this._textArea, 'focus', this.onGotFocus, this) .on(this._textArea, 'blur', this.onLostFocus, this); + if (!this._isMobileSafariOriOSApp) + L.DomEvent.on(this._textArea, 'compositionstart compositionupdate compositionend', this.onCompEvents, this) + .on(this._textArea, 'input', this.onInput, this); }, _getSurrogatePair: function(codePoint) { @@ -122,6 +126,7 @@ L.Control.MobileInput = L.Control.extend({ unoKeyCode = handler._toUNOKeyCode(keyCode); this._keyHandled = this._keyHandled || false; + // console.log('==> onKeyEvents: ' + e.type + ':' + e.key + ' keyCode=' + keyCode + ' charCode=' + charCode + ' unoKeyCode=' + unoKeyCode + ' _keyHandled=' + this._keyHandled + ' _isComposing=' + this._isComposing) if (this._isComposing) { if (keyCode === 229 && charCode === 0) { return; @@ -139,12 +144,42 @@ L.Control.MobileInput = L.Control.extend({ // key ignored } else if (e.type === 'keydown') { + if (this._isMobileSafariOriOSApp) { + if (!this._currentKeysDown[e.key]) + this._currentKeysDown[e.key] = 1; + else + this._currentKeysDown[e.key]++; + if (this._currentKeysDown[e.key] > 1) + this._ignoreKeypress = true; + } this._keyHandled = false; + // console.log('_keyHandled := false'); if (handler.handleOnKeyDownKeys[keyCode] && charCode === 0) { docLayer._postKeyboardEvent('input', charCode, unoKeyCode); this._lastInput = unoKeyCode; } } + else if (this._isMobileSafariOriOSApp && +e.type === 'keypress') { + if (!this._ignoreKeypress) { + // e.key can be longer than one, for instance if you press a dead diacritic + // key followed by a letter that it can't combine with, like ¨ t => '¨t'. + // But e.key is longer than one also in the case of control keys where for + // instance e.key == 'Enter'. Detect the latter by comparing e.key against + // e.code. +
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 2998ab914e057d5c9bae3e3b03c0cf5f13e531b9 Author: Jan Holesovsky AuthorDate: Fri May 17 13:42:00 2019 +0200 Commit: Michael Meeks CommitDate: Fri May 17 14:07:57 2019 +0200 Prefer HTML over RTF for pasting on the Mac. Safari provides RTF clipboard content which doesn't contain the images. We do not know where the content comes from, so let's always prefer HTML over RTF on Mac. Change-Id: I2f449ff4cf025e5f51dbe6e0683667f2d319ac21 Reviewed-on: https://gerrit.libreoffice.org/72461 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 9136da41c..15e8acdbb 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -2503,6 +2503,16 @@ L.TileLayer = L.GridLayer.extend({ ['text/plain', 'text/plain;charset=utf-8'], ['Text', 'text/plain;charset=utf-8'] ]; + } else if (navigator.platform.startsWith('Mac')) { + // Safari provides RTF clipboard content which doesn't contain the + // images. We do not know where the content comes from, so let's + // always prefer HTML over RTF on Mac. + mimeTypes = [ + ['text/html', 'text/html'], + ['text/rtf', 'text/rtf'], + ['text/plain', 'text/plain;charset=utf-8'], + ['Text', 'text/plain;charset=utf-8'] + ]; } else { mimeTypes = [ ['text/rtf', 'text/rtf'], ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 ++ loleaflet/src/unocommands.js |1 + 2 files changed, 3 insertions(+) New commits: commit e66d810cb147874a2bba55ee7bcfe8af5d503d7f Author: Miklos Vajna AuthorDate: Tue May 14 13:53:55 2019 +0200 Commit: Michael Meeks CommitDate: Tue May 14 15:00:44 2019 +0200 Revert "loleaflet: disable Watermarking dialog" This reverts commit e1b8692c7d32c51b1c3e9824b3ece1966851dc49. This commit was distro/collabora/collabora-online-4-only and now that the root cause is fixed in core.git 93abdf39b01bb7b404dc09ef37369a4350fb0d10 (sw lok: assume no windows in SwLayoutFrame::PaintSwFrame(), 2019-05-14), it is no longer necessary. Change-Id: I65eb222e68fa5769513cffd50a9210e95d44a5c7 Reviewed-on: https://gerrit.libreoffice.org/72286 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 676cf8047..53febfd85 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -185,6 +185,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:PageDialog'}, {uno: '.uno:EditRegion'}, {type: 'separator'}, + {uno: '.uno:Watermark'}, + {type: 'separator'}, {uno: '.uno:FormatColumns'}, {type: 'separator'}, {uno: '.uno:ResetAttributes'} diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index ebbce32de..7a0ad5f65 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -255,6 +255,7 @@ var unoCommandsArray = { UpdateCurIndex:{text:{context:_('Update index'),menu:_('Current ~Index'),},}, Validation:{spreadsheet:{menu:_('~Validity...'),},}, ViewMenu:{global:{menu:_('~View'),},}, + Watermark:{text:{menu:_('Watermark...'),},}, WordCountDialog:{text:{menu:_('~Word Count'),},}, WrapAnchorOnly:{text:{menu:_('~First Paragraph'),},}, WrapContour:{text:{menu:_('~Contour'),},}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 24 1 file changed, 24 insertions(+) New commits: commit 52bfff983e49043c03bdef5f64131171e1bb3f93 Author: Henry Castro AuthorDate: Thu Apr 18 18:26:33 2019 -0400 Commit: Jan Holesovsky CommitDate: Mon May 6 10:15:07 2019 +0200 loleaflet: add 'paste' event listener to dialog Change-Id: I2ec69117683e4dd75722b1873a373ee6b7ec7782 Reviewed-on: https://gerrit.libreoffice.org/70961 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/71371 Reviewed-by: Ashod Nakashian 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 5961b165f..6b5f8756e 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -600,6 +600,30 @@ L.Control.LokDialog = L.Control.extend({ // Keep map active while user is playing with sidebar/dialog. this._map.lastActiveTime = Date.now(); }, this); + L.DomEvent.on(dlgInput, 'paste', function(e) { + var clipboardData = e.clipboardData || window.clipboardData; + var data, blob; + + L.DomEvent.preventDefault(e); + if (clipboardData) { + data = clipboardData.getData('text/plain') || clipboardData.getData('Text'); + if (data) { + var cmd = { + MimeType: { + type: 'string', + value: 'mimetype=text/plain;charset=utf-8' + }, + Data: { + type: '[]byte', + value: data + } + }; + + blob = new Blob(['windowcommand ' + id + ' paste ', encodeURIComponent(JSON.stringify(cmd))]); + this._map._socket.sendMessage(blob); + } + } + }, this); L.DomEvent.on(dlgInput, 'contextmenu', function() { 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) New commits: commit 0c5524f89a405ab30ae91c4d75e72343195f8942 Author: Tor Lillqvist AuthorDate: Sat Apr 20 23:32:37 2019 +0300 Commit: Tor Lillqvist CommitDate: Mon May 6 10:06:32 2019 +0200 tdf#124235: Fix the same problem on all platforms the same way Reviewed-on: https://gerrit.libreoffice.org/71023 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit ede2c3432f1d25c1c74b94f8fd5686fd59750e7b) Change-Id: Ie7ede59841898a0738af7e44a3c0fe89db1cd3ee Reviewed-on: https://gerrit.libreoffice.org/71842 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index b3e4bcd08..5961b165f 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -860,17 +860,7 @@ L.Control.LokDialog = L.Control.extend({ var dialogTitle = $('.lokdialog_notitle'); if (dialogTitle != null && dialogTitle.length == 0) { var dialogTitleBar = $('.ui-dialog-titlebar'); - // tdf#124235: At least in the iOS app, multiplying with - // L.getDpiScaleFactor() below causes the child of a combo box to be - // displaced from the fixed part. I see the same problem also when using - // Safari on a Retuna Mac against normal online. But as I don't know whether - // it happens also for other browsers on other platforms on hidpi displays, - // I will fix this for the iOS app only for now. - if (!window.ThisIsTheiOSApp) { - top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor(); - } else { - top += dialogTitleBar.outerHeight(); - } + top += dialogTitleBar.outerHeight(); } floatingCanvas.id = strId + '-floating'; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/vector/SVGGroup.js | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit 9b2070932fd7002579a6e65bbc47dfa65f70805e Author: Henry Castro AuthorDate: Thu Apr 4 10:51:37 2019 -0400 Commit: Jan Holesovsky CommitDate: Fri May 3 18:16:55 2019 +0200 loleaflet: fix "select text with mouse after clicking into text box moves ... text box instead" Change-Id: Id867af5ebf7c93cc494be7fad93aae235ffa36d1 Reviewed-on: https://gerrit.libreoffice.org/70262 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/70670 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/layer/vector/SVGGroup.js b/loleaflet/src/layer/vector/SVGGroup.js index 351b000dd..48a1e5967 100644 --- a/loleaflet/src/layer/vector/SVGGroup.js +++ b/loleaflet/src/layer/vector/SVGGroup.js @@ -32,14 +32,21 @@ L.SVGGroup = L.Layer.extend({ if (doc.lastChild.localName !== 'svg') return; - L.DomUtil.remove(this._rect._path); - this._svg = this._path.appendChild(doc.lastChild); + if (svgString.indexOf('XTEXT_PAINTSHAPE_BEGIN') !== -1) { + this._svg = this._path.insertBefore(doc.lastChild, this._rect._path); + this._rect._path.setAttribute('pointer-events', 'visibleStroke'); + this._svg.setAttribute('pointer-events', 'none'); + } else { + L.DomUtil.remove(this._rect._path); + this._svg = this._path.appendChild(doc.lastChild); + this._svg.setAttribute('pointer-events', 'visiblePainted'); + L.DomEvent.on(this._svg, 'mousedown', this._onDragStart, this); + this._dragShape = this._svg; + } + this._svg.setAttribute('opacity', 0); this._svg.setAttribute('width', size.x); this._svg.setAttribute('height', size.y); - this._svg.setAttribute('pointer-events', 'visiblePainted'); - this._dragShape = this._svg; - L.DomEvent.on(this._svg, 'mousedown', this._onDragStart, this); this._update(); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) New commits: commit b999c6fe6d080131f96dec34b11075164ae1d9e1 Author: Ashod Nakashian AuthorDate: Thu May 2 23:28:04 2019 -0400 Commit: Jan Holesovsky CommitDate: Fri May 3 17:44:57 2019 +0200 leaflet: Enable sidebar on writer and calc, but not yet in impress Does not actually show the sidebar yet... Change-Id: Iadddba04bbdb96159e84ffd1498a0845b32e1590 diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index d63d43b3a..9771e38d2 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -231,17 +231,15 @@ L.Map = L.Evented.extend({ // Show sidebar. if (this._docLayer && !window.mode.isMobile() && !window.mode.isTablet() && - (this._docLayer._docType === 'presentation' || this._docType === 'drawing')) { + (this._docLayer._docType === 'spreadsheet' || this._docLayer._docType === 'text')) { // Let the first page finish loading then load the sidebar. var map = this; setTimeout(function () { // This triggers all sidebar decks, so they would // be loaded and show rather quickly on first use. // Also, triggers sidebar window creation in the client. - map._socket.sendMessage('uno .uno:MasterSlidesPanel'); - map._socket.sendMessage('uno .uno:CustomAnimation'); - map._socket.sendMessage('uno .uno:SlideChangeWindow'); - map._socket.sendMessage('uno .uno:ModifyPage'); + map._socket.sendMessage('uno .uno:ViewSidebarStyles'); + map._socket.sendMessage('uno .uno:Sidebar'); }, 200); } }, this); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 10 +- loleaflet/src/unocommands.js |8 +++- 2 files changed, 16 insertions(+), 2 deletions(-) New commits: commit 889ae4652cfdb7289592fe10bac129f423ef02f8 Author: Henry Castro AuthorDate: Fri Apr 19 09:32:42 2019 -0400 Commit: Michael Meeks CommitDate: Fri May 3 16:57:40 2019 +0200 loleaflet: enable Conditional Formatting dialog This reverts commit b3532ebb828035dc9db8c027472bd050494fce3c. Change-Id: Iac31520b1444832059c99e0bfb52eb99d1fd91ca Reviewed-on: https://gerrit.libreoffice.org/71243 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 6a94d673e..f58b457ed 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -362,7 +362,15 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:FormatMenu', 'spreadsheet'), type: 'menu', menu: [ {uno: '.uno:ResetAttributes'}, {uno: '.uno:FormatCellDialog'}, - {uno: '.uno:PageFormatDialog'} + {uno: '.uno:PageFormatDialog'}, + {name: _UNO('.uno:ConditionalFormatMenu', 'spreadsheet'), type: 'menu', menu: [ + {uno: '.uno:ConditionalFormatDialog'}, + {uno: '.uno:ColorScaleFormatDialog'}, + {uno: '.uno:DataBarFormatDialog'}, + {uno: '.uno:IconSetFormatDialog'}, + {uno: '.uno:CondDateFormatDialog'}, + {type: 'separator'}, + {uno: '.uno:ConditionalFormatManagerDialog'}]}, ]}, {name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 'menu', menu: [ {name: _UNO('.uno:InsertRowsMenu', 'spreadsheet'), type: 'menu', menu: [ diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index 9b543456d..225ce5d79 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -23,6 +23,7 @@ var unoCommandsArray = { ChangeCaseToUpper:{global:{menu:_('~UPPERCASE'),},}, ChangesMenu:{global:{menu:_('Track Chan~ges'),},}, ClearOutline:{global:{menu:_('~Remove Outline'),},}, + ColorScaleFormatDialog:{spreadsheet:{menu:_('Color Scale...'),},}, CommonAlignBottom:{global:{menu:_('Bottom'),},}, CommonAlignHorizontalCenter:{global:{menu:_('Centered'),},}, CommonAlignJustified:{global:{menu:_('Justified'),},}, @@ -30,12 +31,16 @@ var unoCommandsArray = { CommonAlignRight:{global:{menu:_('Right'),},}, CommonAlignTop:{global:{menu:_('Top'),},}, CommonAlignVerticalCenter:{global:{menu:_('Center'),},}, - ConditionalFormatMenu:{spreadsheet:{menu:_('C~onditional Formatting'),},}, + CondDateFormatDialog:{spreadsheet:{menu:_('Date...'),},}, + ConditionalFormatDialog:{spreadsheet:{menu:_('Condition...'),},}, + ConditionalFormatManagerDialog:{spreadsheet:{menu:_('Manage...'),},}, + ConditionalFormatMenu:{spreadsheet:{menu:_('C~onditional'),},}, ContinueNumbering:{text:{menu:_('Continue previous numbering'),},}, ControlCodes:{text:{menu:_('For~matting Marks'),},}, Copy:{global:{menu:_('~Copy'),},}, CopyHyperlinkLocation:{text:{menu:_('Copy Hyperlink Location'),},}, Cut:{global:{menu:_('~Cut'),},}, + DataBarFormatDialog:{spreadsheet:{menu:_('Data Bar...'),},}, DataFilterAutoFilter:{spreadsheet:{menu:_('Auto~Filter'),},}, DataFilterHideAutoFilter:{spreadsheet:{menu:_('~Hide AutoFilter'),},}, DataFilterRemoveFilter:{spreadsheet:{menu:_('~Reset Filter'),},}, @@ -92,6 +97,7 @@ var unoCommandsArray = { HideDetail:{global:{menu:_('~Hide Details'),},}, HideRow:{spreadsheet:{context:_('H~ide Rows'),menu:_('H~ide'),},}, HyperlinkDialog:{global:{context:_('Insert Hyperlink'),menu:_('~Hyperlink...'),},}, + IconSetFormatDialog:{spreadsheet:{menu:_('Icon Set...'),},}, IncrementIndent:{global:{context:_('Increase Indent'),menu:_('Increase Indent'),},}, IncrementLevel:{text:{menu:_('Promote One Level'),},}, IncrementSubLevels:{text:{menu:_('Promote One Level With Subpoints'),},}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.AlertDialog.js |2 +- loleaflet/src/errormessages.js |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 9f8890fa62d17fb53bfa6ea876812166e0e9a39b Author: Jan Holesovsky AuthorDate: Fri May 3 16:39:49 2019 +0200 Commit: Michael Meeks CommitDate: Fri May 3 16:44:10 2019 +0200 Tell the user which link they are about to visit. Change-Id: Ice177eeda7a11fe20d0188abceee3ef520769bbf Reviewed-on: https://gerrit.libreoffice.org/71755 Reviewed-by: Iván Sánchez Ortega Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.AlertDialog.js b/loleaflet/src/control/Control.AlertDialog.js index 336c14dd7..0c3734eb9 100644 --- a/loleaflet/src/control/Control.AlertDialog.js +++ b/loleaflet/src/control/Control.AlertDialog.js @@ -32,9 +32,9 @@ L.Control.AlertDialog = L.Control.extend({ if (!isLinkValid) { messageText = window.errorMessages.invalidLink; - messageText = messageText.replace('%url', url); } + messageText = messageText.replace('%url', url); var buttonsList = []; if (isLinkValid) { diff --git a/loleaflet/src/errormessages.js b/loleaflet/src/errormessages.js index 0baa1e626..b4b04838f 100644 --- a/loleaflet/src/errormessages.js +++ b/loleaflet/src/errormessages.js @@ -22,7 +22,7 @@ errorMessages.sessionexpiry = _('Your session will expire in %time. Please save errorMessages.sessionexpired = _('Your session has been expired. Further changes to document might not be saved. Please refresh the session (or webpage) to continue.'); errorMessages.faileddocloading = _('Failed to load the document. Please ensure the file type is supported and not corrupted, and try again.'); errorMessages.invalidLink = _('Invalid link: \'%url\''); -errorMessages.leaving = _('You are leaving the editor, are you sure you want to proceed?'); +errorMessages.leaving = _('You are leaving the editor, are you sure you want to visit %url?'); errorMessages.storage = { loadfailed: _('Failed to read document from storage. Please contact your storage server (%storageserver) administrator.'), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4297c597b5556238f4ee03c260418a0a2dd6b4f6 Author: Henry Castro AuthorDate: Fri May 3 10:32:05 2019 -0400 Commit: Henry Castro CommitDate: Fri May 3 10:37:46 2019 -0400 loleaflet: validate that the rectangle coordinates ... follow-up I submitted the wrong patch in gerrit. Change-Id: I2d5bae2bcc615e5059a81a12cd7b4a1ce75260dd diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index f55438827..b3e4bcd08 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -195,7 +195,7 @@ L.Control.LokDialog = L.Control.extend({ _isRectangleValid: function(rect) { rect = rect.split(','); - return (!isNaN(rect[0]) && !isNaN(rect[1]) && + return (!isNaN(parseInt(rect[0])) && !isNaN(parseInt(rect[1])) && parseInt(rect[2]) >= 0 && parseInt(rect[3]) >= 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 64afe9328ed619a3d5c8da941099a435d253020e Author: Henry Castro AuthorDate: Wed Apr 24 00:31:08 2019 -0400 Commit: Henry Castro CommitDate: Fri May 3 16:19:12 2019 +0200 loleaflet: validate that the rectangle coordinates (x, y) belongs to ZxZ Change-Id: Ibbb1cf1416ec441f1e3d4baaf6fdf6f47ab6041c Reviewed-on: https://gerrit.libreoffice.org/71150 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/71244 diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index e151ff820..f55438827 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -195,7 +195,7 @@ L.Control.LokDialog = L.Control.extend({ _isRectangleValid: function(rect) { rect = rect.split(','); - return (parseInt(rect[0]) >= 0 && parseInt(rect[1]) >= 0 && + return (!isNaN(rect[0]) && !isNaN(rect[1]) && parseInt(rect[2]) >= 0 && parseInt(rect[3]) >= 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/collabora-online-4' - loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit ce3b26a7cae4c852cbe7b7757d3b240f86a7435d Author: Henry Castro AuthorDate: Mon Apr 15 14:34:50 2019 -0400 Commit: Andras Timar CommitDate: Fri May 3 14:12:26 2019 +0200 loleaflet: fix sending 'compositionupdate' event data Change-Id: I42142f005d0659b64e5332b5acec52f9ac18a89b Reviewed-on: https://gerrit.libreoffice.org/70793 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/70823 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index b532c16a7..4e3b51354 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -399,14 +399,11 @@ L.Map.Keyboard = L.Handler.extend({ }, _onIME: function (e) { - if (e.type === 'compositionstart' || e.type === 'compositionupdate') { + if (e.type === 'compositionstart') { this._isComposing = true; // we are starting composing with IME - if (e.originalEvent.data.length > 0) { - this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data); - } - } - - if (e.type === 'compositionend') { + } else if (e.type === 'compositionupdate') { + this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data); + } else if (e.type === 'compositionend') { this._isComposing = false; // stop of composing with IME // get the composited char codes // clear the input now - best to do this ASAP so the input ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js | 12 1 file changed, 4 insertions(+), 8 deletions(-) New commits: commit 20ff0a47bc886ae4839b363217b2f6100544facd Author: Henry Castro AuthorDate: Thu Apr 11 14:12:32 2019 -0400 Commit: Andras Timar CommitDate: Fri May 3 14:11:19 2019 +0200 loleaflet: fix the input method when receives 'compositionend' event Change-Id: I296a714f41afb8a497e21661db0edf23d270b821 Reviewed-on: https://gerrit.libreoffice.org/70607 Reviewed-by: Henry Castro Tested-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/70666 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 863473bae..b532c16a7 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -401,12 +401,8 @@ L.Map.Keyboard = L.Handler.extend({ _onIME: function (e) { if (e.type === 'compositionstart' || e.type === 'compositionupdate') { this._isComposing = true; // we are starting composing with IME - var txt = ''; - for (var i = 0; i < e.originalEvent.data.length; i++) { - txt += e.originalEvent.data[i]; - } - if (txt) { - this._map._docLayer._postCompositionEvent(0, 'input', txt); + if (e.originalEvent.data.length > 0) { + this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data); } } @@ -417,10 +413,10 @@ L.Map.Keyboard = L.Handler.extend({ // is clear for the next word this._map._clipboardContainer.setValue(''); // Set all keycodes to zero - this._map._docLayer._postCompositionEvent(0, 'end', ''); + this._map._docLayer._postCompositionEvent(0, 'end', e.originalEvent.data); } - if (e.type === 'textInput' && !this._keyHandled) { + if (e.type === 'textInput' && !this._keyHandled && !this._isComposing) { // Hack for making space and spell-check text insert work // in Chrome (on Andorid) or Chrome with IME. // ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) New commits: commit 3a30ac379948dfc903883cd2549103d6126b7784 Author: Iván Sánchez Ortega AuthorDate: Thu May 2 09:28:55 2019 +0200 Commit: Andras Timar CommitDate: Fri May 3 13:53:02 2019 +0200 tdf#124749:loleaflet: use "KeyboardEvent.key" to detect ignored key events Replace KeyboardEvent.keyCode with KeyboardEvent.key for detection of "Delete" and "Insert" keys. keyCode misbehaves when using an AZERTY/DVORAK keyboard layout, e.g. the keyCode for "Delete" in QWERTY is the same as "." in AZERTY. This works on all major browsers, the only outlier being MSIE8: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key#Browser_compatibility Change-Id: I5cbfa18ef59ab4989a866fdf4b5708610beccaad Reviewed-on: https://gerrit.libreoffice.org/71735 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 28144cc53..863473bae 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -182,16 +182,23 @@ L.Map.Keyboard = L.Handler.extend({ this._map.off('compositionstart compositionupdate compositionend textInput', this._onIME, this); }, + /* +* Returns true whenever the key event shall be ignored. +* This means shift+insert and shift+delete (or "insert or delete when holding +* shift down"). Those events are handled elsewhere to trigger "cut" and +* "paste" events, and need to be ignored in order to avoid double-handling them. +*/ _ignoreKeyEvent: function(e) { - var shift = e.originalEvent.shiftKey ? this.keyModifier.shift : 0; - if (shift && (e.originalEvent.keyCode === 45 || e.originalEvent.keyCode === 46)) { - // don't handle shift+insert, shift+delete - // These are converted to 'cut', 'paste' events which are - // automatically handled by us, so avoid double-handling - return true; + var shift = e.originalEvent.shiftKey; + if ('key' in e.originalEvent) { + var key = e.originalEvent.key; + return (shift && (key === 'Delete' || key === 'Insert')); + } else { + // keyCode is not reliable in AZERTY/DVORAK keyboard layouts, is used + // only as a fallback for MSIE8. + var keyCode = e.originalEvent.keyCode; + return (shift && (keyCode === 45 || keyCode === 46)); } - - return false; }, _setPanOffset: function (pan) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit c05d8719395d0ffdaf84eca27cc24dc3e780e9ff Author: Szymon Kłos AuthorDate: Wed Mar 13 18:05:14 2019 +0100 Commit: Jan Holesovsky CommitDate: Tue Apr 23 12:07:35 2019 +0200 Show progressbar centered in the mobile When Online was embodied in the nextcloud app (Android) the progressbar was moved into top-left corner. During a loading all functions to get container or browser size were returning (0,0). This hack assumed that webview size is almost equal to the mobile screen size. Change-Id: I0fff53639a3baa88b57d91bf671e00ad8c71180d Reviewed-on: https://gerrit.libreoffice.org/69219 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 6f213dd9d..4aad141c5 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -108,7 +108,14 @@ L.Map = L.Evented.extend({ } this._addLayers(this.options.layers); this._socket = L.socket(this); - this._progressBar = L.progressOverlay(this.getCenter(), L.point(150, 25)); + + var center = this.getCenter(); + if (L.Browser.mobile) { + var doubledProgressHeight = 200; + var size = new L.point(screen.width, screen.height - doubledProgressHeight); + center = this.layerPointToLatLng(size._divideBy(2)); + } + this._progressBar = L.progressOverlay(center, new L.point(150, 25)); if (L.Browser.mobile) { this._clipboardContainer = L.control.mobileInput().addTo(this); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 40bf45ada9feb9e6e0aab3c7a018856d8e65b4a2 Author: Tor Lillqvist AuthorDate: Fri Apr 19 18:11:16 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Apr 19 18:13:53 2019 +0300 tdf#124235: Make the combo box list be attached to the widget Don't multiply 'top' by the dpi scale factor in the iOS app. I see the same problem in Safari on a Retina Mac against normal online, too, so possibly the multiplication should never be done? diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 1836bf7a2..3282b9d2e 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -658,7 +658,17 @@ L.Control.LokDialog = L.Control.extend({ var dialogTitle = $('.lokdialog_notitle'); if (dialogTitle != null && dialogTitle.length == 0) { var dialogTitleBar = $('.ui-dialog-titlebar'); - top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor(); + // tdf#124235: At least in the iOS app, multiplying with + // L.getDpiScaleFactor() below causes the child of a combo box to be + // displaced from the fixed part. I see the same problem also when using + // Safari on a Retuna Mac against normal online. But as I don't know whether + // it happens also for other browsers on other platforms on hidpi displays, + // I will fix this for the iOS app only for now. + if (!window.ThisIsTheiOSApp) { + top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor(); + } else { + top += dialogTitleBar.outerHeight(); + } } floatingCanvas.id = strId + '-floating'; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |8 loleaflet/src/control/Parts.js|1 - 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 4e30d3d2a3dacfad34168e17a194e7bf78e725a2 Author: Ashod Nakashian AuthorDate: Wed Nov 28 22:07:33 2018 -0500 Commit: Ashod Nakashian CommitDate: Mon Apr 15 05:03:41 2019 +0200 leaflet: select the current slide and update previews after reordering Change-Id: Iec1c41b257744e99d8447518be0b38eb9a28d715 Reviewed-on: https://gerrit.libreoffice.org/69639 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 908d7e5ca..92bbd2673 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -211,6 +211,7 @@ L.Control.PartsPreview = L.Control.extend({ console.log('shift'); } else { this._map.setPart(partId); + this._map.selectPart(partId, 1, false); // And select. } } }, @@ -392,6 +393,13 @@ L.Control.PartsPreview = L.Control.extend({ if (partId < 0) partId = -1; // First item is -1. this.partsPreview._map._socket.sendMessage('moveselectedclientparts position=' + partId); + // Update previews, after a second, since we only get the dragged one invalidated. + var that = this.partsPreview; + setTimeout(function () { + for (var i = 0; i < that._previewTiles.length; ++i) { + that._map.getPreview(i, i, 180, 180, {autoUpdate: that.options.autoUpdate, broadcast: true}); + } + }, 1000); } this.classList.remove('preview-img-dropsite'); diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js index 95e5bc2a0..c428408e7 100644 --- a/loleaflet/src/control/Parts.js +++ b/loleaflet/src/control/Parts.js @@ -63,7 +63,6 @@ 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) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.PartsPreview.js | 16 1 file changed, 12 insertions(+), 4 deletions(-) New commits: commit 685f10a287c23e22ad77468f10cfc0f2dac5955e Author: Ashod Nakashian AuthorDate: Fri Nov 23 01:36:17 2018 -0500 Commit: Ashod Nakashian CommitDate: Mon Apr 15 05:02:39 2019 +0200 leaflet: support reordering slides to first position Change-Id: I23fba5d7e10d861ec482974cf355c9fb1ae13a64 Reviewed-on: https://gerrit.libreoffice.org/69637 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 23ef831d2..1492f03ab 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -66,7 +66,7 @@ L.Control.PartsPreview = L.Control.extend({ this._map.on('click', function() { this.partsFocused = false; }, this); - + this._map.on('keydown', function(e) { if (this.partsFocused === true) { switch (e.originalEvent.keyCode) { @@ -82,6 +82,12 @@ L.Control.PartsPreview = L.Control.extend({ this._scrollContainer = $('#slide-sorter .mCSB_container').get(0); + // Add a special frame just as a drop-site for reordering. + var frame = L.DomUtil.create('div', 'preview-frame', this._scrollContainer); + this._addDnDHandlers(frame); + frame.setAttribute('draggable', false); + L.DomUtil.setStyle(frame, 'height', '12px'); + // Create the preview parts for (var i = 0; i < parts; i++) { this._previewTiles.push(this._createPreview(i, e.partNames[i], bottomBound)); @@ -189,12 +195,12 @@ L.Control.PartsPreview = L.Control.extend({ $('#slide-sorter').mCustomScrollbar('scrollTo', nodePos-(sliderHeight-nodeHeight-nodeHeight/2)); }, 50); } - } + } return; } var part = $('#slide-sorter .mCSB_container .preview-frame').index(e.target.parentNode); if (part !== null) { - var partId = parseInt(part); + var partId = parseInt(part) - 1; // The first part is just a drop-site for reordering. if (e.ctrlKey) { this._map.selectPart(partId, 2, false); // Toggle selection on ctrl+click. @@ -381,7 +387,9 @@ L.Control.PartsPreview = L.Control.extend({ var part = $('#slide-sorter .mCSB_container .preview-frame').index(e.target.parentNode); if (part !== null) { - var partId = parseInt(part); + var partId = parseInt(part) - 1; // First frame is a drop-site for reordering. + if (partId < 0) + partId = -1; // First item is -1. this.partsPreview._map._socket.sendMessage('moveselectedclientparts position=' + partId); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src wsd/ClientSession.cpp wsd/protocol.txt
loleaflet/src/layer/tile/TileLayer.js |2 +- wsd/ClientSession.cpp |4 +++- wsd/protocol.txt |7 ++- 3 files changed, 10 insertions(+), 3 deletions(-) New commits: commit 6dce712ff4680fb7add00ebf6e4b78f61dda3e79 Author: Ashod Nakashian AuthorDate: Mon Sep 17 06:45:57 2018 -0400 Commit: Ashod Nakashian CommitDate: Mon Apr 15 04:23:45 2019 +0200 wsd: leaflet: support statusupdate: messages to sync clients This new message is identical to status: except it doesn't imply (re)connection. It's unfortunate that status: is assumed to be sent only when establishing connection and loading a document, so we need a different notification that can be sent at any time, without triggering initalization logic on the client-side. Change-Id: I9c804119aec292b873aeed132cc32f13c030d845 Reviewed-on: https://gerrit.libreoffice.org/69634 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 42c880e57..ca302390e 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -432,7 +432,7 @@ L.TileLayer = L.GridLayer.extend({ else if (textMsg.startsWith('statechanged:')) { this._onStateChangedMsg(textMsg); } - else if (textMsg.startsWith('status:')) { + else if (textMsg.startsWith('status:') || textMsg.startsWith('statusupdate:')) { this._onStatusMsg(textMsg); } else if (textMsg.startsWith('textselection:')) { diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index f9b8739f5..c2fbee956 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -167,6 +167,7 @@ bool ClientSession::_handleInput(const char *buffer, int length) tokens[0] != "selectclientpart" && tokens[0] != "setpage" && tokens[0] != "status" && + tokens[0] != "statusupdate" && tokens[0] != "tile" && tokens[0] != "tilecombine" && tokens[0] != "uno" && @@ -181,6 +182,7 @@ bool ClientSession::_handleInput(const char *buffer, int length) tokens[0] != "rendershapeselection" && tokens[0] != "removesession") { +LOG_ERR("Session [" << getId() << "] got unknown command [" << tokens[0] << "]."); sendTextFrame("error: cmd=" + tokens[0] + " kind=unknown"); return false; } @@ -241,7 +243,7 @@ bool ClientSession::_handleInput(const char *buffer, int length) { return sendFontRendering(buffer, length, tokens, docBroker); } -else if (tokens[0] == "status") +else if (tokens[0] == "status" || tokens[0] == "statusupdate") { assert(firstLine.size() == static_cast(length)); return forwardToChild(firstLine, docBroker); diff --git a/wsd/protocol.txt b/wsd/protocol.txt index a4631c912..cb5554e4c 100644 --- a/wsd/protocol.txt +++ b/wsd/protocol.txt @@ -369,11 +369,16 @@ saveas: url= name= is the resulting name (without path) that was created on the wopi host. It can differ from what was requested in case the file already existed. -status: type= parts= current= width= height= viewid= [partNames] +status: type= parts= current= width= height= viewid= hiddenparts= selectedparts= [partNames] is 'text, 'spreadsheet', 'presentation', 'drawing' or 'other. Others are numbers. if the document has multiple parts and those have names, part names follow separated by '\n' +statusupdate: type= parts= current= width= height= viewid= hiddenparts= selectedparts= [partNames] + +Same as status: but issued whenever the document parts have updated significantly. +status: implies document loading. statusupdate: is just an update. + styles: {"styleFamily": ["styles in family"], etc. } statechanged: = ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 3ce7998e19e6419b036ca8a6d52e4b3cdf28e6d3 Author: Tor Lillqvist AuthorDate: Fri Apr 12 15:50:27 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Apr 12 15:50:27 2019 +0300 tdf#124448: Don't show the 'Download as' menu entry on mobile apps diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index f15feb928..d90e3fb79 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -21,7 +21,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('Share...'), id:'shareas', type: 'action'}, {name: _UNO('.uno:Print', 'text'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, - {name: _('Download as'), id: 'downloadas', type: 'menu', menu: [ + {name: _('Download as'), id: 'downloadas', type: 'menu', mobileapp: false, menu: [ {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF text document (.odt)'), id: 'downloadas-odt', type: 'action'}, {name: _('Word 2003 Document (.doc)'), id: 'downloadas-doc', type: 'action'}, @@ -238,7 +238,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('Share...'), id:'shareas', type: 'action'}, {name: _UNO('.uno:Print', 'presentation'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, - {name: _('Download as'), id: 'downloadas', type: 'menu', menu: [ + {name: _('Download as'), id: 'downloadas', type: 'menu', mobileapp: false, menu: [ {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'}, {name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'}, @@ -326,7 +326,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('Share...'), id:'shareas', type: 'action'}, {name: _UNO('.uno:Print', 'spreadsheet'), id: 'print', type: 'action'}, {name: _('See revision history'), id: 'rev-history', type: 'action'}, - {name: _('Download as'), id:'downloadas', type: 'menu', menu: [ + {name: _('Download as'), id:'downloadas', type: 'menu', mobileapp: false, menu: [ {name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF spreadsheet (.ods)'), id: 'downloadas-ods', type: 'action'}, {name: _('Excel 2003 Spreadsheet (.xls)'), id: 'downloadas-xls', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/core/Socket.js | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit ad7aa46c12e0711ee0b3c282e788cadf0745cff9 Author: Ashod Nakashian AuthorDate: Sat Mar 30 12:15:09 2019 -0400 Commit: Jan Holesovsky CommitDate: Tue Apr 9 12:33:43 2019 +0200 leaflet: suppress empty error messages This also adds support to suppress errors by setting their message to blank. Change-Id: I2baabd121afb59c48e950b139f984c64d1720512 Reviewed-on: https://gerrit.libreoffice.org/70032 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 85c459c0f..b21a3b496 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -547,12 +547,15 @@ L.Socket = L.Class.extend({ return; } - // Parse the storage url as link - var tmpLink = document.createElement('a'); - tmpLink.href = this._map.options.doc; - // Insert the storage server address to be more friendly - storageError = storageError.replace('%storageserver', tmpLink.host); - this._map.fire('warn', {msg: storageError}); + // Skip empty errors (and allow for suppressing errors by making them blank). + if (storageError != '') { + // Parse the storage url as link + var tmpLink = document.createElement('a'); + tmpLink.href = this._map.options.doc; + // Insert the storage server address to be more friendly + storageError = storageError.replace('%storageserver', tmpLink.host); + this._map.fire('warn', {msg: storageError}); + } return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit f0329019c2e3caa9f9df166005acb7be011f79ce Author: Tor Lillqvist AuthorDate: Fri Apr 5 21:22:53 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Apr 5 21:22:53 2019 +0300 tdf#124163: Don't display the View > Full screen menu entry in mobile apps diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index cc3d96df5..f15feb928 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -56,8 +56,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:EditStyle'} ]}, {name: _UNO('.uno:ViewMenu', 'text'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'text'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, + {name: _UNO('.uno:FullScreen', 'text'), id: 'fullscreen', type: 'action', mobileapp: false}, + {type: 'separator', mobileapp: false}, {name: _UNO('.uno:ZoomPlus', 'text'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, @@ -259,8 +259,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:SearchDialog'} ]}, {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, + {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action', mobileapp: false}, + {type: 'separator', mobileapp: false}, {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}] @@ -346,7 +346,7 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:SearchDialog'} ]}, - {name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', menu: [ + {name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', mobileapp: false, menu: [ {name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'} ]}, {name: _UNO('.uno:InsertMenu', 'spreadsheet'), type: 'menu', menu: [ @@ -940,6 +940,9 @@ L.Control.Menubar = L.Control.extend({ } if (menu[i].type === 'menu') { + if (menu[i].mobileapp == false && window.ThisIsAMobileApp) { + continue; + } var ulItem = L.DomUtil.create('ul', '', liItem); var subitemList = this._createMenu(menu[i].menu); if (!subitemList.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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 73277251537f85bf8aa0c4875ef1101971c3aadb Author: Tor Lillqvist AuthorDate: Fri Apr 5 18:56:31 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Apr 5 21:04:09 2019 +0300 tdf#124177: Don't show the Help > Keyboard shortcuts menu entry in mobile apps diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 1ba848f07..cc3d96df5 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -225,7 +225,7 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:OnlineAutoFormat'}]} ]}, {name: _UNO('.uno:HelpMenu', 'text'), id: 'help', type: 'menu', menu: [ - {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false}, {name: _('About'), id: 'about', type: 'action'}] }, {name: _('Last modification'), id: 'last-mod', type: 'action', mobile: false, tablet: false} @@ -313,7 +313,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]} ]}, {name: _UNO('.uno:HelpMenu', 'presentation'), id: 'help', type: 'menu', menu: [ - {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false}, {name: _('About'), id: 'about', type: 'action'}] }, {name: _('Last modification'), id: 'last-mod', type: 'action', mobile: false, tablet: false} @@ -411,7 +411,7 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:GoalSeekDialog'} ]}, {name: _UNO('.uno:HelpMenu', 'spreadsheet'), id: 'help', type: 'menu', menu: [ - {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'}, + {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false}, {name: _('About'), id: 'about', type: 'action'}] }, {name: _('Last modification'), id: 'last-mod', type: 'action', mobile: false, tablet: false} @@ -967,6 +967,10 @@ L.Control.Menubar = L.Control.extend({ $(aItem).css('display', 'none'); } + if (menu[i].mobileapp == false && window.ThisIsAMobileApp) { + $(aItem).css('display', 'none'); + } + itemList.push(liItem); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/dom/DomEvent.js |8 loleaflet/src/layer/vector/SVGGroup.js | 25 + 2 files changed, 33 insertions(+) New commits: commit 3c854c32e00fcc26f7f507c7d2384c59f8887500 Author: Tor Lillqvist AuthorDate: Thu Mar 28 00:07:15 2019 +0200 Commit: Tor Lillqvist CommitDate: Thu Mar 28 00:44:01 2019 +0200 tdf#124179: Make it possible to drag an image using a touch gesture First select the image (so that the circular handles show up), then drag it. diff --git a/loleaflet/src/dom/DomEvent.js b/loleaflet/src/dom/DomEvent.js index 67e04c4ce..0d59d54aa 100644 --- a/loleaflet/src/dom/DomEvent.js +++ b/loleaflet/src/dom/DomEvent.js @@ -178,6 +178,9 @@ L.DomEvent = { getMousePosition: function (e, container) { if (!container) { + if (e.clientX === undefined && e.touches !== undefined) + return new L.Point(e.touches[0].clientX, e.touches[0].clientY); + return new L.Point(e.clientX, e.clientY); } @@ -192,6 +195,11 @@ L.DomEvent = { left = top = 0; } + if (e.clientX === undefined && e.touches !== undefined) + return new L.Point( + e.touches[0].clientX - left - container.clientLeft, + e.touches[0].clientY - top - container.clientTop); + return new L.Point( e.clientX - left - container.clientLeft, e.clientY - top - container.clientTop); diff --git a/loleaflet/src/layer/vector/SVGGroup.js b/loleaflet/src/layer/vector/SVGGroup.js index c719a7b1a..a61aa35c3 100644 --- a/loleaflet/src/layer/vector/SVGGroup.js +++ b/loleaflet/src/layer/vector/SVGGroup.js @@ -9,6 +9,11 @@ L.SVGGroup = L.Layer.extend({ noClip: true }, + lastTouchEvent: { + clientX: 0, + clientY: 0 + }, + initialize: function (bounds, options) { L.setOptions(this, options); this._bounds = bounds; @@ -40,6 +45,11 @@ L.SVGGroup = L.Layer.extend({ }, _onDragStart: function(evt) { + if (evt.type === 'touchstart') { + this.lastTouchEvent.clientX = evt.touches[0].clientX; + this.lastTouchEvent.clientY = evt.touches[0].clientY; + } + if (!this._dragShape) return; this._moved = false; @@ -47,6 +57,9 @@ L.SVGGroup = L.Layer.extend({ L.DomEvent.on(this._dragShape, 'mousemove', this._onDrag, this); L.DomEvent.on(this._dragShape, 'mouseup', this._onDragEnd, this); + L.DomEvent.on(this._dragShape, 'touchmove', this._onDrag, this); + L.DomEvent.on(this._dragShape, 'touchend', this._onDragEnd, this); + var data = { originalEvent: evt, containerPoint: this._map.mouseEventToContainerPoint(evt) @@ -58,6 +71,11 @@ L.SVGGroup = L.Layer.extend({ }, _onDrag: function(evt) { + if (evt.type === 'touchmove') { + this.lastTouchEvent.clientX = evt.touches[0].clientX; + this.lastTouchEvent.clientY = evt.touches[0].clientY; + } + if (!this._dragShape) return; @@ -75,11 +93,17 @@ L.SVGGroup = L.Layer.extend({ }, _onDragEnd: function(evt) { + if (evt.type === 'touchend' && evt.touches.length == 0) + evt.touches[0] = {clientX: this.lastTouchEvent.clientX, clientY: this.lastTouchEvent.clientY}; + if (!this._dragShape) return; L.DomEvent.off(this._dragShape, 'mousemove', this._onDrag, this); L.DomEvent.off(this._dragShape, 'mouseup', this._onDragEnd, this); + L.DomEvent.off(this._dragShape, 'touchmove', this._onDrag, this); + L.DomEvent.off(this._dragShape, 'touchend', this._onDragEnd, this); + this._moved = false; this._hideEmbeddedSVG(); var pos = this._map.mouseEventToLatLng(evt); @@ -122,6 +146,7 @@ L.SVGGroup = L.Layer.extend({ this._path.appendChild(this._rect._path); this._dragShape = this._rect._path; L.DomEvent.on(this._rect._path, 'mousedown', this._onDragStart, this); + L.DomEvent.on(this._rect._path, 'touchstart', this._onDragStart, this); } this._update(); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |7 +++ 1 file changed, 7 insertions(+) New commits: commit 0a5032e64cb63a4a2ddeef2bbdfb096369b3f172 Author: Tor Lillqvist AuthorDate: Wed Mar 27 11:26:57 2019 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 27 12:10:06 2019 +0200 Make tapping an element in a combo box actually work (on touch devices) If we get a 'touchend' immediately after a 'touchstart', simulate a 'mousedown' immediately followed by a 'mouseup'. Change-Id: Ib20eae4cc23518e34a1d948f8e498f50046f72d7 diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 7ad6ccade..1836bf7a2 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -10,6 +10,7 @@ L.WinUtil = { var firstTouchPositionX = null; var firstTouchPositionY = null; +var previousTouchType = null; function updateTransformation(target) { if (target !== null && target !== undefined) { @@ -688,6 +689,11 @@ L.Control.LokDialog = L.Control.extend({ else if (e.type === 'touchend') { this._postWindowGestureEvent(childId, 'panEnd', firstTouchPositionX, firstTouchPositionY, firstTouchPositionY - touchY); + if (previousTouchType === 'touchstart') { + // Simulate mouse click + this._postWindowMouseEvent('buttondown', childId, firstTouchPositionX, firstTouchPositionY, 1, this._map['mouse'].LOButtons.left, 0); + this._postWindowMouseEvent('buttonup', childId, firstTouchPositionX, firstTouchPositionY, 1, this._map['mouse'].LOButtons.left, 0); + } firstTouchPositionX = null; firstTouchPositionY = null; @@ -696,6 +702,7 @@ L.Control.LokDialog = L.Control.extend({ { this._postWindowGestureEvent(childId, 'panUpdate', firstTouchPositionX, firstTouchPositionY, firstTouchPositionY - touchY); } + previousTouchType = e.type; }, this); L.DomEvent.on(canvas, 'mousedown mouseup', function(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/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/WriterTileLayer.js |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 9f7dca3209661a6ca54f287e9709da502223e170 Author: Szymon Kłos AuthorDate: Wed Mar 20 09:34:19 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Mar 26 15:24:58 2019 +0100 Avoid syntax errors while paring command results Change-Id: I7d778fd62aeb32c8304afb90c21aafd83379c170 diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index f7bca842b..ece0ddfa4 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -54,7 +54,12 @@ L.WriterTileLayer = L.TileLayer.extend({ }, _onCommandValuesMsg: function (textMsg) { - var values = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); + var braceIndex = textMsg.indexOf('{'); + if (braceIndex < 0) { + return; + } + + var values = JSON.parse(textMsg.substring(braceIndex)); if (!values) { return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit f496c1e9c588b382fbdb10ae90a0cd85390274e8 Author: Szymon Kłos AuthorDate: Sat Mar 23 14:51:27 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Mar 26 14:41:15 2019 +0100 Make all pages accessible after zooming After zooming scrollbar was updated and scroll position was incorrect what caused first pages not accessible. Regression was introduced by: ffd7151443ee360c7764aaa77f9e7fe5f5d64eee Second problem was jumping to the cursor during zooming. Solution was to not update the cursors on zooming start. Change-Id: I0891799b03ed4eccb211ee43eb30e546317a90fc Reviewed-on: https://gerrit.libreoffice.org/69606 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 643a9ba06..f39102829 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1593,14 +1593,12 @@ L.TileLayer = L.GridLayer.extend({ _onZoomStart: function () { this._isZooming = true; - this._onUpdateCursor(); - this.updateAllViewCursors(); }, _onZoomEnd: function () { this._isZooming = false; - this._onUpdateCursor(); + this._onUpdateCursor(null, true); this.updateAllViewCursors(); }, @@ -1624,16 +1622,16 @@ L.TileLayer = L.GridLayer.extend({ }, // Update cursor layer (blinking cursor). - _onUpdateCursor: function (scroll) { + _onUpdateCursor: function (scroll, zoom) { var cursorPos = this._visibleCursor.getNorthWest(); var docLayer = this._map._docLayer; - if ((scroll !== false) && !this._map.getBounds().contains(this._visibleCursor) && this._isCursorVisible) { + if ((!zoom && scroll !== false) && !this._map.getBounds().contains(this._visibleCursor) && this._isCursorVisible) { var center = this._map.project(cursorPos); center = center.subtract(this._map.getSize().divideBy(2)); center.x = Math.round(center.x < 0 ? 0 : center.x); center.y = Math.round(center.y < 0 ? 0 : center.y); - if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) && + if (!zoom && !(this._selectionHandles.start && this._selectionHandles.start.isDragged) && !(this._selectionHandles.end && this._selectionHandles.end.isDragged) && !(docLayer._followEditor || docLayer._followUser)) { if (window.ThisIsAMobileApp) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.MobileInput.js | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) New commits: commit 79b00d7c711e3791b2e9d992c27a12640cac594e Author: Tor Lillqvist AuthorDate: Tue Mar 26 01:53:21 2019 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 26 02:02:11 2019 +0200 tdf#124178: Handle non-BMP character input on mobile devices Sadly, we must split such into a surrogate pair. diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js index 467f44dad..d1f65b240 100644 --- a/loleaflet/src/control/Control.MobileInput.js +++ b/loleaflet/src/control/Control.MobileInput.js @@ -108,6 +108,12 @@ L.Control.MobileInput = L.Control.extend({ .on(this._textArea, 'blur', this.onLostFocus, this); }, + _getSurrogatePair: function(codePoint) { + var highSurrogate = Math.floor((codePoint - 0x1) / 0x400) + 0xD800; + var lowSurrogate = (codePoint - 0x1) % 0x400 + 0xDC00; + return [highSurrogate, lowSurrogate]; + }, + onKeyEvents: function (e) { var keyCode = e.keyCode, charCode = e.charCode, @@ -147,12 +153,27 @@ L.Control.MobileInput = L.Control.extend({ unoKeyCode = handler._toUNOKeyCode(keyCode); } - docLayer._postKeyboardEvent('input', charCode, unoKeyCode); + if (charCode > 0x) { + // We must handle non-BMP code points as two separate key events + // because the sad VCL KeyEvent only takes a 16-bit "characters". + var surrogatePair = this._getSurrogatePair(charCode); + docLayer._postKeyboardEvent('input', surrogatePair[0], unoKeyCode); + docLayer._postKeyboardEvent('up', surrogatePair[0], unoKeyCode); + docLayer._postKeyboardEvent('input', surrogatePair[1], unoKeyCode); + docLayer._postKeyboardEvent('up', surrogatePair[1], unoKeyCode); + } + else { + docLayer._postKeyboardEvent('input', charCode, unoKeyCode); + } this._lastInput = unoKeyCode; this._keyHandled = true; } else if (e.type === 'keyup') { - docLayer._postKeyboardEvent('up', charCode, unoKeyCode); + if (charCode <= 0x) { + // For non-BMP characters we generated both 'input' and 'up' events + // above already. + docLayer._postKeyboardEvent('up', charCode, unoKeyCode); + } this._lastInput = null; this._keyHandled = 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 4f72db7217f7f10965824e4e1df9335e0c460339 Author: Tor Lillqvist AuthorDate: Wed Mar 20 16:55:31 2019 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 20 16:58:38 2019 +0200 tdf#122544: Disable the 'closemobile' button while tunnelled dialog is showing Sure, I would have preferred to fix the actual bug instead, but that was much harder. See bug report for some notes about what I tried. Now done for iOS app only (window.ThisIsTheiOSApp), probably should be done for any mobile app (window.ThisIsAMobileApp). diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index a4a23254d..c7917d8cb 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -3,7 +3,7 @@ * L.Control.LokDialog used for displaying LOK dialogs */ -/* global $ L Hammer */ +/* global $ L Hammer w2ui */ L.WinUtil = { }; @@ -343,6 +343,8 @@ L.Control.LokDialog = L.Control.extend({ }, _launchDialog: function(id, leftTwips, topTwips, width, height, title) { + if (window.ThisIsTheiOSApp) + w2ui['editbar'].disable('closemobile'); this.onCloseCurrentPopUp(); var dialogContainer = L.DomUtil.create('div', 'lokdialog', document.body); L.DomUtil.setStyle(dialogContainer, 'padding', '0px'); @@ -528,6 +530,8 @@ L.Control.LokDialog = L.Control.extend({ }, _onDialogClose: function(dialogId, notifyBackend) { + if (window.ThisIsTheiOSApp) + w2ui['editbar'].enable('closemobile'); if (notifyBackend) this._sendCloseWindow(dialogId); $('#' + this._toStrId(dialogId)).remove(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 3c24a06bd4d8a0c44a0cb8cc1901c608c13ec6bf Author: Ashod Nakashian AuthorDate: Sun Feb 3 17:32:25 2019 -0500 Commit: Szymon Kłos CommitDate: Fri Mar 15 15:44:49 2019 +0100 leaflet: align drop-down lists with parent combobox This ensures that child-windows are aligned correctly with their parents. Change-Id: I3c491fb34083f26c7d376924ab04fbce83103f22 Reviewed-on: https://gerrit.libreoffice.org/68250 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index b8b7d7ed3..a4a23254d 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -644,12 +644,12 @@ L.Control.LokDialog = L.Control.extend({ var dialogTitle = $('.lokdialog_notitle'); if (dialogTitle != null && dialogTitle.length == 0) { var dialogTitleBar = $('.ui-dialog-titlebar'); - top += dialogTitleBar.height() * L.getDpiScaleFactor(); + top += dialogTitleBar.outerHeight() * L.getDpiScaleFactor(); } floatingCanvas.id = strId + '-floating'; L.DomUtil.setStyle(floatingCanvas, 'position', 'absolute'); - L.DomUtil.setStyle(floatingCanvas, 'left', left + 'px'); // yes, it's necessary to append 'px' + L.DomUtil.setStyle(floatingCanvas, 'left', (left - 1) + 'px'); // Align drop-down list with parent. L.DomUtil.setStyle(floatingCanvas, 'top', top + 'px'); // attach events ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 3e0d5475342a9d7c0e9e4fc2897b61ea0d2b315d Author: Tor Lillqvist AuthorDate: Fri Mar 15 12:53:45 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Mar 15 12:53:45 2019 +0200 Guard against "TypeError: null is not an object" diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 9b5774fc6..b8b7d7ed3 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -620,7 +620,10 @@ L.Control.LokDialog = L.Control.extend({ _onDialogChildClose: function(dialogId) { $('#' + this._toStrId(dialogId) + '-floating').remove(); // remove any extra height allocated for the parent container - var canvasHeight = document.getElementById(dialogId + '-canvas').height; + var canvas = document.getElementById(dialogId + '-canvas'); + if (!canvas) + return; + var canvasHeight = canvas.height; $('#' + dialogId).height(canvasHeight + 'px'); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) New commits: commit 751b8af0af38f3ab4b610b71a27b609099367e3b Author: Ashod Nakashian AuthorDate: Sat Feb 9 20:20:03 2019 -0500 Commit: Jan Holesovsky CommitDate: Thu Mar 14 14:37:42 2019 +0100 leaflet: child windows are top-level now This allows for expanding context-menus since the child submenu is no longer bound by the main context-menu, which is the parent. Change-Id: I88a24c2f16e08f98648eb01f97c0fdaff509461f Reviewed-on: https://gerrit.libreoffice.org/68251 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 cc4205560..9b5774fc6 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -625,16 +625,25 @@ L.Control.LokDialog = L.Control.extend({ }, _removeDialogChild: function(id) { - if (typeof id === 'number') - id = this._toStrId(id); - $('#' + id + '-floating').remove(); + $('#' + this._toStrId(id) + '-floating').remove(); }, _createDialogChild: function(childId, parentId, top, left) { var strId = this._toStrId(parentId); - var dialogContainer = L.DomUtil.get(strId); + var dialogContainer = L.DomUtil.get(strId).parentNode; var floatingCanvas = L.DomUtil.create('canvas', 'lokdialogchild-canvas', dialogContainer); $(floatingCanvas).hide(); // Hide to avoid flickering while we set the dimensions. + + // Since child windows are now top-level, their 'top' offset + // needs adjusting. If we are in a dialog, our top is from the + // dialog body, not the title bar, which is a separate div. + // This doesn't apply for context menus, which don't have titles. + var dialogTitle = $('.lokdialog_notitle'); + if (dialogTitle != null && dialogTitle.length == 0) { + var dialogTitleBar = $('.ui-dialog-titlebar'); + top += dialogTitleBar.height() * L.getDpiScaleFactor(); + } + floatingCanvas.id = strId + '-floating'; L.DomUtil.setStyle(floatingCanvas, 'position', 'absolute'); L.DomUtil.setStyle(floatingCanvas, 'left', left + 'px'); // yes, it's necessary to append 'px' ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dabeea7a74a9c9a5215735f7c88a31c8b49bd2ee Author: Ashod Nakashian AuthorDate: Tue Mar 12 11:55:43 2019 -0400 Commit: Andras Timar CommitDate: Tue Mar 12 21:24:30 2019 +0100 leaflet: do not disable the Close Document menu for read-only docs Change-Id: I6a52b0bd807ae68ea6bf59e103c004375afae50b Reviewed-on: https://gerrit.libreoffice.org/69110 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index ad5388b92..be6148a6c 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -425,7 +425,7 @@ L.Control.Menubar = L.Control.extend({ allowedViewModeActions: [ 'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 'downloadas-docx', 'downloadas-rtf', // file menu 'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 'print', // file menu - 'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', // file menu + 'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', 'closedocument', // file menu 'fullscreen', 'zoomin', 'zoomout', 'zoomreset', // view menu 'about', 'keyboard-shortcuts' // help 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3640adeae109119b4013035b2a1b27935693b0b5 Author: Jan Holesovsky AuthorDate: Tue Mar 12 17:04:50 2019 +0100 Commit: Andras Timar CommitDate: Tue Mar 12 21:23:42 2019 +0100 Send the UI_FileVersions only when the revision history is enabled. Change-Id: I03a1a27c6a09ff34a6ff828b4903785ae342abc8 Reviewed-on: https://gerrit.libreoffice.org/69112 Reviewed-by: Ashod Nakashian Tested-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index f97772ca8..ad5388b92 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -769,7 +769,7 @@ L.Control.Menubar = L.Control.extend({ this._map.showLOAboutDialog(); } else if (id === 'keyboard-shortcuts') { this._map.showLOKeyboardHelp(); - } else if (id === 'rev-history' || id === 'last-mod') { + } else if (revHistoryEnabled && (id === 'rev-history' || id === 'last-mod')) { // if we are being loaded inside an iframe, ask // our host to show revision history mode this._map.fire('postMessage', {msgId: 'rev-history', args: {Deprecated: 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Permission.js |3 +++ 1 file changed, 3 insertions(+) New commits: commit cee52939e56d1899560bee02fb8eca04aa7246b7 Author: Szymon Kłos AuthorDate: Tue Mar 12 10:24:13 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Mar 12 10:25:35 2019 +0100 Send init commands after mobile is switched to edit mode diff --git a/loleaflet/src/control/Permission.js b/loleaflet/src/control/Permission.js index 76c1ff7b2..37ad81a05 100644 --- a/loleaflet/src/control/Permission.js +++ b/loleaflet/src/control/Permission.js @@ -36,6 +36,9 @@ L.Map.include({ }, _enterEditMode: function (perm) { + if (this._permission == 'readonly' && L.Browser.mobile) { + this.sendInitUNOCommands(); + } this._permission = perm; this._socket.sendMessage('requestloksession'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |2 ++ 1 file changed, 2 insertions(+) New commits: commit 6c3db87af104fda1c985d807cba1f660fa7d862f Author: Szymon Kłos AuthorDate: Mon Mar 11 15:57:24 2019 +0100 Commit: Szymon Kłos CommitDate: Mon Mar 11 15:57:24 2019 +0100 Always show cursor header diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 6932cc4f2..643a9ba06 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1710,6 +1710,8 @@ L.TileLayer = L.GridLayer.extend({ else if (viewCursorMarker) { this._viewLayerGroup.removeLayer(viewCursorMarker); } + + this._viewCursors[viewId].marker.showCursorHeader(); }, updateAllViewCursors : 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.PartsPreview.js | 51 +- 1 file changed, 50 insertions(+), 1 deletion(-) New commits: commit f3ea0a6ffe03425c557297c53768cb927727b4af Author: merttumer AuthorDate: Fri Mar 1 18:11:59 2019 +0300 Commit: Mert Tümer CommitDate: Fri Mar 8 17:36:41 2019 +0100 Ability to switch slides by arrow up/down keys in edit mode Change-Id: Ic465636df8a1960364074149a41ea7d0209dbdab Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/68585 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index d5a7a65bf..eae8149d3 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -8,6 +8,7 @@ L.Control.PartsPreview = L.Control.extend({ options: { autoUpdate: true }, + partsFocused: false, onAdd: function (map) { this._previewInitialized = false; @@ -60,6 +61,24 @@ L.Control.PartsPreview = L.Control.extend({ } } }); + + this._map.on('click', function() { + this.partsFocused = false; + }, this); + + this._map.on('keydown', function(e) { + if (this.partsFocused === true) { + switch (e.originalEvent.keyCode) { + case 38: + this._setPart('prev'); + break; + case 40: + this._setPart('next'); + break; + } + } + }, this); + this._scrollContainer = $('#slide-sorter .mCSB_container').get(0); // Create the preview parts @@ -97,7 +116,10 @@ L.Control.PartsPreview = L.Control.extend({ .on(img, 'click', L.DomEvent.stopPropagation) .on(img, 'click', L.DomEvent.stop) .on(img, 'click', this._setPart, this) - .on(img, 'click', this._map.focus, this._map); + .on(img, 'click', this._map.focus, this._map) + .on(img, 'click', function() { + this.partsFocused = true; + }, this); var topBound = this._previewContTop; var previewFrameTop = 0; @@ -137,6 +159,33 @@ L.Control.PartsPreview = L.Control.extend({ }, _setPart: function (e) { + //helper function to check if the view is in the scrollview visible area + function isVisible(el) { + var elemRect = el.getBoundingClientRect(); + var elemTop = elemRect.top; + var elemBottom = elemRect.bottom; + var isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight); + return isVisible; + } + if (e === 'prev' || e === 'next') { + this._map.setPart(e); + var node = $('#slide-sorter .mCSB_container .preview-frame')[this._map.getCurrentPartNumber()]; + if (!isVisible(node)) { + if (e === 'prev') { + setTimeout(function () { + $('#slide-sorter').mCustomScrollbar('scrollTo', node); + }, 50); + } else { + var nodeHeight = $(node).height(); + var sliderHeight= $('#slide-sorter').height(); + var nodePos = $(node).position().top; + setTimeout(function () { + $('#slide-sorter').mCustomScrollbar('scrollTo', nodePos-(sliderHeight-nodeHeight-nodeHeight/2)); + }, 50); + } + } + return; + } var part = $('#slide-sorter .mCSB_container .preview-frame').index(e.target.parentNode); if (part !== null) {
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 3645a9ce314f5bfafa78f2182084aa43e5e4f34e Author: Tor Lillqvist AuthorDate: Thu Mar 7 13:26:22 2019 +0200 Commit: Tor Lillqvist CommitDate: Thu Mar 7 13:26:22 2019 +0200 tdf#123874: Don't do the SVG preview thing in the iOS app as it crashes WebKit Sure, this is just a stopgap solution, it would be good to figure out a way to have the functionality working. diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index b4ab51f21..6932cc4f2 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -657,7 +657,12 @@ L.TileLayer = L.GridLayer.extend({ this._twipsToLatLng(topLeftTwips, this._map.getZoom()), this._twipsToLatLng(bottomRightTwips, this._map.getZoom())); this._graphicSelectionAngle = (strTwips.length === 5) ? parseInt(strTwips[4]) : 0; - this._map._socket.sendMessage('rendershapeselection mimetype=image/svg+xml'); + // Workaround for tdf#123874. For some reason the handling of the + // shapeselectioncontent messages that we get back causes the WebKit process + // to crash on iOS. + if (!window.ThisIsTheiOSApp) { + this._map._socket.sendMessage('rendershapeselection mimetype=image/svg+xml'); + } } this._onUpdateGraphicSelection(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 819eb2a93926cc744918cb86b59176645c756071 Author: Tor Lillqvist AuthorDate: Tue Feb 12 11:31:36 2019 +0200 Commit: Andras Timar CommitDate: Mon Mar 4 16:13:18 2019 +0100 Unbreak running in Responsive Design Mode in Safari on macOS When "emulating" an iPad in Responsive Design Mode on macOS, L.Browser.touch is false so the code at the end of Map.Tap.js that calls L.Map.addInitHook() to add the 'tap' thing is not executed. But L.Browser.mobile is true, so the code in Map.js that tried to access this.tap was still executed and caused a 'TypeError: undefined is not an object'. Possibly this also helps in similar modes in other browsers. Change-Id: I5dbc1e6b9f80a8f691d400516d95ee950060ae18 Reviewed-on: https://gerrit.libreoffice.org/68335 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 79ef7d54d..9f7f35af3 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -112,7 +112,9 @@ L.Map = L.Evented.extend({ if (L.Browser.mobile) { this._clipboardContainer = L.control.mobileInput().addTo(this); - this._clipboardContainer._cursorHandler.on('up', this.tap._onCursorClick, this.tap); + if (this.tap !== undefined) { + this._clipboardContainer._cursorHandler.on('up', this.tap._onCursorClick, this.tap); + } } else { this._clipboardContainer = L.clipboardContainer(); this.addLayer(this._clipboardContainer); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) New commits: commit 7cdb5300fb6d7dd2b31877d21bbf3e28df9b0832 Author: Tor Lillqvist AuthorDate: Mon Feb 11 13:55:06 2019 +0200 Commit: Andras Timar CommitDate: Mon Mar 4 16:12:55 2019 +0100 Hack to make it easier to drag selection handles vertically on touch devices Change-Id: I33d03d1378ff5bbce094d5de30ab8d51d38efe0d Reviewed-on: https://gerrit.libreoffice.org/67685 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/68334 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 6ac7ad501..b4ab51f21 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1996,18 +1996,21 @@ L.TileLayer = L.GridLayer.extend({ var expectedPos = L.point(e.originalEvent.pageX, e.originalEvent.pageY).subtract(e.target.dragging._draggable.startOffset); - // If the map has been scrolled, but the cursor hasn't been updated yet, then - // the current mouse position differs. - if (!expectedPos.equals(cursorPos)) { - var correction = expectedPos.subtract(cursorPos); - - e.target.dragging._draggable._startPoint = e.target.dragging._draggable._startPoint.add(correction); - e.target.dragging._draggable._startPos = e.target.dragging._draggable._startPos.add(correction); - e.target.dragging._draggable._newPos = e.target.dragging._draggable._newPos.add(correction); - - e.target.dragging._draggable._updatePosition(); + // Dragging the selection handles vertically more than one line on a touch + // device is more or less impossible without this hack. + if (!(typeof e.originalEvent.type === 'string' && e.originalEvent.type === 'touchmove')) { + // If the map has been scrolled, but the cursor hasn't been updated yet, then + // the current mouse position differs. + if (!expectedPos.equals(cursorPos)) { + var correction = expectedPos.subtract(cursorPos); + + e.target.dragging._draggable._startPoint = e.target.dragging._draggable._startPoint.add(correction); + e.target.dragging._draggable._startPos = e.target.dragging._draggable._startPos.add(correction); + e.target.dragging._draggable._newPos = e.target.dragging._draggable._newPos.add(correction); + + e.target.dragging._draggable._updatePosition(); + } } - var containerPos = new L.Point(expectedPos.x - this._map._container.getBoundingClientRect().left, expectedPos.y - this._map._container.getBoundingClientRect().top); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit a1e3eb599dca0095f5598fe2bfcd0c5d4d5073c0 Author: Ashod Nakashian AuthorDate: Sun Feb 3 21:33:52 2019 -0500 Commit: Andras Timar CommitDate: Mon Mar 4 15:34:24 2019 +0100 leaflet: render child windows in HiDPI Aparently we were not setting the dimensions of the child canvas correctly. This also fixed the issue with horizontal scrollbar showing for some child windows (those on the far right) and reduces flickering when poping up child windows. Change-Id: Ie6f2caa25ed2e43e5a3d98ec7148859c727a4916 Reviewed-on: https://gerrit.libreoffice.org/67994 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 3f5ddbf58..cc4205560 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -585,9 +585,9 @@ L.Control.LokDialog = L.Control.extend({ // Binary dialog msg recvd from core _onDialogPaint: function (e) { - var parent = this._getParentId(e.id); - if (parent) { - this._paintDialogChild(parent, e.width, e.height, e.rectangle, e.img); + var parentId = this._getParentId(e.id); + if (parentId) { + this._paintDialogChild(parentId, e.img); } else { this._paintDialog(e.id, e.rectangle, e.img); } @@ -595,18 +595,24 @@ L.Control.LokDialog = L.Control.extend({ // Dialog Child Methods - _paintDialogChild: function(parentId, width, height, rectangle, imgData) { + _paintDialogChild: function(parentId, imgData) { var strId = this._toStrId(parentId); var canvas = L.DomUtil.get(strId + '-floating'); if (!canvas) return; // no floating window to paint to - this._setCanvasWidthHeight(canvas, width, height); + // The image is rendered per the HiDPI scale we used + // while requesting rendering the image. Here we + // set the canvas to have the actual size, while + // the image is rendred with the HiDPI scale. + this._setCanvasWidthHeight(canvas, this._dialogs[parentId].childwidth, + this._dialogs[parentId].childheight); var ctx = canvas.getContext('2d'); var img = new Image(); img.onload = function() { ctx.drawImage(img, 0, 0); + $(canvas).show(); }; img.src = imgData; }, @@ -628,6 +634,7 @@ L.Control.LokDialog = L.Control.extend({ var strId = this._toStrId(parentId); var dialogContainer = L.DomUtil.get(strId); var floatingCanvas = L.DomUtil.create('canvas', 'lokdialogchild-canvas', dialogContainer); + $(floatingCanvas).hide(); // Hide to avoid flickering while we set the dimensions. floatingCanvas.id = strId + '-floating'; L.DomUtil.setStyle(floatingCanvas, 'position', 'absolute'); L.DomUtil.setStyle(floatingCanvas, 'left', left + 'px'); // yes, it's necessary to append 'px' ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Tabs.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 59355d5fbc4d80d43c20b07f42ec094d17cbd606 Author: Alexandru Vlăduţu AuthorDate: Fri Mar 1 14:28:08 2019 +0200 Commit: Michael Meeks CommitDate: Fri Mar 1 17:07:43 2019 +0100 loleaflet: change JS method for displaying tab name in spreadsheet Change-Id: I8f217b2d8e42e79c907c06ddb90e6a2a654e24ef Reviewed-on: https://gerrit.libreoffice.org/68548 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt (cherry picked from commit eb12f7f8bba067fb0a4777b5d6b3ad4f92ab92f0) Reviewed-on: https://gerrit.libreoffice.org/68589 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js index 494d523c8..e173c2bac 100644 --- a/loleaflet/src/control/Control.Tabs.js +++ b/loleaflet/src/control/Control.Tabs.js @@ -139,7 +139,7 @@ L.Control.Tabs = L.Control.extend({ continue; var id = 'spreadsheet-tab' + i; var tab = L.DomUtil.create('div', 'spreadsheet-tab', ssTabScroll); - tab.innerHTML = e.partNames[i]; + tab.textContent = e.partNames[i]; tab.id = id; L.DomEvent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 445817299f4b670503678dacd0ad03b0637f0907 Author: Szymon Kłos AuthorDate: Tue Feb 26 12:27:27 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Feb 26 12:30:34 2019 +0100 Correctly reload rows & columns after saveas Change-Id: I7a6435d2e0d2e9765a5d6176fac637dc6c1d3064 diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 92d36160c..79ef7d54d 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -230,7 +230,7 @@ L.Map = L.Evented.extend({ // TODO: remove duplicated init code this._socket.sendMessage('commandvalues command=.uno:LanguageStatus'); this._socket.sendMessage('commandvalues command=.uno:ViewAnnotations'); - this.fire('updatescrolloffset'); + this.fire('updaterowcolumnheaders'); this._docLayer._getToolbarCommandsValues(); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Header.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0f4680ce22157ceb84e896d2485688a37574676e Author: Marco Cecchetti AuthorDate: Sun Feb 24 17:48:24 2019 +0100 Commit: Szymon Kłos CommitDate: Mon Feb 25 14:50:17 2019 +0100 online: calc: rows were inserted at the wrong place Change-Id: I67a65e5eff29dbb0c22ba4e8dcc34be229a78eb5 Reviewed-on: https://gerrit.libreoffice.org/68311 Reviewed-by: Szymon Kłos Tested-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js index 0390cf4f2..c2059da97 100644 --- a/loleaflet/src/control/Control.Header.js +++ b/loleaflet/src/control/Control.Header.js @@ -273,7 +273,7 @@ L.Control.Header = L.Control.extend({ if (this._mouseOverEntry) { this.drawHeaderEntry(this._mouseOverEntry, /*isOver: */ false); - this._lastMouseOverIndex = this._mouseOverEntry.index; // used by context menu + this._lastMouseOverIndex = this._mouseOverEntry.index + this._startHeaderIndex; // used by context menu this._mouseOverEntry = null; } this._hitResizeArea = 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/collabora-online-4' - loleaflet/src
loleaflet/src/map/handler/Map.Scroll.js | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) New commits: commit ddf37207ff01d5dbf80cc19126828ae81f99ca52 Author: merttumer AuthorDate: Tue Feb 12 21:45:14 2019 +0300 Commit: Jan Holesovsky CommitDate: Fri Feb 22 11:54:10 2019 +0100 Disable intermediate zoom levels on calc For calc only 100% and 200% zoom is possible It zooms between by mousewheel Signed-off-by: merttumer Change-Id: I8565c32ca3da1cd0fa3be4b88a9733f2f831a5a8 Reviewed-on: https://gerrit.libreoffice.org/67744 Reviewed-by: Aron Budea Tested-by: Aron Budea Reviewed-by: Jan Holesovsky diff --git a/loleaflet/src/map/handler/Map.Scroll.js b/loleaflet/src/map/handler/Map.Scroll.js index 9643def07..ee7f2cdd0 100644 --- a/loleaflet/src/map/handler/Map.Scroll.js +++ b/loleaflet/src/map/handler/Map.Scroll.js @@ -82,11 +82,26 @@ L.Map.Scroll = L.Handler.extend({ this._startTime = null; if (!delta) { return; } - if (map.options.scrollWheelZoom === 'center') { - map.setZoom(zoom + delta); - } else { - map.setZoomAround(this._lastMousePos, zoom + delta); + if (map.getDocType() === 'spreadsheet') { + if (delta > 0) { + map.setZoom(14); // 200% + } else { + map.setZoom(10); // 100% + } + } else { + map.setZoom(zoom + delta); + } + } else { // eslint-disable-next-line no-lonely-if + if (map.getDocType() === 'spreadsheet') { + if (delta > 0) { + map.setZoomAround(this._lastMousePos, 14); // 200% + } else { + map.setZoomAround(this._lastMousePos, 10); // 100% + } + } else { + map.setZoomAround(this._lastMousePos, zoom + delta); + } } } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/tile/TileLayer.js | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) New commits: commit d8ec4146ff4f365de21e733db07d679e91d9bd74 Author: merttumer AuthorDate: Thu Feb 14 22:01:34 2019 +0300 Commit: Mert Tümer CommitDate: Mon Feb 18 13:52:24 2019 +0100 Fix Typing causes the other view to jump back to its cursor This bug causes scrolling impossible when multiple users working on the same document. When one view is typing the others jump back to their cursors Change-Id: I8e028fbfcecd2123db8abe57f0ffedd3d35f2b21 Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/67846 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index e48f0f178..70a5bf376 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -89,6 +89,8 @@ L.TileLayer = L.GridLayer.extend({ this._visibleCursor = new L.LatLngBounds(new L.LatLng(0, 0), new L.LatLng(0, 0)); // Do we have focus - ie. should we render a cursor this._isFocused = true; + // Last cursor position for invalidation + this.lastCursorPos = this._visibleCursor.getNorthWest(); // Are we zooming currently ? - if so, no cursor. this._isZooming = false; // Cursor is visible or hidden (e.g. for graphic selection). @@ -792,17 +794,27 @@ L.TileLayer = L.GridLayer.extend({ this._visibleCursor = new L.LatLngBounds( this._twipsToLatLng(topLeftTwips, this._map.getZoom()), this._twipsToLatLng(bottomRightTwips, this._map.getZoom())); + var cursorPos = this._visibleCursor.getNorthWest(); if ((docLayer._followEditor || docLayer._followUser) && this._map.lastActionByUser) { this._map._setFollowing(false, null); } this._map.lastActionByUser = false; - if (!this._map._isFocused && this._map._permission === 'edit') { // Regain cursor if we had been out of focus and now have input. this._map.fire('editorgotfocus'); } - this._onUpdateCursor(this._viewId === modifierViewId); + //first time document open, set last cursor position + if (this.lastCursorPos.lat === 0 && this.lastCursorPos.lng === 0) + this.lastCursorPos = cursorPos; + + var updateCursor = false; + if ((this.lastCursorPos.lat !== cursorPos.lat) || (this.lastCursorPos.lng !== cursorPos.lng)) { + updateCursor = true; + this.lastCursorPos = cursorPos; + } + + this._onUpdateCursor(updateCursor && (modifierViewId === this._viewId)); }, _updateEditor: function(textMsg) { @@ -1616,7 +1628,6 @@ L.TileLayer = L.GridLayer.extend({ center = center.subtract(this._map.getSize().divideBy(2)); center.x = Math.round(center.x < 0 ? 0 : center.x); center.y = Math.round(center.y < 0 ? 0 : center.y); - if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) && !(this._selectionHandles.end && this._selectionHandles.end.isDragged) && !(docLayer._followEditor || docLayer._followUser)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) New commits: commit 3d8bec750fbcf4aba9fb2c60973c343d7e0ce435 Author: Eduard Ardeleanu AuthorDate: Wed Feb 13 17:28:00 2019 +0200 Commit: Jan Holesovsky CommitDate: Thu Feb 14 08:42:10 2019 +0100 loleaflet: fix ControlMenubar's DeleteSlide for presentation files Change-Id: Id45d112ce70029f2c102be3fc3cbff6afc2c8821 Reviewed-on: https://gerrit.libreoffice.org/67782 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky (cherry picked from commit 4bc56d3fd4bb9fb01fb974884c4a00fbe1833288) Reviewed-on: https://gerrit.libreoffice.org/67801 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 882481831..f97772ca8 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -756,10 +756,15 @@ L.Control.Menubar = L.Control.extend({ } else if (id === 'duplicatepage') { this._map.duplicatePage(); } else if (id === 'deletepage') { + var map = this._map; vex.dialog.confirm({ message: _('Are you sure you want to delete this slide?'), - callback: this._onDeleteSlide - }, this); + callback: function(e) { + if (e) { + map.deletePage(); + } + } + }); } else if (id === 'about') { this._map.showLOAboutDialog(); } else if (id === 'keyboard-shortcuts') { @@ -794,12 +799,6 @@ L.Control.Menubar = L.Control.extend({ this._map.sendUnoCommand(unoCommand); }, - _onDeleteSlide: function(e) { - if (e) { - this._map.deletePage(); - } - }, - _onItemSelected: function(e, item) { var self = e.data.self; var type = $(item).data('type'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/core/Socket.js |1 + loleaflet/src/map/Map.js |1 - 2 files changed, 1 insertion(+), 1 deletion(-) New commits: commit b00cbbe0da2a51ae5b76c47a2fee7b9d765be8df Author: Jan Holesovsky AuthorDate: Sun Feb 10 11:16:24 2019 +0100 Commit: Ashod Nakashian CommitDate: Sun Feb 10 16:07:09 2019 +0100 saveas: Explicitly ask for the command values only on saveas: The loadDocument() is called from many places, let's isolate the explicit call to sendInitUnoCommands() only to the SaveAs case. Change-Id: I685152d9915ee17e9f5b464aed27cf2d06075447 Reviewed-on: https://gerrit.libreoffice.org/67606 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index a5b3abf90..541dc92a0 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -705,6 +705,7 @@ L.Socket = L.Class.extend({ this._map.options.doc = docUrl; this._map.options.wopiSrc = encodeURIComponent(docUrl); this._map.loadDocument(); + this._map.sendInitUNOCommands(); } // var name = command.name; - ignored, we get the new name via the wopi's BaseFileName } diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 6880b4b1b..92d36160c 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -224,7 +224,6 @@ L.Map = L.Evented.extend({ loadDocument: function() { this._socket.connect(); - this.sendInitUNOCommands(); }, sendInitUNOCommands: 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) New commits: commit b3532ebb828035dc9db8c027472bd050494fce3c Author: Henry Castro AuthorDate: Wed Feb 6 23:02:32 2019 -0400 Commit: Jan Holesovsky CommitDate: Thu Feb 7 15:23:14 2019 +0100 loleaflet: disable Conditional Formatting Change-Id: Iad9150b16f56e9460a9277f29813419fc50de90c Reviewed-on: https://gerrit.libreoffice.org/67480 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index eb152f82a..882481831 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -362,15 +362,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:FormatMenu', 'spreadsheet'), type: 'menu', menu: [ {uno: '.uno:ResetAttributes'}, {uno: '.uno:FormatCellDialog'}, - {uno: '.uno:PageFormatDialog'}, - {name: _UNO('.uno:ConditionalFormatMenu', 'spreadsheet'), type: 'menu', menu: [ - {uno: '.uno:ConditionalFormatDialog'}, - {uno: '.uno:ColorScaleFormatDialog'}, - {uno: '.uno:DataBarFormatDialog'}, - {uno: '.uno:IconSetFormatDialog'}, - {uno: '.uno:CondDateFormatDialog'}, - {type: 'separator'}, - {uno: '.uno:ConditionalFormatManagerDialog'}]}, + {uno: '.uno:PageFormatDialog'} ]}, {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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |1 + loleaflet/src/unocommands.js |1 + 2 files changed, 2 insertions(+) New commits: commit 2f01abf56c7521d75bb6b7349275aa9002658efd Author: Henry Castro AuthorDate: Wed Feb 6 17:07:16 2019 -0400 Commit: Jan Holesovsky CommitDate: Thu Feb 7 14:40:52 2019 +0100 loleaflet: add menu item Format→Section Change-Id: Iad9150b16f56e9460a9286f29813419fc50de90c Reviewed-on: https://gerrit.libreoffice.org/67477 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index d49815751..eb152f82a 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -181,6 +181,7 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:ParagraphDialog'}, {uno: '.uno:OutlineBullet'}, {uno: '.uno:PageDialog'}, + {uno: '.uno:EditRegion'}, {type: 'separator'}, {uno: '.uno:FormatColumns'}, {type: 'separator'}, diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index e40ef6397..969a6292a 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -67,6 +67,7 @@ var unoCommandsArray = { DuplicateSlide:{presentation:{menu:_('Duplicate ~Slide'),},}, EditHeaderAndFooter:{spreadsheet:{menu:_('~Headers and Footers...'),},}, EditMenu:{global:{menu:_('~Edit'),},}, + EditRegion:{text:{menu:_('~Sections...'),}}, EditStyle:{global:{menu:_('~Edit Style...'),},presentation:{menu:_('E~dit Style...'),},}, EntireCell:{text:{menu:_('C~ell'),},}, EntireColumn:{presentation:{menu:_('~Columns'),},text:{menu:_('~Column'),},}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 -- 1 file changed, 2 deletions(-) New commits: commit e1b8692c7d32c51b1c3e9824b3ece1966851dc49 Author: Henry Castro AuthorDate: Wed Feb 6 15:53:50 2019 -0400 Commit: Jan Holesovsky CommitDate: Thu Feb 7 14:35:06 2019 +0100 loleaflet: disable Watermarking dialog Change-Id: I266fd6da07964a203f0a4a08f6641bdf82751a1c Reviewed-on: https://gerrit.libreoffice.org/67471 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 9a090f6c3..d49815751 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -182,8 +182,6 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:OutlineBullet'}, {uno: '.uno:PageDialog'}, {type: 'separator'}, - {uno: '.uno:Watermark'}, - {type: 'separator'}, {uno: '.uno:FormatColumns'}, {type: 'separator'}, {uno: '.uno:ResetAttributes'} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a6f2143edf43821c8c2f2c7d17eab97a8ed0a1b8 Author: merttumer AuthorDate: Thu Jan 24 18:30:31 2019 +0300 Commit: Jan Holesovsky CommitDate: Thu Feb 7 14:31:33 2019 +0100 Fix Print is not shown on readonly mode Change-Id: I360633cdaefafad42605b28aeffbbe4061bc4bdb Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/66876 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index c1ea59916..9a090f6c3 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -433,7 +433,7 @@ L.Control.Menubar = L.Control.extend({ allowedViewModeActions: [ 'downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 'downloadas-docx', 'downloadas-rtf', // file menu - 'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', // file menu + 'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 'print', // file menu 'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', // file menu 'fullscreen', 'zoomin', 'zoomout', 'zoomreset', // view menu 'about', 'keyboard-shortcuts' // help 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/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |9 + 1 file changed, 9 insertions(+) New commits: commit 3c9efeaad21159c11b43af614907ef9e5ddc6a61 Author: Szymon Kłos AuthorDate: Thu Feb 7 11:34:19 2019 +0100 Commit: Szymon Kłos CommitDate: Thu Feb 7 12:12:32 2019 +0100 Get languages, annotations, fonts on reload Change-Id: If713092dab75bb744cf9c584a30006558d8d738c diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index fe40b2dd8..6880b4b1b 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -224,6 +224,15 @@ L.Map = L.Evented.extend({ loadDocument: function() { this._socket.connect(); + this.sendInitUNOCommands(); + }, + + sendInitUNOCommands: function() { + // TODO: remove duplicated init code + this._socket.sendMessage('commandvalues command=.uno:LanguageStatus'); + this._socket.sendMessage('commandvalues command=.uno:ViewAnnotations'); + this.fire('updatescrolloffset'); + this._docLayer._getToolbarCommandsValues(); }, // public methods that modify map state ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/map/Map.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 7a274c80cf86cb069cfda11951bdaf3d88e7a64f Author: Szymon Kłos AuthorDate: Wed Jan 30 17:04:15 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Jan 30 17:05:55 2019 +0100 Check if annotation exists before use Change-Id: I79204a8baeaa7b2896b153475cde2ba873b28738 diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index a2c710eb5..fe40b2dd8 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -273,7 +273,8 @@ L.Map = L.Evented.extend({ for (var idxAnno in this._docLayer._annotations._items) { var annotation = this._docLayer._annotations._items[idxAnno]; var username = annotation._data.author; - annotation._data.avatar = this._viewInfoByUserName[username].userextrainfo.avatar; + if (this._viewInfoByUserName[username]) + annotation._data.avatar = this._viewInfoByUserName[username].userextrainfo.avatar; annotation._updateContent(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |9 - loleaflet/src/unocommands.js | 10 -- 2 files changed, 16 insertions(+), 3 deletions(-) New commits: commit efac83746f6cbe32892f26ec4506fff9e3f16779 Author: merttumer AuthorDate: Tue Jan 29 16:53:49 2019 +0300 Commit: Michael Meeks CommitDate: Tue Jan 29 14:57:59 2019 +0100 Added and updated Conditional Formatting Menu Change-Id: Icd1d471d22ade3f01705ce6f56d142bfb2f24c2e Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/67079 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 33e0dadbd..c1ea59916 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -364,7 +364,14 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:ResetAttributes'}, {uno: '.uno:FormatCellDialog'}, {uno: '.uno:PageFormatDialog'}, - {uno: '.uno:ConditionalFormatManagerDialog'} + {name: _UNO('.uno:ConditionalFormatMenu', 'spreadsheet'), type: 'menu', menu: [ + {uno: '.uno:ConditionalFormatDialog'}, + {uno: '.uno:ColorScaleFormatDialog'}, + {uno: '.uno:DataBarFormatDialog'}, + {uno: '.uno:IconSetFormatDialog'}, + {uno: '.uno:CondDateFormatDialog'}, + {type: 'separator'}, + {uno: '.uno:ConditionalFormatManagerDialog'}]}, ]}, {name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 'menu', menu: [ {name: _UNO('.uno:InsertRowsMenu', 'spreadsheet'), type: 'menu', menu: [ diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index 2f3710351..dac0e5a32 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -23,6 +23,7 @@ var unoCommandsArray = { ChangeCaseToUpper:{global:{menu:_('~UPPERCASE'),},}, ChangesMenu:{global:{menu:_('Track Chan~ges'),},}, ClearOutline:{global:{menu:_('~Remove Outline'),},}, + ColorScaleFormatDialog:{spreadsheet:{menu:_('Color Scale...'),},}, CommonAlignBottom:{global:{menu:_('Bottom'),},}, CommonAlignHorizontalCenter:{global:{menu:_('Centered'),},}, CommonAlignJustified:{global:{menu:_('Justified'),},}, @@ -30,13 +31,16 @@ var unoCommandsArray = { CommonAlignRight:{global:{menu:_('Right'),},}, CommonAlignTop:{global:{menu:_('Top'),},}, CommonAlignVerticalCenter:{global:{menu:_('Center'),},}, + CondDateFormatDialog:{spreadsheet:{menu:_('Date...'),},}, + ConditionalFormatDialog:{spreadsheet:{menu:_('Condition...'),},}, ConditionalFormatManagerDialog:{spreadsheet:{menu:_('Manage...'),},}, ConditionalFormatMenu:{spreadsheet:{menu:_('C~onditional Formatting'),},}, ContinueNumbering:{text:{menu:_('Continue previous numbering'),},}, ControlCodes:{text:{menu:_('For~matting Marks'),},}, - Copy:{global:{menu:_('~Copy'),},}, + Copy:{global:{menu:_('Cop~y'),},}, CopyHyperlinkLocation:{text:{menu:_('Copy Hyperlink Location'),},}, Cut:{global:{menu:_('~Cut'),},}, + DataBarFormatDialog:{spreadsheet:{menu:_('Data Bar...'),},}, DataFilterAutoFilter:{spreadsheet:{menu:_('Auto~Filter'),},}, DataFilterHideAutoFilter:{spreadsheet:{menu:_('~Hide AutoFilter'),},}, DataFilterRemoveFilter:{spreadsheet:{menu:_('~Reset Filter'),},}, @@ -92,6 +96,7 @@ var unoCommandsArray = { HideDetail:{global:{menu:_('~Hide Details'),},}, HideRow:{spreadsheet:{context:_('H~ide Rows'),menu:_('H~ide'),},}, HyperlinkDialog:{global:{context:_('Insert Hyperlink'),menu:_('~Hyperlink...'),},}, + IconSetFormatDialog:{spreadsheet:{menu:_('Icon Set...'),},}, IncrementIndent:{global:{context:_('Increase Indent'),menu:_('Increase Indent'),},}, IncrementLevel:{text:{menu:_('Promote One Level'),},}, IncrementSubLevels:{text:{menu:_('Promote One Level With Subpoints'),},}, @@ -114,6 +119,7 @@ var unoCommandsArray = { InsertIndexesEntry:{text:{menu:_('~Index Entry...'),},}, InsertLRM:{global:{menu:_('~Left-to-right mark'),},}, InsertMenu:{global:{menu:_('~Insert'),},}, + InsertMultiIndex:{text:{menu:_('Table of Contents, ~Index or Bibliography...'),},}, InsertNeutralParagraph:{text:{menu:_('Insert Unnumbered Entry'),},}, InsertNonBreakingSpace:{global:{menu:_('~Non-breaking space'),},}, InsertObjectChart:{global:{context:_('Insert
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 0fdedd7a2756a8d6ee43f75737a5cdfa14ddbbb0 Author: merttumer AuthorDate: Tue Jan 29 16:33:48 2019 +0300 Commit: Michael Meeks CommitDate: Tue Jan 29 14:36:27 2019 +0100 Added "Table of Contents, Index or Biblography" option to insert menu Change-Id: I6ee18c90ef2c254ca11387e5792412c21faa502b Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/67076 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 8a4477f8f..33e0dadbd 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -105,7 +105,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:InsertRLM'}]}, {name: _UNO('.uno:IndexesMenu', 'text'), type: 'menu', menu: [ {uno: '.uno:InsertIndexesEntry'}, - {uno: '.uno:InsertAuthoritiesEntry'}]}, + {uno: '.uno:InsertAuthoritiesEntry'}, + {uno: '.uno:InsertMultiIndex'}]}, ]}, {name: _UNO('.uno:FormatMenu', 'text'), type: 'menu', menu: [ {name: _UNO('.uno:FormatTextMenu', 'text'), 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/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 ++ 1 file changed, 2 insertions(+) New commits: commit 070c952dd45a67a7a355c15cd156cf1651359543 Author: merttumer AuthorDate: Fri Jan 18 21:38:48 2019 +0300 Commit: Jan Holesovsky CommitDate: Tue Jan 22 10:38:43 2019 +0100 added Watermark item on format menu Change-Id: I69fc50b44e4edf871f474c2baacecbb03ad7aabe Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/66629 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky (cherry picked from commit c3d67d6af2cdde6b2cd95cc72b3a0498a2f39c20) Reviewed-on: https://gerrit.libreoffice.org/66720 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 23eaffe23..df59cf5e1 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -181,6 +181,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:OutlineBullet'}, {uno: '.uno:PageDialog'}, {type: 'separator'}, + {uno: '.uno:Watermark'}, + {type: 'separator'}, {uno: '.uno:FormatColumns'}, {type: 'separator'}, {uno: '.uno:ResetAttributes'} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/layer/AnnotationManager.js | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit 98ed3013a88bf1c0a489bdfbc92391517aca98d7 Author: Szymon Kłos AuthorDate: Mon Jan 21 20:18:50 2019 +0100 Commit: Szymon Kłos CommitDate: Mon Jan 21 20:20:07 2019 +0100 Show correct avatar during comment insertion Change-Id: I86b373da8cf6f044fe745b00bc917787583780b9 diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index cc9615d32..339f3d269 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -827,12 +827,18 @@ L.AnnotationManager = L.Class.extend({ L.Map.include({ insertComment: function() { + var avatar = undefined; + var author = this.getViewName(this._docLayer._viewId); + if (author in this._viewInfoByUserName) { + avatar = this._viewInfoByUserName[author].userextrainfo.avatar; + } this._docLayer.newAnnotation({ text: '', textrange: '', - author: this.getViewName(this._docLayer._viewId), + author: author, dateTime: new Date().toDateString(), - id: 'new' // 'new' only when added by us + id: 'new', // 'new' only when added by us + avatar: avatar }); } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |4 1 file changed, 4 insertions(+) New commits: commit 7da863145d76aa57c36d14730c84f82bbdf72138 Author: Szymon Kłos AuthorDate: Tue Dec 18 17:22:28 2018 +0100 Commit: Jan Holesovsky CommitDate: Fri Jan 18 18:47:26 2019 +0100 Don't show modification indicator in read-only mode Change-Id: Ib9f8803c0524040d6debf4adbdd4de7fa47fa32c diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 53f19b561..23eaffe23 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -855,6 +855,10 @@ L.Control.Menubar = L.Control.extend({ continue; } + if (this._map._permission === 'readonly' && menu[i].id === 'last-mod') { + continue; + } + if (menu[i].type === 'action') { if ((menu[i].id === 'rev-history' && !revHistoryEnabled) || (menu[i].id === 'closedocument' && !closebutton)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Signing.js |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 524f6242a066105ae85d82ee2d583a5ba00c608f Author: Tomaž Vajngerl AuthorDate: Thu Jan 17 15:19:35 2019 +0100 Commit: Miklos Vajna CommitDate: Fri Jan 18 09:38:47 2019 +0100 use export,sign,upload codepath for DOCX and ODT too Change-Id: Ic6c397e3936bfd659a6b4e8627ba45dbd4e6ae25 (cherry picked from commit a5ca9620922adaeb2bbe75cffc06ed7ec68f498c) Reviewed-on: https://gerrit.libreoffice.org/66540 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 4195cb185..17d605128 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -368,7 +368,7 @@ function vereignUpload(documentType) { }); } -function vereignSignAndUploadPDF(documentType) { +function vereignExportSignAndUploadToVereign(documentType) { library.getOneTimeCertificateByPassport(currentPassport.uuid).then(function(result) { if (!isSuccess(result)) { return; @@ -417,10 +417,10 @@ function vereignSignAndUploadForType(uploadDocType) { if (documentType == null) return; - if (uploadDocType == 'PDF') { - vereignSignAndUploadPDF(documentType); + if (uploadDocType == 'PDF' || uploadDocType == 'DOCX' || uploadDocType == 'ODT') { + vereignExportSignAndUploadToVereign(documentType); } - else if (uploadDocType == 'DOCX' || uploadDocType == 'ODT') { + else { library.getOneTimeCertificateByPassport(currentPassport.uuid).then(function(result) { if (isSuccess(result)) { var otp = result.data; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 26 ++ loleaflet/src/unocommands.js |8 2 files changed, 26 insertions(+), 8 deletions(-) New commits: commit cc3c1097d8d291795cd430d8af3adc7b1c62a192 Author: Mert Tumer AuthorDate: Wed Jan 16 14:42:31 2019 +0300 Commit: Jan Holesovsky CommitDate: Wed Jan 16 16:43:34 2019 +0100 Added some items on Menubar On Writer: Insert->Section on Insert->Table of Contents and Index->Biblography Entry On Calc: Format->Page Insert->Headers/Footers Format->Conditional Formatting->Manage Tools->Goal Seek On Impress: Insert->Header and Footer Format->Bullets and Numbering Signed-off-by: Mert Tumer Change-Id: I55da2e6c4da5ac187357adc1b823da26afff424d Signed-off-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/66466 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index c6531158a..53f19b561 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -71,6 +71,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:InsertAnnotation', 'text'), id: 'insertcomment', type: 'action'}, {uno: '.uno:InsertObjectChart'}, {type: 'separator'}, + {uno: '.uno:InsertSection'}, {name: _UNO('.uno:InsertField', 'text'), type: 'menu', menu: [ {uno: '.uno:InsertPageNumberField'}, {uno: '.uno:InsertPageCountField'}, @@ -102,9 +103,10 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:InsertZWNBSP'}, {uno: '.uno:InsertLRM'}, {uno: '.uno:InsertRLM'}]}, - {uno: '.uno:InsertIndexesEntry'} - ] - }, +{name: _UNO('.uno:IndexesMenu', 'text'), type: 'menu', menu: [ + {uno: '.uno:InsertIndexesEntry'}, + {uno: '.uno:InsertAuthoritiesEntry'}]}, + ]}, {name: _UNO('.uno:FormatMenu', 'text'), type: 'menu', menu: [ {name: _UNO('.uno:FormatTextMenu', 'text'), type: 'menu', menu: [ {uno: '.uno:Bold'}, @@ -268,12 +270,16 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:HyperlinkDialog'}, {type: 'separator'}, - {uno: '.uno:InsertSymbol'}] + {uno: '.uno:InsertSymbol'}, + {type: 'separator'}, + {uno: '.uno:HeaderAndFooter'}] }, {name: _UNO('.uno:FormatMenu', 'presentation'), type: 'menu', menu: [ {uno: '.uno:TransformDialog'}, {uno: '.uno:FormatLine'}, - {uno: '.uno:FormatArea'}] + {uno: '.uno:FormatArea'}, + {type: 'separator'}, + {uno: '.uno:OutlineBullet'}] }, {name: _UNO('.uno:TableMenu', 'text'/*HACK should be 'presentation', but not in xcu*/), type: 'menu', menu: [ {name: _UNO('.uno:TableInsertMenu', 'text'/*HACK should be 'presentation', but not in xcu*/), type: 'menu', menu: [ @@ -342,11 +348,14 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:InsertAnnotation', 'spreadsheet'), id: 'insertcomment', type: 'action'}, {type: 'separator'}, {uno: '.uno:HyperlinkDialog'}, - {uno: '.uno:InsertSymbol'} + {uno: '.uno:InsertSymbol'}, + {uno: '.uno:EditHeaderAndFooter'} ]}, {name: _UNO('.uno:FormatMenu', 'spreadsheet'), type: 'menu', menu: [ {uno: '.uno:ResetAttributes'}, - {uno: '.uno:FormatCellDialog'} + {uno: '.uno:FormatCellDialog'}, + {uno: '.uno:PageFormatDialog'}, + {uno: '.uno:ConditionalFormatManagerDialog'} ]}, {name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 'menu',
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Signing.js | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 69b4ad7b5204d79b8c624a90819351c6148b4ada Author: Tomaž Vajngerl AuthorDate: Thu Jan 3 22:08:12 2019 +0100 Commit: Tomaž Vajngerl CommitDate: Thu Jan 3 22:10:31 2019 +0100 try default PIN first, fix wrong error condition, error reporting Change-Id: I2e04c3cba8a3d907b7f94471cd5a30439d34ef42 (cherry picked from commit 83ae7f93af7c866df6ac2e023388c9e627f81223) diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 46167f0c1..1c3230caa 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -213,7 +213,8 @@ function vereignLogin() { } else { vex.dialog.alert(_('Error at login.')); - console.log('Login Error: ' + result); + console.log('Error at login of previousa added device'); + console.log(result); identity = null; } }); @@ -239,7 +240,8 @@ function verignNewIdentity(newIdentity) { } else { vex.dialog.alert(_('Couldn\'t get the QR code image.')); - console.log('Login Error: ' + result); + console.log('Error getting the QR code'); + console.log(result); library.clearIdentities(); } }); @@ -263,7 +265,10 @@ function vereignRecoverFromEmail(emailOrSMS) { } var createdIdentity = result.data; library.identityRestoreAccess(result.data, emailOrSMS).then(function(result) { - if (isSuccess(result)) { + if (!isSuccess(result)) { + vex.dialog.alert(_('Error when trying to restore access to identity.')); + console.log('Error at IdentityRestoreAccess'); + console.log(result); return; } vex.dialog.open({ @@ -482,7 +487,7 @@ L.Map.include({ vereignRecoverFromEmailDialog(); } else if (selectedIdentityKey) { - vereignPinCodeDialog(selectedIdentityKey); + vereignLoadIdentity(selectedIdentityKey, ''); } } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Toolbar.js | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) New commits: commit 813746c7c2bdbac6af020132d4756b4a732193d5 Author: Andras Timar AuthorDate: Fri Dec 28 16:15:15 2018 +0100 Commit: Andras Timar CommitDate: Fri Dec 28 16:20:30 2018 +0100 Better width of About and Help popup windows on narrow and wide screens Change-Id: I61e639a8a70282dc9e18fa1a4107f0572370947f Reviewed-on: https://gerrit.libreoffice.org/65686 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index bdbf2a0d5..7e871a0db 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -180,7 +180,17 @@ L.Map.include({ }, showLOKeyboardHelp: function() { - var w = window.innerWidth / 2; + var w; + var iw = window.innerWidth; + if (iw < 768) { + w = iw - 30; + } + else if (iw > 1920) { + w = 960; + } + else { + w = iw / 5 + 590; + } var map = this; $.get('loleaflet-help.html', function(data) { vex.open({ @@ -254,7 +264,17 @@ L.Map.include({ content.find('#product-name').text(productName); var productString = _('This version of %productName is powered by'); content.find('#product-string').text(productString.replace('%productName', productName)); - var w = window.innerWidth / 2; + var w; + var iw = window.innerWidth; + if (iw < 768) { + w = iw - 30; + } + else if (iw > 1920) { + w = 960; + } + else { + w = iw / 5 + 590; + } var map = this; var handler = function(event) { if (event.keyCode === 68) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src wsd/DocumentBroker.cpp wsd/LOOLWSD.cpp wsd/reference.md wsd/Storage.cpp wsd/Storage.hpp
loleaflet/src/map/handler/Map.WOPI.js |5 + wsd/DocumentBroker.cpp|1 + wsd/LOOLWSD.cpp |2 +- wsd/Storage.cpp |7 ++- wsd/Storage.hpp |6 ++ wsd/reference.md |5 + 6 files changed, 24 insertions(+), 2 deletions(-) New commits: commit b8d27017a09119a2f08856542f5aa654e41570e4 Author: Jan Holesovsky AuthorDate: Wed Nov 14 20:16:26 2018 +0100 Commit: Andras Timar CommitDate: Thu Dec 20 13:00:21 2018 +0100 checkfileinfo: TemplateSaveAs to trigger PutRelativeFile... ...as the first thing after load. Change-Id: I8c372ebe0228682d4f1d7cb89fe80ea59455c5bb Reviewed-on: https://gerrit.libreoffice.org/65483 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js index b0d5a7750..cf0bf7013 100644 --- a/loleaflet/src/map/handler/Map.WOPI.js +++ b/loleaflet/src/map/handler/Map.WOPI.js @@ -92,6 +92,11 @@ L.Map.WOPI = L.Handler.extend({ } } }); + + if ('TemplateSaveAs' in wopiInfo) { + this._map.showBusy(_('Creating new file from template...'), false); + this._map.saveAs(wopiInfo['TemplateSaveAs']); + } }, resetAppLoaded: function() { diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 631f95a39..449ef0353 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -542,6 +542,7 @@ bool DocumentBroker::load(const std::shared_ptr& session, const s wopifileinfo->setHideExportOption(true); wopiInfo->set("BaseFileName", wopiStorage->getFileInfo().getFilename()); +wopiInfo->set("TemplateSaveAs", wopifileinfo->getTemplateSaveAs()); wopiInfo->set("HidePrintOption", wopifileinfo->getHidePrintOption()); wopiInfo->set("HideSaveOption", wopifileinfo->getHideSaveOption()); wopiInfo->set("HideExportOption", wopifileinfo->getHideExportOption()); diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 7907fbf3d..5a5215ec2 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2781,7 +2781,7 @@ private: capabilities->set("convert-to", convert_to); // Supports the TemplateSaveAs in CheckFileInfo? -capabilities->set("hasTemplateSaveAs", false); +capabilities->set("hasTemplateSaveAs", true); // Version capabilities->set("version", LOOLWSD_VERSION); diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index ebb5acd42..a5ebcdc39 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -484,6 +484,7 @@ std::unique_ptr WopiStorage::getWOPIFileInfo(const Au std::string obfuscatedUserId; std::string userExtraInfo; std::string watermarkText; +std::string templateSaveAs; bool canWrite = false; bool enableOwnerTermination = false; std::string postMessageOrigin; @@ -515,6 +516,7 @@ std::unique_ptr WopiStorage::getWOPIFileInfo(const Au JsonUtil::findJSONValue(object, "OwnerId", ownerId); JsonUtil::findJSONValue(object, "UserId", userId); JsonUtil::findJSONValue(object, "UserFriendlyName", userName); +JsonUtil::findJSONValue(object, "TemplateSaveAs", templateSaveAs); // Anonymize key values. if (LOOLWSD::AnonymizeFilenames || LOOLWSD::AnonymizeUsernames) @@ -550,7 +552,10 @@ std::unique_ptr WopiStorage::getWOPIFileInfo(const Au object->remove("ObfuscatedUserId"); if (LOOLWSD::AnonymizeFilenames) +{ object->remove("BaseFileName"); +object->remove("TemplateSaveAs"); +} if (LOOLWSD::AnonymizeUsernames) { @@ -604,7 +609,7 @@ std::unique_ptr WopiStorage::getWOPIFileInfo(const Au setFileInfo(FileInfo({filename, ownerId, modifiedTime, size})); return std::unique_ptr(new WOPIFileInfo( -{userId, obfuscatedUserId, userName, userExtraInfo, watermarkText, canWrite, +{userId, obfuscatedUserId, userName, userExtraInfo, watermarkText, templateSaveAs, canWrite, postMessageOrigin, hidePrintOption, hideSaveOption, hideExportOption, enableOwnerTermination, disablePrint, disableExport, disableCopy, disableInactiveMessages, userCanNotWriteRelative, enableInsertRemoteImage, enableShare, diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp index 3591ac8b1..bf228721a 100644 --- a/wsd/Storage.hpp +++ b/wsd/Storage.hpp @@ -311,6 +311,7 @@ public: const std::string& username, const std::string& userExtraInfo, const std::string& watermarkText, + const std::string& templateSaveAs, const bool userCanWrite, const std::string&
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Signing.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dff4e330d58f96566503b3d6edaa0e0a71277fac Author: Andras Timar AuthorDate: Thu Dec 13 09:27:01 2018 +0100 Commit: Andras Timar CommitDate: Thu Dec 13 09:28:01 2018 +0100 PIN code input field should be 'password' type Change-Id: Ia811eb8b8b410c799034cb1ae6905797dfb32a0b (cherry picked from commit 53394dd3cfa518a4230cb249de17f4417a922e5b) diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 78066279f..d469458b7 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -154,7 +154,7 @@ function adjustUIState() { function vereignPinCodeDialog(selectedIdentityKey) { vex.dialog.open({ message: _('PIN Code'), - input: '', + input: '', callback: function(data) { console.log(data.pincode); if (data.pincode) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Signing.js |5 + 1 file changed, 5 insertions(+) New commits: commit 7eb217af7fcd0d46f92ef20645156cd18e442de1 Author: Szymon Kłos AuthorDate: Tue Dec 11 17:08:37 2018 +0100 Commit: Andras Timar CommitDate: Wed Dec 12 08:58:12 2018 +0100 Don't show '<<' button in the signing toolbar Change-Id: Ie178add1812735ac4653b0aedab58f70a8b6f0e8 (cherry picked from commit 375a1a60789a1871b0209f4699680f48410c5a40) diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index d4113cc67..78066279f 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -272,6 +272,11 @@ L.Map.include({ oldtoolbarSize = $('#document-container').css('top'); $('#document-container').css('top', '110px'); + + // Avoid scroll button ">>" + var el = w2ui['document-signing-bar']; + if (el) + el.resize(); }, hideSignDocument: function() { $('#document-signing-bar').hide(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
loleaflet/src/control/Signing.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a3c4a24d2b008e38ab8efbf33add2e56cbf6338c Author: Andras Timar AuthorDate: Mon Dec 10 15:49:10 2018 +0100 Commit: Andras Timar CommitDate: Mon Dec 10 15:49:10 2018 +0100 Revert "signing: update end point URL suffix to work again" This reverts commit 37425878ea181f755233357d2dce834039c1f468. diff --git a/loleaflet/src/control/Signing.js b/loleaflet/src/control/Signing.js index 183d5ed88..d4113cc67 100644 --- a/loleaflet/src/control/Signing.js +++ b/loleaflet/src/control/Signing.js @@ -421,7 +421,7 @@ L.Map.include({ } } }, - vereignURL + '/vcl/js/iframe' + vereignURL + '/api/js/iframe' ).then(function(lib) { library = lib; adjustUIState(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits