[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.StatusBar.js |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 4fa5b43b628152eeca05684ff6704f88d0445f04 Author: Pranam Lashkari AuthorDate: Tue Sep 29 23:14:56 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 29 22:34:15 2020 +0200 leaflet: translate: fix language list localisation Change-Id: Ie505b91e2b5b212351a33a4751ee5889a6cb10f1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103651 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 0a82d5c6f..a08d3d372 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -503,7 +503,7 @@ L.Control.StatusBar = L.Control.extend({ var noneLang = _('None (Do not check spelling)'); var languages = []; e.commandValues.forEach(function (language) { - languages.push({ translated: _(language), neutral: language }); + languages.push({ translated: _(language.split(';')[0]), neutral: language }); }); languages.sort(function (a, b) { return a.translated < b.translated ? -1 : a.translated > b.translated ? 1 : 0; @@ -518,9 +518,8 @@ L.Control.StatusBar = L.Control.extend({ for (var lang in languages) { translated = languages[lang].translated; neutral = languages[lang].neutral; - var splitTranslated = translated.split(';'); var splitNeutral = neutral.split(';'); - toolbaritems.push({ id: neutral, text: splitTranslated[0], uno: constLang + encodeURIComponent('Default_' + splitNeutral[0]) }); + toolbaritems.push({ id: neutral, text: translated, uno: constLang + encodeURIComponent('Default_' + splitNeutral[0]) }); } toolbaritems.push({ id: 'reset', text: resetLang, uno: constLang + constDefault }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Permission.js |3 +++ loleaflet/src/map/Map.js|3 +++ 2 files changed, 6 insertions(+) New commits: commit ccfc81dc020560c7d5287c098b85834003e8b89c Author: Tor Lillqvist AuthorDate: Mon Sep 28 12:58:13 2020 +0300 Commit: Tor Lillqvist CommitDate: Mon Sep 28 17:48:07 2020 +0200 tdf#136459: Show the spreadsheet formula input bar when switching to edit mode Factor out a code snippet from L.Map._onResize() into a function called showCalcInputBar(). Call that (in the iOS app in iPad case, which is what the bug is about) from L.Map._enterEditMode(). Seems to work. No idea if this is the ideal solution. Change-Id: I29677201212b37ebb292591b217741d8301dfa15 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103542 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103551 diff --git a/loleaflet/src/control/Permission.js b/loleaflet/src/control/Permission.js index 6d4868919..4bef3b8dd 100644 --- a/loleaflet/src/control/Permission.js +++ b/loleaflet/src/control/Permission.js @@ -100,6 +100,9 @@ L.Map.include({ this.setZoom(10); } + if (window.ThisIsTheiOSApp && window.mode.isTablet() && this._docLayer._docType === 'spreadsheet') + this.showCalcInputBar(0); + if (window.ThisIsTheAndroidApp) window.postMobileMessage('EDITMODE on'); }, diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 70f22c605..db096ab22 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -1277,7 +1277,10 @@ L.Map = L.Evented.extend({ } } } + this.showCalcInputBar(deckOffset); + }, + showCalcInputBar: function(deckOffset) { if (this.dialog._calcInputBar && !this.dialog._calcInputBar.isPainting) { var id = this.dialog._calcInputBar.id; var calcInputbar = L.DomUtil.get('calc-inputbar'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js |7 + loleaflet/src/control/Control.Menubar.js |6 loleaflet/src/control/Control.StatusBar.js |7 - loleaflet/src/control/Control.Toolbar.js |4 +++ loleaflet/src/control/Control.UIManager.js | 38 +++-- loleaflet/src/map/Map.js |7 +++-- 6 files changed, 54 insertions(+), 15 deletions(-) New commits: commit f7f4464b3c835ccaacf5519ad7ef9ef0bc98d668 Author: mert AuthorDate: Tue Jun 9 20:23:48 2020 +0300 Commit: Mert Tumer CommitDate: Mon Sep 28 11:53:34 2020 +0200 Save and restore UI element states via localStorage Also handle Show/Hide sidebar with localstorage Change-Id: I2e6f8b7480d7d55173a3324b819f6e4e829e512f Signed-off-by: mert Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96511 Tested-by: Jenkins CollaboraOffice diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 23fe890cd..87b97e9cf 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -1092,6 +1092,9 @@ L.Control.LokDialog = L.Control.extend({ else $(panel).parent().hide(); + if (window.initSidebarState) + this._map.uiManager.setSavedState('ShowSidebar', width > 1); + // Render window. this._sendPaintWindowRect(id); } else { @@ -1141,6 +1144,8 @@ L.Control.LokDialog = L.Control.extend({ this._createDialogCursor(strId); this._postLaunch(id, panelContainer, panelCanvas); + if (window.initSidebarState) + this._map.uiManager.setSavedState('ShowSidebar', true); }, _postLaunch: function(id, panelContainer, panelCanvas) { @@ -1409,6 +1414,8 @@ L.Control.LokDialog = L.Control.extend({ this._map.focus(); } $('#document-container').addClass('sidebar-closed'); + if (window.initSidebarState) + this._map.uiManager.setSavedState('ShowSidebar', false); }, _onCalcInputBarClose: function(dialogId) { diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index d3e3988a7..2dd0a6979 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -1309,6 +1309,12 @@ L.Control.Menubar = L.Control.extend({ return; } + if (unoCommand.startsWith('.uno:Sidebar') || unoCommand.startsWith('.uno:SlideMasterPage') || + unoCommand.startsWith('.uno:ModifyPage') || unoCommand.startsWith('.uno:SlideChangeWindow') || + unoCommand.startsWith('.uno:CustomAnimation') || unoCommand.startsWith('.uno:MasterSlidesPanel')) { + window.initSidebarState = true; + } + this._map.sendUnoCommand(unoCommand); }, diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 62f368403..0a82d5c6f 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -397,12 +397,7 @@ L.Control.StatusBar = L.Control.extend({ if (statusbar) statusbar.refresh(); - var showStatusbar = true; - if (window.uiDefaults) { - if (window.uiDefaults[docType]) { - showStatusbar = window.uiDefaults[docType].ShowStatusbar !== false; - } - } + var showStatusbar = this.map.uiManager.getSavedStateOrDefault('ShowStatusbar'); if (showStatusbar) $('#toolbar-down').show(); else diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 7fa110194..97767962d 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -70,6 +70,10 @@ function onClick(e, id, item) { throw new Error('unknown id: ' + id); } + if (id === 'sidebar' || id === 'modifypage' || id === 'slidechangewindow' || id === 'customanimation' || id === 'masterslidespanel') { + window.initSidebarState = true; + } + // In the iOS app we don't want clicking on the toolbar to pop up the keyboard. if (!window.ThisIsTheiOSApp && id !== 'zoomin' && id !== 'zoomout' && id !== 'mobile_wizard' && id !== 'insertion_mobile_wizard') { map.focus(map.canAcceptKeyboardInput()); // Maintain same keyboard state. diff --git a/loleaflet/src/control/Control.UIManager.js b/loleaflet/src/control/Control.UIMa
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Parts.js | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) New commits: commit b8025ec431226fe3a3d19ec46b660978edf2c1b9 Author: gokaysatir AuthorDate: Wed Sep 23 17:10:56 2020 +0300 Commit: Henry Castro CommitDate: Thu Sep 24 16:54:27 2020 +0200 Loleaflet: Show sheet feature is enabled also for mobile. Change-Id: I60dd7354ee5e54c00e8ea78f93d15b34ab5c1fda Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103259 Tested-by: Jenkins CollaboraOffice Tested-by: Henry Castro Reviewed-by: Henry Castro diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js index 427a3238f..0e52e7472 100644 --- a/loleaflet/src/control/Parts.js +++ b/loleaflet/src/control/Parts.js @@ -2,6 +2,9 @@ /* * Document parts switching and selecting handler */ + +/* global vex */ + L.Map.include({ setPart: function (part, external, calledFromSetPartHandler) { var docLayer = this._docLayer; @@ -345,7 +348,43 @@ L.Map.include({ showPage: function () { if (this.getDocType() === 'spreadsheet' && this.hasAnyHiddenPart()) { - this._socket.sendMessage('uno .uno:Show'); + var partNames_ = this._docLayer._partNames; + var hiddenParts_ = this._docLayer._hiddenParts; + + if (hiddenParts_.length > 0) { + var container = document.createElement('div'); + container.style.maxHeight = '300px'; + container.style.maxWidth = '200px'; + for (var i = 0; i < hiddenParts_.length; i++) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.id = 'hidden-part-checkbox-' + String(hiddenParts_[i]); + var label = document.createElement('label'); + label.htmlFor = 'hidden-part-checkbox-' + String(hiddenParts_[i]); + label.innerText = partNames_[hiddenParts_[i]]; + var newLine = document.createElement('br'); + container.appendChild(checkbox); + container.appendChild(label); + container.appendChild(newLine); + } + } + + var socket_ = this._socket; + vex.dialog.confirm({ + unsafeMessage: container.outerHTML, + callback: function (value) { + if (value === true) { + var checkboxList = document.querySelectorAll('input[id^="hidden-part-checkbox"]'); + for (var i = 0; i < checkboxList.length; i++) { + if (checkboxList[i].checked === true) { + var partName_ = partNames_[parseInt(checkboxList[i].id.replace('hidden-part-checkbox-', ''))]; + var argument = {aTableName: {type: 'string', value: partName_}}; + socket_.sendMessage('uno .uno:Show ' + JSON.stringify(argument)); + } + } + } + } + }); } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d529fa418f5dd1d12a9280144731776d1b0d0909 Author: Michael Meeks AuthorDate: Wed Sep 23 16:08:00 2020 +0200 Commit: Jan Holesovsky CommitDate: Wed Sep 23 16:52:35 2020 +0200 Fix re-rendering - the sheet ended up with no content. Change-Id: I1607c35a66f23ab83a5de46bd30b227a28ed82cb Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103257 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 285fa11c3..f4cb1eef9 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -461,7 +461,7 @@ L.CanvasTileLayer = L.TileLayer.extend({ } canvas.closePath(); }; - this._painter.clear(); + this._painter.update(); }, hasSplitPanesSupport: function () { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js |2 ++ 1 file changed, 2 insertions(+) New commits: commit c239143539c257b6499ab3d6d4598082b17ae200 Author: Szymon Kłos AuthorDate: Wed Sep 23 09:24:42 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Sep 23 09:49:19 2020 +0200 LokDialog: Remember tooltip position Change-Id: Ib3d6ca3d554ed2ebf47b5012b5101fbf194a970d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103229 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 2be933037..23fe890cd 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -345,6 +345,8 @@ L.Control.LokDialog = L.Control.extend({ this._dialogs[parentId].childid = e.id; this._dialogs[parentId].childwidth = width; this._dialogs[parentId].childheight = height; + this._dialogs[parentId].childx = left; + this._dialogs[parentId].childy = top; if (e.winType === 'tooltip') this._dialogs[parentId].childistooltip = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 35e1fae9f23f84e78453d1e4a374772306d21d7f Author: Szymon Kłos AuthorDate: Tue Sep 22 13:05:43 2020 +0200 Commit: Andras Timar CommitDate: Tue Sep 22 20:40:05 2020 +0200 Resize tunneled tooltips on invalidation Prevent us from showing leftovers from previous (longer) tooltip. Change-Id: Ic35238c6a9780c975f90ee76b1c12b92065b4f1b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103185 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index c1abe867f..2be933037 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -373,6 +373,17 @@ L.Control.LokDialog = L.Control.extend({ var parent = this._getParentId(e.id); var rectangle = e.rectangle; if (parent) { // this is a floating window + if (e.rectangle && this._dialogs[parent].childistooltip === true) { + // resize tooltips on invalidation + left = this._dialogs[parent].childx; + top = this._dialogs[parent].childy; + width = parseInt(e.rectangle.split(',')[2]); + height = parseInt(e.rectangle.split(',')[3]); + this._dialogs[parent].childwidth = width; + this._dialogs[parent].childheight = height; + this._createDialogChild(e.id, parent, top, left); + } + rectangle = this._createRectStr(null, 0, 0, this._dialogs[parent].childwidth, this._dialogs[parent].childheight); } else if (rectangle) { // this is the actual dialog if (this._isRectangleValid(rectangle)) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1f63272e80e1943f28f314c5e2b01f6373fd6f56 Author: Szymon Kłos AuthorDate: Thu Sep 17 13:32:29 2020 +0200 Commit: Szymon Kłos CommitDate: Tue Sep 22 13:09:26 2020 +0200 jsdialog: send FillColor as number Change-Id: Iab85bd2cc6ab082c368ec2a8669c9ce384305d24 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102921 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103140 Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index b3518afd4..88ae1e0a6 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1817,7 +1817,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ gradientItem.endcolor = color; builder.map.sendUnoCommand('.uno:FillPageGradient?FillPageGradientJSON:string=' + JSON.stringify(gradientItem)); return; - } else if (data.id === 'Color' || data.id === 'CharBackColor') { + } else if (data.id === 'Color' || data.id === 'CharBackColor' || data.id === 'FillColor') { var params = {}; params[data.id] = { type : 'long', ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarBuilder.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 1e92fd545106f0935231f5b5dce90734cef608ad Author: Szymon Kłos AuthorDate: Tue Sep 22 08:51:51 2020 +0200 Commit: Szymon Kłos CommitDate: Tue Sep 22 09:43:55 2020 +0200 notebookbar: toggle hamburger menu on click Change-Id: I3593f46ea962a225c56202fb07f804a2f69c151e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103135 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index d0b507564..333240b1f 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -348,7 +348,6 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ $(control.container).unbind('click'); $(control.container).click(function () { - console.log(builder.options.map); L.control.menubar()._executeAction.bind({_map: builder.options.map})(undefined, {id: data.id}); }); }, @@ -715,6 +714,9 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ }); $(menuHtml[0]).children('a').html(''); + $(menuHtml[0]).children('a').click(function () { + $(control.container).smartmenus('menuHideAll'); + }); $(control.container).bind('beforeshow.smapi', {self: menubar}, menubar._beforeShow); $(control.container).bind('click.smapi', {self: menubar}, menubar._onClicked); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/Annotation.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 31c931658d5f7ed453a05085c3286f70fe769e46 Author: Pranam Lashkari AuthorDate: Mon Sep 21 19:25:54 2020 +0530 Commit: Pranam Lashkari CommitDate: Mon Sep 21 18:15:21 2020 +0200 leaflet: show annotation marker only from the selected slide Change-Id: I6a9950f8f5be0f6e7393faf4f8718b94ffb05ebc Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103114 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index dc4f94633..6a8701dc7 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -485,7 +485,8 @@ L.Annotation = L.Layer.extend({ }), draggable: true }); - this._map.addLayer(this._annotationMarker); + if (this._map._docLayer._partHashes[this._map._docLayer._selectedPart] == this._data.parthash) + this._map.addLayer(this._annotationMarker); } if (this._data.rectangle != null) { var stringTwips = this._data.rectangle.match(/\d+/g); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.TouchGesture.js | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) New commits: commit c43aeb3e35a99c2f35bb817037d2451dc8731ae5 Author: mert AuthorDate: Wed Sep 16 17:31:46 2020 +0300 Commit: Andras Timar CommitDate: Mon Sep 21 17:20:06 2020 +0200 Fix pinch gesture causes hammer to stuck on Mobile Change-Id: If0ae311346ae9c9935ebacde3bc5ea874833 Signed-off-by: mert Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102873 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index 689e9104f..ce3ca184e 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -53,9 +53,20 @@ L.Map.TouchGesture = L.Handler.extend({ var tripleTap = new Hammer.Tap({event: 'tripletap', taps: 3, posThreshold: posThreshold }); this._hammer.add(tripleTap); tripleTap.recognizeWith([doubleTap, singleTap]); - + var hammer = this._hammer; if (L.Browser.touch) { - L.DomEvent.on(this._map._mapPane, 'touchstart touchmove touchend touchcancel', L.DomEvent.preventDefault); + L.DomEvent.on(this._map._mapPane, 'touchstart touchmove touchcancel', L.DomEvent.preventDefault); + L.DomEvent.on(this._map._mapPane, 'touchend', function(e) { + // sometimes inputs get stuck in hammer and further events get mixed with the old ones + // this causes to a failure to use all the gestures properly. + // This is a workaround until it is fixed by hammer.js + if (hammer.input) { + if (hammer.input.store) { + hammer.input.store = []; + } + } + L.DomEvent.preventDefault(e); + }); } if (Hammer.prefixed(window, 'PointerEvent') !== undefined) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/core/Socket.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 4f41ac60968d478fbbb27be0632b6defafe17744 Author: Tamás Zolnai AuthorDate: Fri Sep 18 16:29:01 2020 +0200 Commit: Tamás Zolnai CommitDate: Mon Sep 21 12:54:56 2020 +0200 Fix missing InputBar and sidebar in Calc. _isReady() can be true even if the _docLayer is not created yet and in this case we dropped the window messages which should have triggered the input bar and the sidebar creation. cypress tests were failing because of this issue sometimes. Change-Id: Ifda1d66c952c65c420db06bfd61918411426ae93 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103010 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 750e98bd6..0cfe7003f 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -892,7 +892,7 @@ L.Socket = L.Class.extend({ } var msgDelayed = false; - if (!this._isReady() || this._delayedMessages.length || this._handlingDelayedMessages) { + if (!this._isReady() || !this._map._docLayer || this._delayedMessages.length || this._handlingDelayedMessages) { msgDelayed = this._tryToDelayMessage(textMsg); } @@ -919,7 +919,7 @@ L.Socket = L.Class.extend({ }, _handleDelayedMessages: function() { - if (!this._isReady() || this._handlingDelayedMessages) { + if (!this._isReady() || !this._map._docLayer || this._handlingDelayedMessages) { var that = this; // Retry in a bit. this._delayedMsgHandlerTimeoutId = setTimeout(function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.TouchGesture.js |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 283e3951ce69d638a7cae870aecf362280b4acc2 Author: Henry Castro AuthorDate: Fri Aug 14 09:43:08 2020 -0400 Commit: Andras Timar CommitDate: Mon Sep 21 11:21:50 2020 +0200 mobile: pre-condition if they are numbers The hammer library sometimes or random when consecutively pinch events, the center and scale has infinity values Change-Id: Ide6605bcbc0c7b4818fd27b7b44706fb8122d80a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100744 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit 091eca0ae421ca436ba95ea1e478909f2a18d0a7) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103047 diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index 895977228..689e9104f 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -515,6 +515,9 @@ L.Map.TouchGesture = L.Handler.extend({ }, _onPinchStart: function (e) { + if (isNaN(e.center.x) || isNaN(e.center.y)) + return; + this._pinchStartCenter = {x: e.center.x, y: e.center.y}; if (this._map._docLayer.isCursorVisible()) { this._map._docLayer._cursorMarker.setOpacity(0); @@ -537,7 +540,7 @@ L.Map.TouchGesture = L.Handler.extend({ }, _onPinch: function (e) { - if (!this._pinchStartCenter) + if (!this._pinchStartCenter || isNaN(e.center.x) || isNaN(e.center.y)) return; // we need to invert the offset or the map is moved in the opposite direction @@ -554,6 +557,9 @@ L.Map.TouchGesture = L.Handler.extend({ }, _onPinchEnd: function () { + if (!this._pinchStartCenter) + return; + var oldZoom = this._map.getZoom(), zoomDelta = this._zoom - oldZoom, finalZoom = this._map._limitZoom(zoomDelta > 0 ? Math.ceil(this._zoom) : Math.floor(this._zoom)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 37 ++-- 1 file changed, 24 insertions(+), 13 deletions(-) New commits: commit 224526c9678be37b4ac4258b1f01c7df473c50bc Author: Michael Meeks AuthorDate: Sat Sep 19 21:47:34 2020 +0100 Commit: Michael Meeks CommitDate: Mon Sep 21 09:57:16 2020 +0200 calc grid: render during canvas 'clear' if we can. Also re-render as soon as we have grid positions. Change-Id: I57095683e662991badcb3a58832c81ebb3bc460d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103043 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 15d813939..285fa11c3 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -130,12 +130,22 @@ L.CanvasTilePainter = L.Class.extend({ } }, - clear: function () { - if (this._layer._debug) - this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)'; + clear: function (ctx) { + // First render the background / sheet grid if we can + if (this.renderBackground) + { + if (!ctx) + ctx = this._paintContext(); + this.renderBackground(this._canvasCtx, ctx); + } else - this._canvasCtx.fillStyle = 'white'; - this._canvasCtx.fillRect(0, 0, this._pixWidth, this._pixHeight); + { + if (this._layer._debug) + this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)'; + else + this._canvasCtx.fillStyle = 'white'; + this._canvasCtx.fillRect(0, 0, this._pixWidth, this._pixHeight); + } }, // Details of tile areas to render @@ -265,11 +275,13 @@ L.CanvasTilePainter = L.Class.extend({ if (skipUpdate) return; + var ctx; if (resizeCanvas || scaleChanged) { this._setCanvasSize(newSize.x, newSize.y); } else if (mapSizeChanged && topLeftChanged) { - this.clear(); + ctx = this._paintContext(); + this.clear(ctx); } if (mapSizeChanged) @@ -282,24 +294,22 @@ L.CanvasTilePainter = L.Class.extend({ this._lastPart = part; this._topLeft = newTopLeft; - this._paintWholeCanvas(); + this._paintWholeCanvas(ctx); if (this._layer._debug) this._drawSplits(); }, - _paintWholeCanvas: function () { + _paintWholeCanvas: function(ctx) { var zoom = this._lastZoom || Math.round(this._map.getZoom()); var part = this._lastPart || this._layer._selectedPart; // Calculate all this here intead of doing it per tile. - var ctx = this._paintContext(); - - // First render the background / sheet grid if we can - if (this.renderBackground) - this.renderBackground(this._canvasCtx, ctx); + if (!ctx) + ctx = this._paintContext(); + this.clear(ctx); var tileRanges = ctx.paneBoundsList.map(this._layer._pxBoundsToTileRange, this._layer); for (var rangeIdx = 0; rangeIdx < tileRanges.length; ++rangeIdx) { @@ -451,6 +461,7 @@ L.CanvasTileLayer = L.TileLayer.extend({ } canvas.closePath(); }; + this._painter.clear(); }, hasSplitPanesSupport: function () { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js | 61 - loleaflet/src/layer/tile/CanvasTileLayer.js | 66 2 files changed, 66 insertions(+), 61 deletions(-) New commits: commit 3a93ada13f4030b20601ecd4a345b931bf670c0b Author: Jan Holesovsky AuthorDate: Thu Sep 17 17:47:07 2020 +0200 Commit: Jan Holesovsky CommitDate: Thu Sep 17 21:34:10 2020 +0200 grid lines: Setup renderBackground only after _painter exists. This fixes setup of many cypress tests. Change-Id: I4eb626050d2d4202104ab01a6aa0b01248ae4eb5 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102965 Tested-by: Jan Holesovsky Reviewed-by: Jan Holesovsky diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 54abd8731..439f0d8cd 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -739,67 +739,6 @@ L.CalcTileLayer = BaseTileLayer.extend({ converter: this._twipsToPixels, context: this }); - var that = this; - this._painter.renderBackground = function(canvas, ctx) - { - if (this._layer._debug) - this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)'; - else - this._canvasCtx.fillStyle = 'white'; // FIXME: sheet bg color - this._canvasCtx.fillRect(0, 0, ctx.canvasSize.x, ctx.canvasSize.y); - - if (that._debug) - canvas.strokeStyle = 'blue'; - else // now fr some grid-lines ... - canvas.strokeStyle = '#c0c0c0'; - canvas.lineWidth = 1.0; - - canvas.beginPath(); - for (var i = 0; i < ctx.paneBoundsList.length; ++i) { - // FIXME: de-duplicate before firing myself: - - // co-ordinates of this pane in core document pixels - var paneBounds = that._cssBoundsToCore(ctx.paneBoundsList[i]); - // co-ordinates of the main-(bottom right) pane in core document pixels - var viewBounds = that._cssBoundsToCore(ctx.viewBounds); - // into real pixel-land ... - paneBounds.round(); - viewBounds.round(); - - var paneOffset = paneBounds.getTopLeft(); // allocates - // Cute way to detect the in-canvas pixel offset of each pane - paneOffset.x = Math.min(paneOffset.x, viewBounds.min.x); - paneOffset.y = Math.min(paneOffset.y, viewBounds.min.y); - - // when using the pinch to zoom, set additional translation based */ - // on the pinch movement - if (that._map._animatingZoom) { - var centerOffset = this._map._getCenterOffset(this._map._animateToCenter); - paneOffset.x += Math.round(centerOffset.x); - paneOffset.y += Math.round(centerOffset.y); - } - - // URGH -> zooming etc. (!?) ... - if (that.sheetGeometry._columns) - that.sheetGeometry._columns.forEachInCorePixelRange( - paneBounds.min.x, paneBounds.max.x, - function(pos) { - canvas.moveTo(pos - paneOffset.x - 0.5, paneBounds.min.y - paneOffset.y - 0.5); - canvas.lineTo(pos - paneOffset.x - 0.5, paneBounds.max.y - paneOffset.y - 0.5); - canvas.stroke(); - }); - - if (that.sheetGeometry._rows) - that.sheetGeometry._rows.forEachInCorePixelRange( - paneBounds.min.y, paneBounds.max.y, - function(pos) { - canvas.moveTo(paneBounds.min.x - paneOffset.x - 0.5, pos - paneOffset.y - 0.5); - canvas.lineTo(paneBounds.max.x - paneOffset.x - 0.5, pos - paneOffset.y - 0.5); - canvas.stroke(); -
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js | 101 ++-- loleaflet/src/layer/tile/CanvasTileLayer.js | 23 +++--- 2 files changed, 109 insertions(+), 15 deletions(-) New commits: commit 8093b8941a30ebff087f5563a1115e3438de3dc3 Author: Michael Meeks AuthorDate: Wed Sep 9 10:05:44 2020 +0100 Commit: Jan Holesovsky CommitDate: Thu Sep 17 21:33:22 2020 +0200 calc canvas: start of direct grid rendering. Change-Id: If471fc4ff94b3cb8e2897ac76e712aa3958fc7d2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102950 Tested-by: Jan Holesovsky Reviewed-by: Jan Holesovsky diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 66e264817..54abd8731 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -739,6 +739,67 @@ L.CalcTileLayer = BaseTileLayer.extend({ converter: this._twipsToPixels, context: this }); + var that = this; + this._painter.renderBackground = function(canvas, ctx) + { + if (this._layer._debug) + this._canvasCtx.fillStyle = 'rgba(255, 0, 0, 0.5)'; + else + this._canvasCtx.fillStyle = 'white'; // FIXME: sheet bg color + this._canvasCtx.fillRect(0, 0, ctx.canvasSize.x, ctx.canvasSize.y); + + if (that._debug) + canvas.strokeStyle = 'blue'; + else // now fr some grid-lines ... + canvas.strokeStyle = '#c0c0c0'; + canvas.lineWidth = 1.0; + + canvas.beginPath(); + for (var i = 0; i < ctx.paneBoundsList.length; ++i) { + // FIXME: de-duplicate before firing myself: + + // co-ordinates of this pane in core document pixels + var paneBounds = that._cssBoundsToCore(ctx.paneBoundsList[i]); + // co-ordinates of the main-(bottom right) pane in core document pixels + var viewBounds = that._cssBoundsToCore(ctx.viewBounds); + // into real pixel-land ... + paneBounds.round(); + viewBounds.round(); + + var paneOffset = paneBounds.getTopLeft(); // allocates + // Cute way to detect the in-canvas pixel offset of each pane + paneOffset.x = Math.min(paneOffset.x, viewBounds.min.x); + paneOffset.y = Math.min(paneOffset.y, viewBounds.min.y); + + // when using the pinch to zoom, set additional translation based */ + // on the pinch movement + if (that._map._animatingZoom) { + var centerOffset = this._map._getCenterOffset(this._map._animateToCenter); + paneOffset.x += Math.round(centerOffset.x); + paneOffset.y += Math.round(centerOffset.y); + } + + // URGH -> zooming etc. (!?) ... + if (that.sheetGeometry._columns) + that.sheetGeometry._columns.forEachInCorePixelRange( + paneBounds.min.x, paneBounds.max.x, + function(pos) { + canvas.moveTo(pos - paneOffset.x - 0.5, paneBounds.min.y - paneOffset.y - 0.5); + canvas.lineTo(pos - paneOffset.x - 0.5, paneBounds.max.y - paneOffset.y - 0.5); + canvas.stroke(); + }); + + if (that.sheetGeometry._rows) + that.sheetGeometry._rows.forEachInCorePixelRange( + paneBounds.min.y, paneBounds.max.y, + function(pos) { + canvas.moveTo(paneBounds.min.x - paneOffset.x - 0.5, pos - paneOffset.y - 0.5); + canvas.lineTo(paneBounds.max.x - paneOffset.x - 0.5, pos - paneOffset.y - 0.5); + canvas.stroke(); + }); + } + canvas.closePath(); +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |1 + 1 file changed, 1 insertion(+) New commits: commit 6a70aeaad8c6a01d53f9ebb16b7d7327ebf688a2 Author: Henry Castro AuthorDate: Mon Sep 14 13:37:29 2020 -0400 Commit: Henry Castro CommitDate: Thu Sep 17 17:58:58 2020 +0200 loleaflet: Hide the visibility of the cursor by default When loading a spreadsheet document, the server should send a message to show the cursor appropriately Change-Id: I520a2b21fab903fc6b17ea612bbe1691ef311dbd Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102692 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index e6813ad65..66e264817 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -54,6 +54,7 @@ L.CalcTileLayer = BaseTileLayer.extend({ }, beforeAdd: function (map) { + map._isCursorVisible = false; map._addZoomLimit(this); map.on('zoomend', this._onZoomRowColumns, this); map.on('updateparts', this._onUpdateParts, this); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0734ab1c627447fd982694fae1a3dc0dd1988149 Author: Szymon Kłos AuthorDate: Wed Sep 16 12:53:43 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Sep 16 13:57:54 2020 +0200 Revert "Encode wopisrc part in download link" This reverts commit e25379af2295f2e4356e8a12a28d66a28f2446a5. Reason for revert: change didn't help Change-Id: I6312b3762f108ba3984d5ec8ca8e9becab3696f3 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102761 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index cd7fe7e83..bdd3f3486 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -923,7 +923,7 @@ L.TileLayer = L.GridLayer.extend({ var wopiSrc = ''; if (this._map.options.wopiSrc != '') { - wopiSrc = '?WOPISrc=' + encodeURIComponent(this._map.options.wopiSrc); + wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc; } var url = this._map.options.webserver + this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' + encodeURIComponent(this._map.options.doc) + '/download/' + command.downloadid + wopiSrc; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e25379af2295f2e4356e8a12a28d66a28f2446a5 Author: Szymon Kłos AuthorDate: Wed Sep 16 10:57:05 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Sep 16 12:45:40 2020 +0200 Encode wopisrc part in download link Avoid browser warnings/errors wrt encoding when trying to download. Change-Id: I66820c1adec1a612f773b41416bc623c42cdb138 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102843 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index bdd3f3486..cd7fe7e83 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -923,7 +923,7 @@ L.TileLayer = L.GridLayer.extend({ var wopiSrc = ''; if (this._map.options.wopiSrc != '') { - wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc; + wopiSrc = '?WOPISrc=' + encodeURIComponent(this._map.options.wopiSrc); } var url = this._map.options.webserver + this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' + encodeURIComponent(this._map.options.doc) + '/download/' + command.downloadid + wopiSrc; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.FormulaBar.js |3 ++- loleaflet/src/control/Control.PresentationBar.js |3 ++- loleaflet/src/control/Control.SearchBar.js |3 ++- loleaflet/src/control/Control.SheetsBar.js |3 ++- loleaflet/src/control/Control.SigningBar.js |3 ++- loleaflet/src/control/Control.StatusBar.js |3 ++- loleaflet/src/control/Control.TopToolbar.js |3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) New commits: commit 40a67b00a20132d85a25d3bbf5b525e21edf9b80 Author: Pranam Lashkari AuthorDate: Sat Sep 12 11:23:28 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:49:26 2020 +0200 leaflet: disable tooltip in mobile and tablet Change-Id: I591b2392d6c7072144bd7229a60933c61a2f3241 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102506 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.FormulaBar.js b/loleaflet/src/control/Control.FormulaBar.js index b58353d82..a4d666009 100644 --- a/loleaflet/src/control/Control.FormulaBar.js +++ b/loleaflet/src/control/Control.FormulaBar.js @@ -42,7 +42,8 @@ L.Control.FormulaBar = L.Control.extend({ $('#addressInput').off('keyup', that.onAddressInput.bind(that)).on('keyup', that.onAddressInput.bind(that)); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['formulabar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.PresentationBar.js b/loleaflet/src/control/Control.PresentationBar.js index 2adcf2eae..26076245b 100644 --- a/loleaflet/src/control/Control.PresentationBar.js +++ b/loleaflet/src/control/Control.PresentationBar.js @@ -42,7 +42,8 @@ L.Control.PresentationBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['presentation-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SearchBar.js b/loleaflet/src/control/Control.SearchBar.js index 1025d39cf..a4d82f445 100644 --- a/loleaflet/src/control/Control.SearchBar.js +++ b/loleaflet/src/control/Control.SearchBar.js @@ -38,7 +38,8 @@ L.Control.SearchBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['searchbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SheetsBar.js b/loleaflet/src/control/Control.SheetsBar.js index d3a6012e9..a67e425e7 100644 --- a/loleaflet/src/control/Control.SheetsBar.js +++ b/loleaflet/src/control/Control.SheetsBar.js @@ -35,7 +35,8 @@ L.Control.SheetsBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['spreadsheet-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SigningBar.js b/loleaflet/src/control/Control.SigningBar.js index c31d90ee4..acffbd77f 100644 --- a/loleaflet/src/control/Control.SigningBar.js +++ b/loleaflet/src/control/Control.SigningBar.js @@ -27,7 +27,8 @@ L.Control.SigningBar = L.Control.extend({ onRefresh: function() { } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['document-signing-bar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 67752f432..29a844e9f 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -238,7 +238,8 @@ L.Control.StatusBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.show();
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/AnnotationManager.js| 11 +++--- loleaflet/src/layer/AnnotationManagerImpress.js | 10 ++--- loleaflet/src/layer/marker/Annotation.js| 25 +++- loleaflet/src/layer/tile/TileLayer.js |7 -- 4 files changed, 36 insertions(+), 17 deletions(-) New commits: commit 245f797ac984c01cda85c508c44844586e9d694d Author: Pranam Lashkari AuthorDate: Fri Sep 11 08:20:29 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:48:44 2020 +0200 leaflet: annotation: use vex dialogs for annotation reply Change-Id: I171c5712fcae54b4c1c6e2a8be7dd12bd6765f0a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102412 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 11224fd2a..e5ad6b498 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -626,9 +626,14 @@ L.AnnotationManager = L.AnnotationManagerBase.extend({ }, reply: function (annotation) { - annotation.reply(); - this.select(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._doclayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } + else { + annotation.reply(); + this.select(annotation); + annotation.focus(); + } }, resolve: function (annotation) { diff --git a/loleaflet/src/layer/AnnotationManagerImpress.js b/loleaflet/src/layer/AnnotationManagerImpress.js index 542f0572b..815021e9f 100644 --- a/loleaflet/src/layer/AnnotationManagerImpress.js +++ b/loleaflet/src/layer/AnnotationManagerImpress.js @@ -129,9 +129,13 @@ L.AnnotationManagerImpress = L.AnnotationManagerBase.extend({ onAnnotationReply: function (annotation) { this.onAnnotationCancel(); this._selectedAnnotation = annotation._data.id; - annotation.reply(); - this.scrollUntilAnnotationIsVisible(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._doclayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } else { + annotation.reply(); + this.scrollUntilAnnotationIsVisible(annotation); + annotation.focus(); + } }, onAnnotationRemove: function (id) { this.onAnnotationCancel(); diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index bf1ca54d3..dc4f94633 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -361,14 +361,21 @@ L.Annotation = L.Layer.extend({ _onReplyClick: function (e) { L.DomEvent.stopPropagation(e); - this._data.reply = this._nodeReplyText.value; - // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' - // While in browsers like Chrome and Firefox, a null value is automatically converted to '' - // Better to assign '' here instead of null to keep the behavior same for all - this._nodeReplyText.value = ''; - this.show(); - this._checkBounds(); - this._map.fire('AnnotationReply', {annotation: this}); + if (window.mode.isMobile() || window.mode.isTablet()) { + e.annotation._data.reply = e.annotation.text; + e.annotation.show(); + e.annotation._checkBounds(); + this._map.fire('AnnotationReply', {annotation: e.annotation}); + } else { + this._data.reply = this._nodeReplyText.value; + // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' + // While in browsers like Chrome and Firefox, a null value is automatically converted to '' + // Better to assign '' here instead of null to keep the behavior same for all + this._nodeReplyText.value = ''; + this.show(); + this._checkBounds(); + this._map.fire('AnnotationReply', {annotation: this}); + } }, _onResolveClick: function (e) { @@ -466,7 +473,7 @@ L.Annotation = L.Layer.extend({ _updateAnnotationMarker: function () { // Make sure to place the markers only for presentations and draw documents
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |1 + 1 file changed, 1 insertion(+) New commits: commit fec0b314afcab140db51629469b10bd0c10a9757 Author: Pedro Pinto Silva AuthorDate: Tue Sep 15 12:52:53 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 15:39:36 2020 +0200 Mobile: Set icon for combobox rotation Change-Id: Id063188781165d8724cbe4b04ec7f9c5b767e37c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102730 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index f6679381c..b3518afd4 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -424,6 +424,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ case 'masterslide': case 'SdTableDesignPanel': case 'ChartTypePanel': + case 'rotation': iconURL = L.LOUtil.getImageURL('lc_'+ sectionTitle.id.toLowerCase() +'.svg'); break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit ce572a9d44adeef32781251d7c9b3ee679611b97 Author: Pranam Lashkari AuthorDate: Tue Sep 15 17:38:15 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:23:57 2020 +0200 leaflet: removed bogus menu items in Draw menu Change-Id: I055cb3cb08b7f91d35602ee33c6b799048950134 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102740 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 68997aae5..8caebf2ba 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -286,15 +286,15 @@ 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:SlideMasterPage'}, - {type: 'separator'}, - {uno: '.uno:ModifyPage'}, - {uno: '.uno:SlideChangeWindow'}, - {uno: '.uno:CustomAnimation'}, - {uno: '.uno:MasterSlidesPanel'}, - {type: 'separator'}, - {uno: '.uno:Sidebar'}] + {type: 'separator', drawing: false}, + {uno: '.uno:SlideMasterPage', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:ModifyPage', drawing: false}, + {uno: '.uno:SlideChangeWindow', drawing: false}, + {uno: '.uno:CustomAnimation', drawing: false}, + {uno: '.uno:MasterSlidesPanel', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:Sidebar', drawing: false}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', 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: loleaflet/src
loleaflet/src/control/Control.Menubar.js |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 661852ab6fec9c873dfee383d6f08b020223155d Author: Pedro Pinto Silva AuthorDate: Mon Sep 14 16:03:10 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 10:27:47 2020 +0200 Mobile: Menu bar: Fix absent document-header on read-only documents Change-Id: Icd23f8236cfd7d72335b0cc295d62fb979090512 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102679 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index bcd427865..68997aae5 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -876,11 +876,8 @@ L.Control.Menubar = L.Control.extend({ }); $('#main-menu').attr('tabindex', 0); - // 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.isPermissionReadOnly()) { - this._createFileIcon(); - } + + this._createFileIcon(); }, _onStyleMenu: function (e) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Toolbar.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 917b0de6b771923249cf468a4224b0266905598d Author: Andras Timar AuthorDate: Mon Sep 14 16:15:30 2020 +0200 Commit: Andras Timar CommitDate: Mon Sep 14 16:16:20 2020 +0200 change shape category names to match to core (and have l10n) Change-Id: I3ab05a3b771af15de5091eea8bb7f2b5a4153c9d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102681 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 23ba12b4f..8effb9de3 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -332,7 +332,7 @@ var shapes = { {img: 'basicshapes_frame', uno: 'BasicShapes.frame'} ], - 'Symbols': [ + 'Symbol Shapes': [ {img: 'symbolshapes', uno: 'SymbolShapes.smiley'}, {img: 'symbolshapes_sun', uno: 'SymbolShapes.sun'}, {img: 'symbolshapes_moon', uno: 'SymbolShapes.moon'}, @@ -388,7 +388,7 @@ var shapes = { {img: 'arrowshapes_s-sharped-arrow', uno: 'ArrowShapes.s-sharped-arrow'} ], - 'Stars': [ + 'Stars and Banners': [ {img: 'starshapes_bang', uno: 'StarShapes.bang'}, {img: 'starshapes_star4', uno: 'StarShapes.star4'}, {img: 'starshapes_star5', uno: 'StarShapes.star5'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 8a20b74e36cc12f24b92105f8b20929d9f172bca Author: Pedro Pinto Silva AuthorDate: Fri Sep 11 16:49:51 2020 +0200 Commit: Pedro Silva CommitDate: Fri Sep 11 18:44:23 2020 +0200 Add missing class (selected) to _unoToolButton Change-Id: Ia7a5cdb840240ffbbe3f73c23264750b5d8e9d82 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102486 Reviewed-by: Pranam Lashkari Tested-by: Pedro Silva Tested-by: Jenkins CollaboraOffice diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 8be8a1603..f6679381c 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1693,10 +1693,14 @@ L.Control.JSDialogBuilder = L.Control.extend({ var items = builder.map['stateChangeHandler']; var state = items.getItemValue(data.command); - if (state && state === 'true') + if (state && state === 'true') { $(button).addClass('selected'); - else + $(div).addClass('selected'); + } + else { $(button).removeClass('selected'); + $(div).removeClass('selected'); + } if (state && state === 'disabled') $(div).addClass('disabled'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit adf8961cd376f5d5cf7424d0c89752a9663d6a42 Author: Pedro Pinto Silva AuthorDate: Fri Sep 11 11:07:28 2020 +0200 Commit: Pedro Silva CommitDate: Fri Sep 11 12:38:27 2020 +0200 Mobile: set icon for watermark transparency spinfield Reuse lc_settransparency icon used on objects instead of duplicating file Change-Id: Iec2393aa43edcf5907f3ae401811414cdb4682f3 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102450 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 044d852e5..8be8a1603 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -46,6 +46,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ builder._fixedtextControl(parentContainer, fixedTextData, builder); } + console.debug('baseSpinField: ' + data.id); + var div = L.DomUtil.create('div', 'spinfieldcontainer', parentContainer); div.id = data.id; controls['container'] = div; @@ -53,7 +55,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var commandName = data.id ? data.id.substring('.uno:'.length) : data.id; if (commandName && commandName.length && L.LOUtil.existsIconForCommand(commandName, builder.map.getDocType())) { var image = L.DomUtil.create('img', 'spinfieldimage', div); - var icon = builder._createIconURL(data.id); + var icon = (data.id === 'Transparency') ? builder._createIconURL('settransparency') : builder._createIconURL(data.id); image.src = icon; icon.alt = ''; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 060214ded20464a1514338c5248128d15b87ae58 Author: Andras Timar AuthorDate: Fri Sep 11 09:41:04 2020 +0200 Commit: Andras Timar CommitDate: Fri Sep 11 10:05:17 2020 +0200 make the label 'Functions' localizable Change-Id: If3a952e229bccdb2ff5c6d6a7e582e1ba3066c57 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102442 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 9d3299b88..f2c0f5f15 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -823,7 +823,7 @@ L.TileLayer = L.GridLayer.extend({ var data = { id: 'funclist', type: '', - text: 'Functions', + text: _('Functions'), enabled: true, children: [] }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js | 26 +++ 1 file changed, 17 insertions(+), 9 deletions(-) New commits: commit e8b829f190fc89e3ffa7ef726f8a57b3531a4acb Author: Pedro Pinto Silva AuthorDate: Thu Sep 10 17:56:45 2020 +0200 Commit: Pedro Silva CommitDate: Fri Sep 11 09:32:11 2020 +0200 Mobile: Fix missing img element for chart type and opt for switch for better legibility and perhaps better performance Change-Id: I629f9f8579b89e4123757c05292bc1223f226aa3 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102395 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index a0e5a39f8..044d852e5 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -238,7 +238,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ (window.notebookbarId !== undefined ? window.notebookbarId : (window.sidebarId !== undefined ? window.sidebarId : -1)); var message = 'dialogevent ' + windowId - + ' {\"id\":\"' + object.id + + ' {\"id\":\"' + object.id + '\", \"cmd\": \"' + eventType + '\", \"data\": \"' + data + '\", \"type\": \"' + objectType + '\"}'; @@ -415,8 +415,16 @@ L.Control.JSDialogBuilder = L.Control.extend({ var leftDiv = L.DomUtil.create('div', 'ui-header-left', sectionTitle); var titleClass = ''; console.debug('sectionTitle.id' + sectionTitle.id); - if (sectionTitle.id === 'paperformat' || sectionTitle.id === 'orientation' || sectionTitle.id === 'masterslide' || sectionTitle.id === 'SdTableDesignPanel') + switch (sectionTitle.id) + { + case 'paperformat': + case 'orientation': + case 'masterslide': + case 'SdTableDesignPanel': + case 'ChartTypePanel': iconURL = L.LOUtil.getImageURL('lc_'+ sectionTitle.id.toLowerCase() +'.svg'); + break; + } if (iconURL) { var icon = L.DomUtil.create('img', 'menu-entry-icon', leftDiv); icon.src = iconURL; @@ -556,10 +564,10 @@ L.Control.JSDialogBuilder = L.Control.extend({ if (commandName === 'LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES') return 'paragraphlanugagedefault'; if ((this.map.getDocType() === 'spreadsheet' || this.map.getDocType() === 'presentation') && -commandName.indexOf('LanguageStatus?Language:string=Paragraph_') !== -1) + commandName.indexOf('LanguageStatus?Language:string=Paragraph_') !== -1) return 'paragraphlanugagesuggestion'; if ((this.map.getDocType() === 'spreadsheet' || this.map.getDocType() === 'presentation') && -commandName.indexOf('LanguageStatus?Language:string=Current_') !== -1) + commandName.indexOf('LanguageStatus?Language:string=Current_') !== -1) return 'selectionlanugagesuggestion'; return commandName.toLowerCase(); }, @@ -2170,8 +2178,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ } else if (!builder.map._clip || !builder.map._clip.filterExecCopyPaste(data.command)) { // Header / footer is already inserted. if ((data.command.startsWith('.uno:InsertPageHeader') || - data.command.startsWith('.uno:InsertPageFooter')) && - data.checked && data.checked === true) { + data.command.startsWith('.uno:InsertPageFooter')) && + data.checked && data.checked === true) { return; } else if (data.command === '.uno:ShowNote') { builder.map._docLayer.showAnnotationFromCurrentCell(); @@ -2298,9 +2306,9 @@ L.Control.JSDialogBuilder = L.Control.extend({ var handler = this._controlHandlers[childType]; var twoPanelsAsChildren = - childData.children && childData.children.length == 2 - && childData
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |8 1 file changed, 8 deletions(-) New commits: commit 617dd6de0557085f957425e27711eb31052c7ac1 Author: Tamás Zolnai AuthorDate: Thu Sep 10 12:45:37 2020 +0200 Commit: Tamás Zolnai CommitDate: Thu Sep 10 13:21:19 2020 +0200 Revert "loleaflet: Hide portrait view previews on layout view." Leads to "TypeError: Cannot read property 'style' of null". This reverts commit aca07fec869117589a7b81b64328f39e02fc882d. Change-Id: I63678f735f698012ca89d5d0ef0ee9c1c8a1d6a2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102372 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index dfc37beaf..6d7b6c3da 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -184,14 +184,6 @@ L.Control.PartsPreview = L.Control.extend({ $(this._partsPreviewCont).mCustomScrollbar('destroy'); this.createScrollbar(); } - - // Hide portrait view's previews when layout view is used. - if (this._direction === 'x' && window.mode.isMobile()) { - document.getElementById('mobile-slide-sorter').style.display = 'block'; - } - else if (this._direction === 'y' && window.mode.isMobile()) { - document.getElementById('mobile-slide-sorter').style.display = 'none'; - } } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/AnnotationManagerImpress.js | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) New commits: commit fdf3df407c535a7b33016e7d07dc71ea237cf09f Author: Ezinne Nnamani AuthorDate: Tue Sep 8 17:06:16 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Thu Sep 10 13:05:05 2020 +0200 A fix to handle the added "Reply to" when the user clicks on the comment in Impress slide Change-Id: Ib6cfa7acca208a143a237acb1c9b2753cbe6ca18 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102270 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/loleaflet/src/layer/AnnotationManagerImpress.js b/loleaflet/src/layer/AnnotationManagerImpress.js index 2e5945a9c..542f0572b 100644 --- a/loleaflet/src/layer/AnnotationManagerImpress.js +++ b/loleaflet/src/layer/AnnotationManagerImpress.js @@ -144,20 +144,10 @@ L.AnnotationManagerImpress = L.AnnotationManagerBase.extend({ this._map.sendUnoCommand('.uno:DeleteAnnotation', comment); this._map.focus(); }, - onAnnotationClick: function (e) { - var comment = { - Id: { - type: 'string', - value: e.annotation._data.id - }, - Text: { - type: 'string', - value: e.annotation._data.reply - } - }; - this._map.sendUnoCommand('.uno:ReplyToAnnotation', comment); - this._selectedAnnotation = undefined; + onAnnotationClick: function (event) { + this._selectedForPopup = event.annotation; this._map.focus(); + this.layoutAnnotations(); }, onAnnotationSave: function (event) { var comment; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f6c24f90033678fb24358d460111332230d1a6c5 Author: gokaysatir AuthorDate: Fri Aug 28 21:36:35 2020 +0300 Commit: Andras Timar CommitDate: Wed Sep 9 14:24:23 2020 +0200 loleaflet: Impress slide scroll improved. On tablet, slide preview scroll section is always on the left column. So when user switches to layout/portrait views, scroll item's classes should remain same. Change-Id: I84349cd48b317578d9bb2687c3a66aa788f57780 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101563 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 8694b8bf6..dfc37beaf 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -179,7 +179,7 @@ L.Control.PartsPreview = L.Control.extend({ // re-create scrollbar with new direction var direction = this._direction; - this._direction = !window.mode.isDesktop() && L.DomUtil.isPortrait() ? 'x' : 'y'; + this._direction = !window.mode.isDesktop() && !window.mode.isTablet() && L.DomUtil.isPortrait() ? 'x' : 'y'; if (direction !== this._direction) { $(this._partsPreviewCont).mCustomScrollbar('destroy'); this.createScrollbar(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.MobileWizard.js | 46 -- loleaflet/src/layer/tile/ImpressTileLayer.js | 17 - 2 files changed, 44 insertions(+), 19 deletions(-) New commits: commit e1ca1d6831233bfbc77cbcc2932b1cdf1ea46c09 Author: Pranam Lashkari AuthorDate: Tue Aug 25 02:59:13 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 9 14:23:57 2020 +0200 leaflet: hide slide pane when mobile wizard visible now slide pane would be only visible over slide property wizard removed in other cases because it used to take up valuable space Change-Id: I68e10aefab15680fba52feb577cbeae048a337bc Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101296 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 1cd965865..b51311b5d 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -121,6 +121,8 @@ L.Control.MobileWizard = L.Control.extend({ if (window.pageMobileWizard === true) window.pageMobilewizard = false; + if (this.isMobileWizardHeaderVisible) + this._removeMobileWizardHeader(); this._updateToolbarItemStateByClose(); @@ -351,8 +353,8 @@ L.Control.MobileWizard = L.Control.extend({ window.mobileDialogId = data.id; } - if (this.map.getDocType() === 'presentation') - $('#mobile-wizard-header').show(); + if (this.map.getDocType() === 'presentation' && this._isSlidePropertyPanel(data)) + this._addMobileWizardHeader(); this._isActive = true; var currentPath = null; @@ -427,6 +429,46 @@ L.Control.MobileWizard = L.Control.extend({ } }, + _addMobileWizardHeader: function() { + if (!this.isMobileWizardHeaderVisible) { + var map = this._map; + this.isMobileWizardHeaderVisible = true; + L.Control.MobileWizard.mergeOptions({maxHeight: '55%'}); + var mobileWizard = L.DomUtil.get('mobile-wizard'); + var mobileWizardContent = L.DomUtil.get('mobile-wizard-content'); + var container = L.DomUtil.createWithId('div', 'mobile-wizard-header', mobileWizard); + var preview = L.DomUtil.createWithId('div', 'mobile-slide-sorter', container); + L.DomUtil.toBack(container); + map.addControl(L.control.partsPreview(container, preview, { + fetchThumbnail: false, + allowOrientation: false, + axis: 'x', + imageClass: 'preview-img-portrait', + frameClass: 'preview-frame-portrait' + })); + L.DomUtil.addClass(mobileWizardContent, 'with-slide-sorter-above'); + } + }, + + _removeMobileWizardHeader: function() { + if (this.isMobileWizardHeaderVisible) { + this.isMobileWizardHeaderVisible = false; + L.Control.MobileWizard.mergeOptions({maxHeight: '45%'}); + $('#mobile-wizard-header').remove(); + var mobileWizardContent = L.DomUtil.get('mobile-wizard-content'); + L.DomUtil.removeClass(mobileWizardContent, 'with-slide-sorter-above'); + } + }, + + _isSlidePropertyPanel: function(data) { + try { + var panels = data.children[0].children; + return panels[0].id === 'SlideBackgroundPanel' && panels[1].id === 'SdLayoutsPanel'; + } catch (e) { + return false; + } + }, + _insertCalcBorders: function(deck) { var replaceMe = L.LOUtil.findItemWithAttributeRecursive(deck, 'id', 'cellbordertype'); if (replaceMe) { diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index a8d8a2522..8112cd1fb 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -30,23 +30,6 @@ L.ImpressTileLayer = L.TileLayer.extend({ this._annotationManager = L.annotationManagerImpress(map); map.uiManager.initializeSpecializedUI('presentation'); - - if (window.mode.isMobile()) { - L.Control.MobileWizard.mergeOptions({maxHeight: '55%'}); - var mobileWizard = L.DomUtil.get('mobile-
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js |2 ++ 1 file changed, 2 insertions(+) New commits: commit d10ee489689bbfa412c5f3e6c09a0cc76cf7e5f7 Author: Pranam Lashkari AuthorDate: Fri Aug 28 20:15:55 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 9 14:21:31 2020 +0200 leaflet: do not allow to add comments in read only mode comments are only allowed in read only mode in draw Change-Id: I0b7bc770c8c2b5117dfc31f515f28df67a7a3080 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101553 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 7e4788534..bcd427865 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -1117,6 +1117,8 @@ L.Control.Menubar = L.Control.extend({ break; } } + if (id === 'insertcomment' && self._map.getDocType() !== 'drawing') + found = false; if (!found) { $(aItem).addClass('disabled'); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |8 1 file changed, 8 insertions(+) New commits: commit aca07fec869117589a7b81b64328f39e02fc882d Author: gokaysatir AuthorDate: Sat Aug 29 15:25:19 2020 +0300 Commit: Andras Timar CommitDate: Wed Sep 9 14:20:21 2020 +0200 loleaflet: Hide portrait view previews on layout view. When user switches to layout view on mobile. Viewing a page's properties opens 2 preview sliders. Portrait view's slider is hidden with this patch. Change-Id: Iebbdd9c6c94f19a39df271106b75f2e9f55a7b35 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101641 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 58408b48f..8694b8bf6 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -184,6 +184,14 @@ L.Control.PartsPreview = L.Control.extend({ $(this._partsPreviewCont).mCustomScrollbar('destroy'); this.createScrollbar(); } + + // Hide portrait view's previews when layout view is used. + if (this._direction === 'x' && window.mode.isMobile()) { + document.getElementById('mobile-slide-sorter').style.display = 'block'; + } + else if (this._direction === 'y' && window.mode.isMobile()) { + document.getElementById('mobile-slide-sorter').style.display = 'none'; + } } }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/AnnotationManagerImpress.js |4 +++- loleaflet/src/map/Map.js| 10 ++ 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit a70ff81ee998a6e5b79cdd8fe7a4b62eb30b75ac Author: Pranam Lashkari AuthorDate: Tue Sep 8 06:30:46 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 9 14:18:49 2020 +0200 leaflet: fixed annotation getting out of screen problem: annotations in impress were overlapped by controls sometimes which makes kabab menu inaccessible on the reloading or opening doc if annotation, half annotation is out of the screen on right Change-Id: I830df8a393dae93db571fb999cb649bc87126d4a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102212 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManagerImpress.js b/loleaflet/src/layer/AnnotationManagerImpress.js index ef92c665f..2e5945a9c 100644 --- a/loleaflet/src/layer/AnnotationManagerImpress.js +++ b/loleaflet/src/layer/AnnotationManagerImpress.js @@ -252,7 +252,9 @@ L.AnnotationManagerImpress = L.AnnotationManagerBase.extend({ layoutAnnotations: function () { var topAnnotation; var annotations = this._annotations[this.getSelectedPartHash()]; - var diffPoint = L.point((this._selectedAnnotation ? 3 : 2) * this.options.marginX, this.options.marginY); + + // Keeping annotations close to slide to avoide being overlapped by controls + var diffPoint = L.point(5, this.options.marginY); var topRight = this._map.latLngToLayerPoint(this._map.options.docBounds.getNorthEast()).add(diffPoint); var bounds = null; for (var index in annotations) { diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 9f3633929..b774debf9 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -1159,6 +1159,16 @@ L.Map = L.Evented.extend({ } this.fire('moveend', {hard: !preserveMapOffset}); + + if (this.getDocType() === 'presentation') { + if (this._docLayer._annotationManager.getSelectedPart() !== undefined) { + var parHash = this._docLayer._annotationManager.getSelectedPartHash(); + var annotations = this._docLayer._annotationManager._annotations[parHash]; + for (var i in annotations) { + annotations[i].update(); + } + } + } }, _rawPanBy: function (offset) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/TileLayer.js | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) New commits: commit 28d163f843ae69f5bbd3a71147533cba5a672578 Author: Pranam Lashkari AuthorDate: Sun Aug 9 23:50:30 2020 +0530 Commit: Aron Budea CommitDate: Wed Sep 9 08:07:30 2020 +0200 leaflet: hyperlink popup will not displace the view hyperlink popups always opend above the links when it did not fit into the view it would scroll this scrolling caused problem in calc by messing the grid now popup will not trigger the scroll and would be adjusted to fit in view Change-Id: I6c886e0dc57b010db16f51baed0e7a0465e52d4f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100407 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 16744d019..9d3299b88 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1235,13 +1235,42 @@ L.TileLayer = L.GridLayer.extend({ _showURLPopUp: function(position, url) { // # for internal links if (!url.startsWith('#')) { - this._map.hyperlinkPopup = new L.Popup({className: 'hyperlink-popup', closeButton: false, closeOnClick: false}) + this._map.hyperlinkPopup = new L.Popup({className: 'hyperlink-popup', closeButton: false, closeOnClick: false, autoPan: false}) .setContent('' + url + '') .setLatLng(position) .openOn(this._map); + var offsetDiffTop = $('.hyperlink-popup').offset().top - $('#map').offset().top; + var offsetDiffLeft = $('.hyperlink-popup').offset().left - $('#map').offset().left; + if (offsetDiffTop < 10) this._movePopUpBelow(); + if (offsetDiffLeft < 10) this._movePopUpRight(); } }, + _movePopUpBelow: function() { + var popUp = $('.hyperlink-popup').first(); + var pixBounds = L.bounds(this._map.latLngToLayerPoint(this._visibleCursor.getSouthWest()), + this._map.latLngToLayerPoint(this._visibleCursor.getNorthEast())); + var cursorSize = pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())); + var bottom = cursorSize.y + popUp.height(); + + popUp.css({ + 'bottom': bottom ? -bottom + 'px': '', + 'display': 'flex', + 'flex-direction': 'column-reverse' + }); + $('.leaflet-popup-tip-container').first().css('transform', 'rotate(180deg)'); + }, + + _movePopUpRight: function() { + $('.leaflet-popup-content-wrapper').first().css({ + 'position': 'relative', + 'left': this._map.hyperlinkPopup._containerLeft * -1 + }); + $('.leaflet-popup-tip-container').first().css({ + 'left': '25px' + }); + }, + _closeURLPopUp: function() { this._map.closePopup(this._map.hyperlinkPopup); this._map.hyperlinkPopup = null; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/unocommands.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 185b3573291cb5bf7b96a3ca3868620242055050 Author: Thais Vieira AuthorDate: Fri Sep 4 07:50:28 2020 -0300 Commit: Tor Lillqvist CommitDate: Mon Sep 7 15:21:22 2020 +0200 Loleaflet: fix menu entry replacing 'Select...' to 'Select Table' to it be consistent with the pattern. Change-Id: I2724db65242588aa5d7aa6d375690ac3f478f209 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102048 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index b23b92e16..655424700 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -269,7 +269,7 @@ var unoCommandsArray = { SearchDialog:{global:{menu:_('Find & Rep~lace...'),},}, SelectAll:{global:{menu:_('Select ~All'),},}, SelectBackground:{presentation:{menu:_('Set Background Image...'),},}, - SelectTable:{presentation:{menu:_('~Select...'),},text:{menu:_('~Table'),},}, + SelectTable:{presentation:{menu:_('~Select Table'),},text:{menu:_('~Table'),},}, SendToBack:{global:{menu:_('~Send to Back'),},}, SetAnchorAtChar:{text:{menu:_('To ~Character'),},}, SetAnchorToCell:{spreadsheet:{menu:_('To ~Cell'),},}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarImpress.js | 22 loleaflet/src/control/Control.NotebookbarWriter.js | 22 2 files changed, 44 insertions(+) New commits: commit f279b174b235ff9b17534918635cffd217a4d3fe Author: Szymon Kłos AuthorDate: Mon Sep 7 12:31:08 2020 +0200 Commit: Szymon Kłos CommitDate: Mon Sep 7 13:56:33 2020 +0200 notebookbar: add insert comment in the insert tab Change-Id: I7a68390c716858ad18f578d26f996bfc05eedacd Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102161 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarImpress.js b/loleaflet/src/control/Control.NotebookbarImpress.js index d1fff1c5a..dddc7b4ef 100644 --- a/loleaflet/src/control/Control.NotebookbarImpress.js +++ b/loleaflet/src/control/Control.NotebookbarImpress.js @@ -2164,6 +2164,28 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({ ], 'vertical': 'false' }, + { + 'id': 'Insert-Section-Annotation', + 'type': 'container', + 'text': '', + 'enabled': 'true', + 'children': [ + { + 'id': 'SectionBottom15', + 'type': 'toolbox', + 'text': '', + 'enabled': 'true', + 'children': [ + { + 'type': 'bigtoolitem', + 'text': _UNO('.uno:InsertAnnotation', 'presentation'), + 'command': '.uno:InsertAnnotation' + } + ] + } +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |3 +++ 1 file changed, 3 insertions(+) New commits: commit 83436de3965dc5b208f65477b841bd727ef73a21 Author: Szymon Kłos AuthorDate: Mon Sep 7 12:44:55 2020 +0200 Commit: Szymon Kłos CommitDate: Mon Sep 7 13:00:05 2020 +0200 notebookbar: add tooltip to drawingarea widget Change-Id: Ic0988de264a2782e4f777d8f11236f7b70f9bc72 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102162 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index c4323d791..dbfa4dbe4 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1572,6 +1572,9 @@ L.Control.JSDialogBuilder = L.Control.extend({ var image = L.DomUtil.create('img', builder.options.cssClass + ' ui-drawing-area', container); image.src = data.image.replace('\\', ''); image.id = data.id; + image.alt = data.text; + image.title = data.text; + $(image).tooltip(); if (data.loading && data.loading === 'true') { var loaderContainer = L.DomUtil.create('div', 'ui-drawing-area-loader-container', container); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Notebookbar.js |1 + 1 file changed, 1 insertion(+) New commits: commit 7ab27b78370a55a8c8cbb11828a2091bcdc36a3d Author: Szymon Kłos AuthorDate: Mon Sep 7 09:51:04 2020 +0200 Commit: Szymon Kłos CommitDate: Mon Sep 7 10:33:15 2020 +0200 Notebookbar: don't add multiple shortcut bars in the DOM Change-Id: Ic537ac7181174cfbbc9c7e3da6336d51a0f188ef Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102147 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.Notebookbar.js b/loleaflet/src/control/Control.Notebookbar.js index ac2ce11f4..cb7d9a173 100644 --- a/loleaflet/src/control/Control.Notebookbar.js +++ b/loleaflet/src/control/Control.Notebookbar.js @@ -78,6 +78,7 @@ L.Control.Notebookbar = L.Control.extend({ $('.root-container.notebookbar').remove(); $('.ui-tabs.notebookbar').remove(); $('.notebookbar-scroll-wrapper').remove(); + $('.notebookbar-shortcuts-bar').remove(); }, loadTab: function(tabJSON) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/ImpressTileLayer.js |3 +++ 1 file changed, 3 insertions(+) New commits: commit 581ccb502ff72ba9a0ef811356949e195fe9dfb5 Author: Ezinne Nnamani AuthorDate: Fri Sep 4 16:04:13 2020 +0100 Commit: Andras Timar CommitDate: Mon Sep 7 07:07:57 2020 +0200 A fix to display the avatar on the comments in Impress slides Change-Id: I1ba699d5e8583253ec9d14502629218d8714e5aa Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102141 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index 15b6ef5e1..a8d8a2522 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -170,6 +170,9 @@ L.ImpressTileLayer = L.TileLayer.extend({ _onMessage: function (textMsg, img) { if (textMsg.startsWith('comment:')) { var object = JSON.parse(textMsg.substring('comment:'.length + 1)); + if (object.comment.author in this._map._viewInfoByUserName) { + object.comment.avatar = this._map._viewInfoByUserName[object.comment.author].userextrainfo.avatar; + } this._annotationManager.processCommentMessage(object.comment); } else { L.TileLayer.prototype._onMessage.call(this, textMsg, img); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 337ce6373f66838b73e4b53bd10ca2ecb276f90d Author: Pedro Pinto Silva AuthorDate: Wed Sep 2 16:25:25 2020 +0200 Commit: Pedro Silva CommitDate: Wed Sep 2 16:57:19 2020 +0200 Mobile: menu entries with icon missing extra class .flex-fullwidth This was causing elements (without arrow) in the insert mobilewizard to have its labels misaligned Change-Id: I0472a5d39a2691b48d7920a75821447622cc1801 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101937 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index ab9056aef..c4323d791 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -2138,7 +2138,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var titleSpan = L.DomUtil.create('span', '', menuEntry); titleSpan.innerHTML = title; - var paddingClass = icon ? 'menu-entry-with-icon' : 'menu-entry-no-icon'; + var paddingClass = icon ? 'menu-entry-with-icon flex-fullwidth' : 'menu-entry-no-icon'; L.DomUtil.addClass(titleSpan, paddingClass); if (builder.wizard) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.ColumnHeader.js |2 +- loleaflet/src/control/Control.RowHeader.js|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit e32fc7981e3fffe218d6211929b11a6d1b6f9ad6 Author: thais-dev AuthorDate: Tue Sep 1 07:22:23 2020 -0300 Commit: Aron Budea CommitDate: Wed Sep 2 14:02:29 2020 +0200 Loleaflet: add time value for the context menu of header be in sync with the context menu of the cells. Change-Id: I3f228e57375b10671b98de1a1444af87e8b2ed38 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101924 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-by: Aron Budea diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index cbd73c919..d6eccf5b1 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -100,7 +100,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({ }); } else { var menuData = L.Control.JSDialogBuilder.getMenuStructureForMobileWizard(this._menuItem, true, ''); - (new Hammer(this._canvas, {recognizers: [[Hammer.Press]]})) + (new Hammer(this._canvas, {recognizers: [[Hammer.Press, {time: 500}]]})) .on('press', L.bind(function () { if (this._map.isPermissionEdit()) { window.contextMenuWizard = true; diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index e39162ff2..8e80aec73 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -97,7 +97,7 @@ L.Control.RowHeader = L.Control.Header.extend({ }); } else { var menuData = L.Control.JSDialogBuilder.getMenuStructureForMobileWizard(this._menuItem, true, ''); - (new Hammer(this._canvas, {recognizers: [[Hammer.Press]]})) + (new Hammer(this._canvas, {recognizers: [[Hammer.Press, {time: 500}]]})) .on('press', L.bind(function () { if (this._map.isPermissionEdit()) { window.contextMenuWizard = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.UserList.js |5 +++-- loleaflet/src/layer/marker/Cursor.js |2 +- 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 9c55d2d5b918c27a30859c152c102f944b2ba612 Author: Szymon Kłos AuthorDate: Wed Sep 2 09:36:52 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Sep 2 10:01:43 2020 +0200 Fix name formatting Change-Id: I2aed56cf362c0e68918955340d35013179a54ad1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101909 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js index 47a259eca..ed902a7c7 100644 --- a/loleaflet/src/control/Control.UserList.js +++ b/loleaflet/src/control/Control.UserList.js @@ -96,7 +96,7 @@ L.Control.UserList = L.Control.extend({ $(img).css({'background-color': color}); } - nameTd.innerHTML = userName; + nameTd.textContent = userName; return content; }, @@ -211,10 +211,11 @@ L.Control.UserList = L.Control.extend({ onRemoveView: function(e) { var that = this; + var username = this.escapeHtml(e.username); $('#tb_actionbar_item_userlist') .w2overlay({ class: 'loleaflet-font', - html: this.options.userLeftPopupMessage.replace('%user', e.username), + html: this.options.userLeftPopupMessage.replace('%user', username), style: 'padding: 5px' }); clearTimeout(this.options.userPopupTimeout); diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 71cd97a00..b9ffb02c4 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -96,7 +96,7 @@ L.Cursor = L.Layer.extend({ if (this.options.header) { this._cursorHeader = L.DomUtil.create('div', 'leaflet-cursor-header', this._container); - this._cursorHeader.innerHTML = this.options.headerName; + this._cursorHeader.textContent = this.options.headerName; clearTimeout(this._blinkTimeout); this._blinkTimeout = setTimeout(L.bind(function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/core/Util.js| 17 loleaflet/src/map/Clipboard.js| 41 -- loleaflet/src/map/handler/Map.Keyboard.js | 25 ++ 3 files changed, 65 insertions(+), 18 deletions(-) New commits: commit 457fc3d538aed7bc2bc41fd022399749f4c5a3e4 Author: Pranam Lashkari AuthorDate: Tue Aug 18 19:33:13 2020 +0530 Commit: Michael Meeks CommitDate: Tue Sep 1 18:23:03 2020 +0200 clipboard: leaflet: unformatted paste shortcut changed Problems: 1: Browsers hard-code ctrl+shift+v as "paste without formatting" - ie. plain text We need access to the clipboard to get the rich data needed for paste-special, which we can only get security context / access to with a ctrl-v keypress 2: we cannot directly access the clipboard data with ctrl+shift+alt+v Solution: Externally copied data could not be pasted directly with paste special and unformatted paste due to no access to the clipboard data To access the data copied externally we rely on user to trigger paste event We use default browser shortcut for unformatted paste(ctrl+shift+v) this triggers a paste event for paste special we ask user to press ctrl+v with a popup and then if that popup is open and paste event is triggered we trigger paste special New shortcuts: Paste: ctrl+v unformatted Paste: ctrl+shift+v Paste special: ctrl+shift+alt+v Change-Id: Ib15c701f5e03123cb91e36d1c1d64f0c12aa9cfb Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100927 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/loleaflet/src/core/Util.js b/loleaflet/src/core/Util.js index 596dfa756..b2900b62b 100644 --- a/loleaflet/src/core/Util.js +++ b/loleaflet/src/core/Util.js @@ -207,6 +207,23 @@ L.Util = { context.font = font; var metrics = context.measureText(text); return Math.floor(metrics.width); + }, + + replaceCtrlInMac: function(msg) { + if (navigator.appVersion.indexOf('Mac') != -1 || navigator.userAgent.indexOf('Mac') != -1) { + var ctrl = /Ctrl/g; + if (String.locale.startsWith('de') || String.locale.startsWith('dsb') || String.locale.startsWith('hsb')) { + ctrl = /Strg/g; + } + if (String.locale.startsWith('lt')) { + ctrl = /Vald/g; + } + if (String.locale.startsWith('sl')) { + ctrl = /Krmilka/g; + } + return msg.replace(ctrl, '⌘'); + } + return msg; } }; diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js index ede448410..85925f4a2 100644 --- a/loleaflet/src/map/Clipboard.js +++ b/loleaflet/src/map/Clipboard.js @@ -264,8 +264,15 @@ L.Clipboard = L.Class.extend({ that._doAsyncDownload( 'POST', dest, formData, function() { - console.log('up-load done, now paste'); - that._map._socket.sendMessage('uno .uno:Paste'); + if (this.pasteSpecialVex && this.pasteSpecialVex.isOpen) { + vex.close(this.pasteSpecialVex); + console.log('up-load done, now paste special'); + that.map._socket.sendMessage('uno .uno:PasteSpecial'); + } else { + console.log('up-load done, now paste'); + that._map._socket.sendMessage('uno .uno:Paste'); + } + }, function(progress) { return 50 + progress/2; } ); @@ -292,8 +299,15 @@ L.Clipboard = L.Class.extend({ that._doAsyncDownload( 'POST', dest, formData, function() { - console.log('up-load of fallback done, now paste'); - that._map._socket.sendMessage('uno .uno:Paste'); + if (this.pasteSpecialVex && this.pasteSpecialVex.isOpen) { + vex.close(this.pasteSpecialVex); +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/Map.js | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) New commits: commit 05d10aba03aa1eaf5d2ea441088a59e931c74890 Author: Tor Lillqvist AuthorDate: Tue Sep 1 17:03:26 2020 +0300 Commit: Tor Lillqvist CommitDate: Tue Sep 1 17:22:11 2020 +0200 Comment out some debug spew Change-Id: I40a96ea71a78c76b2eb1a7f878320dec1dfd1205 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101877 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 6f5677a26..9f3633929 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -838,7 +838,7 @@ L.Map = L.Evented.extend({ // We have one global winId that controls what window (dialog, sidebar, or // the main document) has the actual focus. 0 means the document. setWinId: function (id) { - console.log('winId set to: ' + id); + // console.log('winId set to: ' + id); if (typeof id === 'string') id = parseInt(id); this._winId = id; @@ -1253,7 +1253,7 @@ L.Map = L.Evented.extend({ }, makeActive: function() { - console.log('Force active'); + // console.log('Force active'); this.lastActiveTime = Date.now(); return this._activate(); }, @@ -1263,13 +1263,13 @@ L.Map = L.Evented.extend({ return false; } - console.debug('_activate:'); + // console.debug('_activate:'); clearTimeout(vex.timer); if (!this._active) { // Only activate when we are connected. if (this._socket.connected()) { - console.debug('sending useractive'); + // console.debug('sending useractive'); this._socket.sendMessage('useractive'); this._active = true; if (this._docLayer) { @@ -1322,7 +1322,7 @@ L.Map = L.Evented.extend({ return; } - console.debug('_dim:'); + // console.debug('_dim:'); if (!this._socket.connected() || isAnyVexDialogActive()) { return; } @@ -1339,13 +1339,13 @@ L.Map = L.Evented.extend({ var multiplier = 1; if (!this.documentHidden(true)) { - console.debug('document visible'); + // console.debug('document visible'); multiplier = 4; // quadruple the grace period } if (inactiveMs <= this.options.outOfFocusTimeoutSecs * 1000 * multiplier) { - console.debug('had activity ' + inactiveMs + 'ms ago vs. threshold ' + - (this.options.outOfFocusTimeoutSecs * 1000 * multiplier) + - ' - so fending off the dim'); + // console.debug('had activity ' + inactiveMs + 'ms ago vs. threshold ' + + //(this.options.outOfFocusTimeoutSecs * 1000 * multiplier) + + //' - so fending off the dim'); vex.timer = setTimeout(function() { map._dim(); }, map.options.outOfFocusTimeoutSecs * 1000); @@ -1365,7 +1365,7 @@ L.Map = L.Evented.extend({ afterOpen: function() { var $vexContent = $(this.contentEl); $vexContent.bind('click.vex', function() { - console.debug('_dim: click.vex function'); + // console.debug('_dim: click.vex function'); return map._activate(); }); }, @@ -1373,7 +1373,7 @@ L.Map = L.Evented.extend({ }); $('.vex-overlay').addClass('loleaflet-user-idle-overlay'); this._doclayer && this._docLayer._onMessage('textselection:', null); - console.debug('_dim: sending userinactive'); + // console.debug('_dim: sending userinactive'); map.fire('postMessage', {msgId: 'User_Idle'}); this._socket.sendMessage('userinactive'); }, @@ -1386,7 +1386,7 @@ L.Map = L.Evented.extend({ }, _dimIfInactive: function () { - console.debug('_dimIfInactive: diff=' + (Date.now() - this.lastActiveTime)); + // console.debug('_dimIfInactive: diff=' + (Date.now() - this.lastActiveTime));
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 57226f19818ad4c06981186821579d5a5c53a032 Author: Pranam Lashkari AuthorDate: Mon Aug 31 18:45:45 2020 +0530 Commit: Pranam Lashkari CommitDate: Mon Aug 31 19:21:56 2020 +0200 leaflet: fixed js error in slide reordering with touch screen Change-Id: I7e1c864640f5829166616e5bf40b95646d913b23 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101756 Tested-by: Jenkins Reviewed-by: Pranam Lashkari diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index ca5155d4d..e529fad22 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -588,7 +588,7 @@ L.Control.PartsPreview = L.Control.extend({ e.preventDefault(); } - this.currentNode = document.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY); + this.currentNode = document.elementFromPoint(e.originalEvent.touches[0].clientX, e.originalEvent.touches[0].clientY); if (this.currentNode !== this.previousNode && this.previousNode !== null) { $('.preview-frame').removeClass('preview-img-dropsite'); @@ -600,8 +600,8 @@ L.Control.PartsPreview = L.Control.extend({ this.previousNode = this.currentNode; - $(this.draggedSlide).css('left', e.touches[0].clientX - (e.target.width/2)); - $(this.draggedSlide).css('top', e.touches[0].clientY - e.target.height); + $(this.draggedSlide).css('left', e.originalEvent.touches[0].clientX - (e.target.width/2)); + $(this.draggedSlide).css('top', e.originalEvent.touches[0].clientY - e.target.height); return false; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/Annotation.js |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 522a6b6978d01683898bfe1e683df3174dbce9eb Author: Tomaž Vajngerl AuthorDate: Mon Aug 31 10:29:03 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Aug 31 13:28:38 2020 +0200 add annotation marker only for presentations and draw documents Change-Id: I1bb69239a9ec6ce3c6fb33f38ff9bb99b305dbfe Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101692 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 797c2d432..bf1ca54d3 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -465,9 +465,11 @@ L.Annotation = L.Layer.extend({ }, _updateAnnotationMarker: function () { + // Make sure to place the markers only for presentations and draw documents + if (this._map._docLayer._docType !== 'presentation') + return; if (this._data == null) return; - if (this._annotationMarker == null) { this._annotationMarker = L.marker(new L.LatLng(0, 0), { icon: L.divIcon({ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.UIManager.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0334c4b04872add86ee5f4526286c231c8bb376c Author: gokaysatir AuthorDate: Fri Aug 28 11:17:03 2020 +0300 Commit: Szymon Kłos CommitDate: Mon Aug 31 13:24:00 2020 +0200 loleaflet: Tablet notebookbar special case. Change-Id: I7acad9b8891cedac49f47746a61c8df6f19a1250 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101525 Reviewed-by: Szymon Kłos Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice diff --git a/loleaflet/src/control/Control.UIManager.js b/loleaflet/src/control/Control.UIManager.js index 3da1d6921..a4459e39e 100644 --- a/loleaflet/src/control/Control.UIManager.js +++ b/loleaflet/src/control/Control.UIManager.js @@ -114,7 +114,7 @@ L.Control.UIManager = L.Control.extend({ this.map.addControl(L.control.presentationBar()); } - if (window.mode.isMobile() || window.mode.isTablet()) { + if (window.mode.isMobile() || (window.mode.isTablet() && !enableNotebookbar)) { this.map.on('updatetoolbarcommandvalues', function() { w2ui['editbar'].refresh(); }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 536ccdd6017673d33f8a18f83c6ee2cf321e8786 Author: Tor Lillqvist AuthorDate: Mon Aug 31 12:34:41 2020 +0300 Commit: Tor Lillqvist CommitDate: Mon Aug 31 12:13:56 2020 +0200 Make comments match reality "Private" and "public" have no meaning in JavaScript as far as I know, there are only naming conventions. And we keep using properties and functions intended to be "private" (have names that start with an underscore) quite freely across source files and classes anyway. Also, the names in the comments were wrong. Change-Id: Ib5172c26be8818cb261dbe7d08d1c3245ff64af8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101699 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 852ab07fb..c3f578612 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -229,8 +229,8 @@ L.Map.Keyboard = L.Handler.extend({ return this.keymap[keyCode] || keyCode; }, - // Private onKeyDown - called only as a DOM event handler - // Calls the public onKeyDown(), but only if the event doesn't have + // _onKeyDown - called only as a DOM event handler + // Calls _handleKeyEvent(), but only if the event doesn't have // a charCode property (set to something different than 0) - that ignores // any 'beforeinput', 'keypress' and 'input' events that would add // printable characters. Those are handled by TextInput.js. @@ -245,7 +245,7 @@ L.Map.Keyboard = L.Handler.extend({ // _handleKeyEvent - checks if the given keyboard event shall trigger // a message to loolwsd, and calls the given keyEventFn(type, charcode, keycode) // callback if so. - // Called from private _onKeyDown + // Called from _onKeyDown _handleKeyEvent: function (ev, keyEventFn) { this._map.notifyActive(); if (this._map.slideShow && this._map.slideShow.fullscreen) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/BackgroundColor.js|2 +- loleaflet/src/layer/marker/TextInput.js |8 loleaflet/src/layer/tile/TileLayer.js | 10 +- loleaflet/src/map/handler/Map.Keyboard.js |4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 1bcf147083de59cc2732e4f9ce056cbb8f2f2434 Author: Tor Lillqvist AuthorDate: Fri Aug 28 14:05:13 2020 +0300 Commit: Tor Lillqvist CommitDate: Fri Aug 28 13:36:11 2020 +0200 Surely it is called loolwsd and not lowsd? Change-Id: Ie2d8a26fa55de484b6d04e12202ca449d005f7a7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101539 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/layer/BackgroundColor.js b/loleaflet/src/layer/BackgroundColor.js index 31a96ef17..3029657c8 100644 --- a/loleaflet/src/layer/BackgroundColor.js +++ b/loleaflet/src/layer/BackgroundColor.js @@ -43,7 +43,7 @@ L.BackgroundColor = L.Layer.extend({ /* * A L.BackgroundColor that automatically resets its color - * based on 'statechange' messages from lowsd. + * based on 'statechange' messages from loolwsd. */ L.CalcBackground = L.BackgroundColor.extend({ onAdd: function(map) { diff --git a/loleaflet/src/layer/marker/TextInput.js b/loleaflet/src/layer/marker/TextInput.js index 24af6a272..bae93c25e 100644 --- a/loleaflet/src/layer/marker/TextInput.js +++ b/loleaflet/src/layer/marker/TextInput.js @@ -660,10 +660,10 @@ L.TextInput = L.Layer.extend({ this._emptyArea(); }, - // Sends the given (UTF-8) string of text to lowsd, as IME (text composition) + // Sends the given (UTF-8) string of text to loolwsd, as IME (text composition) // messages _sendText: function _sendText(text) { - this._fancyLog('send-text-to-lowsd', text); + this._fancyLog('send-text-to-loolwsd', text); // MSIE/Edge cannot compare a string to "\n" for whatever reason, // so compare charcode as well @@ -792,7 +792,7 @@ L.TextInput = L.Layer.extend({ _removeTextContent: function _removeTextContent(before, after) { console.log('Remove ' + before + ' before, and ' + after + ' after'); - /// TODO: rename the event to 'removetextcontent' as soon as lowsd supports it + /// TODO: rename the event to 'removetextcontent' as soon as loolwsd supports it /// TODO: Ask Marco about it this._map._socket.sendMessage( 'removetextcontext id=' + @@ -805,7 +805,7 @@ L.TextInput = L.Layer.extend({ // Tiny helper - encapsulates sending a 'textinput' websocket message. // sends a pair of "input" for a composition update paird with an "end" _sendCompositionEvent: function _sendCompositionEvent(text) { - console.log('sending to lowsd: ', text); + console.log('sending to loolwsd: ', text); // We want to trigger auto-correction, but not if we may // have to delete a count of characters in the future, diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 71340ad89..e7558562c 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -796,7 +796,7 @@ L.TileLayer = L.GridLayer.extend({ _onCellAddressMsg: function (textMsg) { // When the user moves the focus to a different cell, a 'cellformula' - // message is received from lowsd, *then* a 'celladdress' message. + // message is received from loolwsd, *then* a 'celladdress' message. var address = textMsg.substring(13); if (this._map._clip && !this._map['wopi'].DisableCopy) { this._map._clip.setTextSelectionText(this._lastFormula); @@ -805,10 +805,10 @@ L.TileLayer = L.GridLayer.extend({ }, _onCellFormulaMsg: function (textMsg) { - // When a 'cellformula' message from lowsd is received, + // When a 'cellformula' message from loolwsd is received, // store the text contents of the cell, but don't push // them to the clipboard container (yet). - // This is done because lowsd will send several 'cellformula' + // This is done because loolwsd will send several 'cellformula' // messages during text composition, and resetting the contents // of the clipboard container mid-composition will easily break it. var formula = textMsg.substring(13); @@ -2166,14 +2166,14 @@ L.TileLayer = L.GridLayer.extend({ } }, - // Given a character code and a UNO keycode, send a "key" message to lowsd. + // Given a character code and a UNO keycode, send a "key" message to lo
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js |1 + 1 file changed, 1 insertion(+) New commits: commit 939ab8444042e2c486190a3815f1043a3686a7dd Author: Andras Timar AuthorDate: Fri Aug 28 08:37:55 2020 +0200 Commit: Andras Timar CommitDate: Fri Aug 28 10:46:05 2020 +0200 Revert "Disable insert comment on spreadsheet for mobile" This reverts commit 0cc4977abdbb0225c8c1a5f59b5bc00891463775. Reason for revert: after Pranam's fixes viewing/hiding/modifying comments work as expected, therefore we can have this option back. Change-Id: I299f33552ae26d29ea2078c286bc5c785ebdb7a9 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101517 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 5ea9a8500..074ec743a 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -698,6 +698,7 @@ L.Control.Menubar = L.Control.extend({ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, {name: _UNO('.uno:InsertGraphic', 'spreadsheet'), id: 'insertgraphicremote', type: 'action'}, {uno: '.uno:InsertObjectChart'}, + {name: _UNO('.uno:InsertAnnotation', 'spreadsheet'), id: 'insertcomment', type: 'action'}, {type: 'separator'}, {name: _UNO('.uno:HyperlinkDialog'), id: 'inserthyperlink', type: 'action'}, {name: _UNO('.uno:ShapesMenu'), id: 'insertshape', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 5181e6d51d392488e38b6e85d713248a42864509 Author: Pranam Lashkari AuthorDate: Fri Aug 28 02:03:29 2020 +0530 Commit: Andras Timar CommitDate: Fri Aug 28 10:31:04 2020 +0200 leaflet: use vex dialog to modify comments in calc mobile Change-Id: I7c76c3cb9b5438f010752933db45f30899068d4c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101507 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index c5072f233..534c307ab 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -93,8 +93,13 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({ }, onAnnotationModify: function (annotation) { - annotation.edit(); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + var that = this; + this.newAnnotationVex(annotation, function(annotation) { that._onAnnotationSave(annotation); }, /* isMod */ true); + } else { + annotation.edit(); + annotation.focus(); + } }, onAnnotationRemove: function (id) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.ContextMenu.js |1 - loleaflet/src/control/Control.JSDialogBuilder.js |4 loleaflet/src/layer/tile/CalcTileLayer.js|2 +- 3 files changed, 5 insertions(+), 2 deletions(-) New commits: commit d3780ad1416fd9eed013e8e766545c8dc7fce8e5 Author: Pranam Lashkari AuthorDate: Wed Aug 26 04:06:24 2020 +0530 Commit: Andras Timar CommitDate: Fri Aug 28 10:30:08 2020 +0200 leaflet: fixed show/hide comment in context menu Change-Id: Ia18c92832c0dd0de5a09b6e434b4afe4ca9afb26 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101375 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index db34a5600..3f0a4c035 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -78,7 +78,6 @@ L.Control.ContextMenu = L.Control.extend({ 'SpellingAndGrammarDialog', 'FontDialog', 'FontDialogForParagraph', // spreadsheet 'FormatCellDialog', - 'ShowNote', 'HideNote', 'DeleteNote', ] }, diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index ca72b9be7..ab9056aef 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -2163,6 +2163,10 @@ L.Control.JSDialogBuilder = L.Control.extend({ data.command.startsWith('.uno:InsertPageFooter')) && data.checked && data.checked === true) { return; + } else if (data.command === '.uno:ShowNote') { + builder.map._docLayer.showAnnotationFromCurrentCell(); + } else if (data.command === '.uno:HideNote') { + builder.map._docLayer.hideAnnotationFromCurrentCell(); } builder.map.sendUnoCommand(data.command); } diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 35eae4c14..c5072f233 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -130,7 +130,7 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({ var annotations = this._annotations[this._selectedPart]; for (var key in annotations) { var annotation = annotations[key]._annotation; - if (this._cellCursor.contains(annotation._data.cellPos)) { + if (this._cellCursor.intersects(annotation._data.cellPos)) { this._map.addLayer(annotation); annotation.show(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarCalc.js | 22 ++ 1 file changed, 22 insertions(+) New commits: commit 6f18c16d4247a60bdb646bef1508ca5b72a8ba25 Author: Szymon Kłos AuthorDate: Wed Aug 26 09:37:18 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Aug 26 10:50:30 2020 +0200 notebookbar: add comment in insert tab (calc) Change-Id: I65fff06355ccf541e7447c2bad42148f600e7106 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101380 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarCalc.js b/loleaflet/src/control/Control.NotebookbarCalc.js index de2a5f827..f21959f7b 100644 --- a/loleaflet/src/control/Control.NotebookbarCalc.js +++ b/loleaflet/src/control/Control.NotebookbarCalc.js @@ -2260,6 +2260,28 @@ L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({ } ], 'vertical': 'false' + }, + { + 'id': 'Insert-Section-Annotation', + 'type': 'container', + 'text': '', + 'enabled': 'true', + 'children': [ + { + 'id': 'Annotation', + 'type': 'toolbox', + 'text': '', + 'enabled': 'true', + 'children': [ + { + 'type': 'bigtoolitem', + 'text': _UNO('.uno:InsertAnnotation', 'spreadsheet'), + 'command': '.uno:InsertAnnotation' + } + ] +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarBuilder.js |2 +- loleaflet/src/control/Control.UIManager.js |6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit f6e7ec9ee137f5a3b5dc21d5e452ea3e78d11832 Author: Szymon Kłos AuthorDate: Tue Aug 25 12:26:51 2020 +0200 Commit: Szymon Kłos CommitDate: Tue Aug 25 13:08:56 2020 +0200 notebookbar: always extend on tab click Change-Id: Ic7b8166c636e61f79042092cabcce1e8c62286ac Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101316 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index 544a7a017..d0b507564 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -316,7 +316,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ if (tabIsSelected && !notebookbarIsCollapsed) { builder.wizard.collapse(); - } else if (tabIsSelected && notebookbarIsCollapsed) { + } else if (notebookbarIsCollapsed) { builder.wizard.extend(); } diff --git a/loleaflet/src/control/Control.UIManager.js b/loleaflet/src/control/Control.UIManager.js index 8b68b0ab8..3da1d6921 100644 --- a/loleaflet/src/control/Control.UIManager.js +++ b/loleaflet/src/control/Control.UIManager.js @@ -220,6 +220,9 @@ L.Control.UIManager = L.Control.extend({ }, collapseNotebookbar: function() { + if (this.isNotebookbarCollapsed()) + return; + this.moveObjectVertically($('#spreadsheet-row-column-frame'), -85); this.moveObjectVertically($('#document-container'), -85); this.moveObjectVertically($('#presentation-controls-wrapper'), -85); @@ -231,6 +234,9 @@ L.Control.UIManager = L.Control.extend({ }, extendNotebookbar: function() { + if (!this.isNotebookbarCollapsed()) + return; + this.moveObjectVertically($('#spreadsheet-row-column-frame'), 85); this.moveObjectVertically($('#document-container'), 85); this.moveObjectVertically($('#presentation-controls-wrapper'), 85); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 78e3fd8716b85a7effe188a377f05325a541501b Author: Szymon Kłos AuthorDate: Mon Aug 24 16:12:53 2020 +0200 Commit: Szymon Kłos CommitDate: Tue Aug 25 10:47:19 2020 +0200 notebookbar: avoid doubled tab switch Don't send notification about switching to the custom tabs (negative ids). Change-Id: I6a67d2889087ff757a7a84a815bb484f1bc0fca5 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101281 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index d0bb67244..ca72b9be7 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -719,7 +719,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ var fn = function(id) { return function() { builder._createTabClick(builder, id, tabs, contentDivs, tabIds)(); - builder.callback('tabcontrol', 'selecttab', tabsContainer, data.tabs[id].id - 1, builder); + if (data.tabs[id].id - 1 >= 0) + builder.callback('tabcontrol', 'selecttab', tabsContainer, data.tabs[id].id - 1, builder); }; }; $(tabs[t]).click(fn(t)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |1 - 1 file changed, 1 deletion(-) New commits: commit b72146bfaca36b05ca12672582380abc55a4ebde Author: Szymon Kłos AuthorDate: Mon Aug 24 14:40:43 2020 +0200 Commit: Szymon Kłos CommitDate: Mon Aug 24 16:15:38 2020 +0200 Revert "Remove parameters from uno commands when creating image names." This reverts commit 73227645c0d62d69c59aa0bb552ccdc906064b82. Reason for revert: Change-Id: Iad24abbe8f84b4624d729801b925b80da4478120 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101160 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index d4737b021..d0bb67244 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1606,7 +1606,6 @@ L.Control.JSDialogBuilder = L.Control.extend({ var prefixLength = '.uno:'.length; if (name.substr(0, prefixLength) == '.uno:') cleanName = name.substr(prefixLength); - cleanName = cleanName.replace(/\?.*$/,''); // remove potential parameters cleanName = encodeURIComponent(cleanName).replace(/\%/g, ''); return L.LOUtil.getImageURL('lc_' + cleanName.toLowerCase() + '.svg'); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e7b92924f8ffb591e70d6898491667ab5fd92e43 Author: Tor Lillqvist AuthorDate: Tue Aug 18 13:46:44 2020 +0300 Commit: Andras Timar CommitDate: Sun Aug 23 11:42:09 2020 +0200 Guard against TypeError: null is not an object Change-Id: I9a7c708bf753891d54ce8da91b2e9aaeb352cd45 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100913 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 895af0561..d4737b021 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -485,7 +485,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ if (builder.wizard && data.enabled !== 'false') { $(sectionTitle).click(function(event, data) { builder.wizard.goLevelDown(contentDiv, data); - if (contentNode.onshow) + if (contentNode && contentNode.onshow) contentNode.onshow(); }); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) New commits: commit 701e78a6aef7013622c95c75c2a37f9e6e870a2b Author: Michael Meeks AuthorDate: Wed Aug 19 18:21:00 2020 +0100 Commit: Michael Meeks CommitDate: Thu Aug 20 11:23:06 2020 +0200 Detect dpi scale factor change and re-render. Change-Id: I4c09ade1efdfee67bc5d9224c50cf1825b6657fb Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101016 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 06911991c..f6c29d57a 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -40,10 +40,11 @@ L.CanvasTilePainter = L.Class.extend({ debug: false, }, - initialize: function (layer, dpiScale, enableImageSmoothing) { + initialize: function (layer, enableImageSmoothing) { this._layer = layer; this._canvas = this._layer._canvas; + var dpiScale = L.getDpiScaleFactor(); if (dpiScale === 1 || dpiScale === 2) { enableImageSmoothing = (enableImageSmoothing === true); } @@ -221,10 +222,12 @@ L.CanvasTilePainter = L.Class.extend({ var newTopLeft = pixelBounds.getTopLeft(); var part = this._layer._selectedPart; var newSplitPos = splitPanesContext ? - splitPanesContext.getSplitPos(): this._splitPos; + splitPanesContext.getSplitPos(): this._splitPos; + var newDpiScale = L.getDpiScaleFactor(); var zoomChanged = (zoom !== this._lastZoom); var partChanged = (part !== this._lastPart); + var scaleChanged = this._dpiScale != newDpiScale; var mapSizeChanged = !newMapSize.equals(this._lastMapSize); // To avoid flicker, only resize the canvas element if width or height of the map increases. @@ -241,13 +244,16 @@ L.CanvasTilePainter = L.Class.extend({ !zoomChanged && !partChanged && !resizeCanvas && - !splitPosChanged); + !splitPosChanged && + !scaleChanged); if (skipUpdate) { return; } + if (scaleChanged) + this._dpiScale = L.getDpiScaleFactor(); - if (resizeCanvas) { + if (resizeCanvas || scaleChanged) { this._setCanvasSize(newSize.x, newSize.y); this._lastSize = newSize; } @@ -265,7 +271,8 @@ L.CanvasTilePainter = L.Class.extend({ // TODO: fix _shiftAndPaint for high DPI. var shiftPaintDisabled = true; - var fullRepaintNeeded = zoomChanged || partChanged || resizeCanvas || shiftPaintDisabled; + var fullRepaintNeeded = zoomChanged || partChanged || resizeCanvas || + shiftPaintDisabled || scaleChanged; this._lastZoom = zoom; this._lastPart = part; @@ -439,7 +446,7 @@ L.CanvasTileLayer = L.TileLayer.extend({ } this._canvas = L.DomUtil.create('canvas', '', this._canvasContainer); - this._painter = new L.CanvasTilePainter(this, L.getDpiScaleFactor()); + this._painter = new L.CanvasTilePainter(this); this._container.style.position = 'absolute'; if (L.Browser.cypressTest) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |3 +++ 1 file changed, 3 insertions(+) New commits: commit 252c9245a68255836173a573554c9dd522790ce6 Author: Szymon Kłos AuthorDate: Mon Aug 10 14:43:44 2020 +0200 Commit: Andras Timar CommitDate: Wed Aug 19 22:57:28 2020 +0200 Show availible user avatars in comments in calc Shows only for users which are present in the session as oly for them we have available data. Change-Id: I26b7c7f4358873216dba9fbf69a2608b1bf0803f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100430 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101019 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 917b08b1d..35eae4c14 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -884,6 +884,9 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({ for (var index in values.comments) { comment = values.comments[index]; comment.tab = parseInt(comment.tab); + if (comment.author in this._map._viewInfoByUserName) { + comment.avatar = this._map._viewInfoByUserName[comment.author].userextrainfo.avatar; + } comment.cellPos = L.LOUtil.stringToBounds(comment.cellPos); comment.cellPos = L.latLngBounds(this._twipsToLatLng(comment.cellPos.getBottomLeft()), this._twipsToLatLng(comment.cellPos.getTopRight())); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/Annotation.js |1 + 1 file changed, 1 insertion(+) New commits: commit 7e2929674a772046774ae2825abf72b94353a0e3 Author: Szymon Kłos AuthorDate: Thu Aug 13 09:41:05 2020 +0200 Commit: Andras Timar CommitDate: Wed Aug 19 22:52:50 2020 +0200 When avatar fails to load use generic image Change-Id: I03659a75ed168b15483ef46677eae4989b734933 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100643 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101021 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index e11665af9..797c2d432 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -225,6 +225,7 @@ L.Annotation = L.Layer.extend({ imgAuthor.setAttribute('src', L.LOUtil.getImageURL('user.svg')); imgAuthor.setAttribute('width', this.options.imgSize.x); imgAuthor.setAttribute('height', this.options.imgSize.y); + imgAuthor.onerror = function () { imgAuthor.setAttribute('src', L.LOUtil.getImageURL('user.svg')); }; this._authorAvatarImg = imgAuthor; this._authorAvatartdImg = tdImg; this._contentAuthor = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-author', tdAuthor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.UserList.js | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) New commits: commit f513eaf5a19dab18376a1ceafbaf6700b6a48419 Author: Andras Timar AuthorDate: Wed Aug 19 21:39:23 2020 +0200 Commit: Andras Timar CommitDate: Wed Aug 19 22:06:39 2020 +0200 do not show broken images instead of avatars, 2nd try Change-Id: Iab87518807ce11bbcf19ff8436b9241527140b7a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101023 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js index 949394e4f..47a259eca 100644 --- a/loleaflet/src/control/Control.UserList.js +++ b/loleaflet/src/control/Control.UserList.js @@ -85,19 +85,11 @@ L.Control.UserList = L.Control.extend({ var iconTd = L.DomUtil.create('td', 'usercolor', content); var nameTd = L.DomUtil.create('td', 'username loleaflet-font', content); - var hasAvatar = false; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { - var http = new XMLHttpRequest(); - http.open('HEAD', extraInfo.avatar, false); - http.send(); - if (http.status != 404) { - hasAvatar = true; - } - } - - if (hasAvatar) { var img = L.DomUtil.create('img', 'avatar-img', iconTd); img.src = extraInfo.avatar; + var altImg = L.LOUtil.getImageURL('user.svg'); + img.setAttribute('onerror', 'this.onerror=null;this.src=\'' + altImg + '\';'); $(img).css({'border-color': color}); } else { img = L.DomUtil.create('div', 'user-info', iconTd); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/TextInput.js | 87 +++- 1 file changed, 86 insertions(+), 1 deletion(-) New commits: commit c440e8dd7bdf4e1c326fc6af388fababa63457e5 Author: Tor Lillqvist AuthorDate: Wed Aug 19 11:19:35 2020 +0300 Commit: Tor Lillqvist CommitDate: Wed Aug 19 19:34:41 2020 +0200 Use CollaboraOnlineWebViewKeyboardManager if available If loleaflet is embedded in an iOS app that uses CollaboraOnlineWebViewKeyboardManager, then we can use that to reliably display and hide the on-screen keyboard. (Such iOS apps are Collabora Office or Nextcloud.) This is optional as we can't be sure whether the version of the iOS app we are embedded in uses CollaboraOnlineWebViewKeyboardManager or not. If not, work as before. I.e. hope that calling the focus()/blur() methods of a textarea object will show/hide the on-screen keyboard. Change-Id: Idddedcb4a83588c622067cdbeadb02ecdbd4fc72 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100980 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/layer/marker/TextInput.js b/loleaflet/src/layer/marker/TextInput.js index 6d7ec5851..24af6a272 100644 --- a/loleaflet/src/layer/marker/TextInput.js +++ b/loleaflet/src/layer/marker/TextInput.js @@ -1,4 +1,4 @@ -/* -*- js-indent-level: 8 -*- */ +/* -*- js-indent-level: 8; fill-column: 100 -*- */ /* * L.TextInput is the hidden textarea, which handles text input events * @@ -168,6 +168,81 @@ L.TextInput = L.Layer.extend({ return; } + // Are we running in a WebView under an iOS app that uses + // CollaboraOnlineWebViewKeyboardManager? + if (window.webkit && + window.webkit.messageHandlers && + window.webkit.messageHandlers.CollaboraOnlineWebViewKeyboardManager) { + + if (!acceptInput) { + window.webkit.messageHandlers.CollaboraOnlineWebViewKeyboardManager.postMessage({command: 'hide'}); + return; + } + + // Define the function that CollaboraOnlineWebViewKeyboardManager will call. + // This is a hardcoded name that CollaboraOnlineWebViewKeyboardManager + // knows. This is not a problem as we can keep both codebases in sync. + + var that = this; + window.COKbdMgrCallback = function(message) { + var errorMessage; + if (typeof message !== 'object') { + errorMessage = 'COKbdMgrCallback called with non-object of type ' + typeof message; + console.log(errorMessage); + throw errorMessage; + } + + if (message.id !== 'COKbdMgr') { + errorMessage = 'COKbdMgrCallback called with object with unknown id: ' + message.id; + console.log(errorMessage); + throw errorMessage; + } + + if (message.command === undefined || typeof message.command !== 'string') { + errorMessage = 'COKbdMgrCallback called without command'; + console.log(errorMessage); + throw errorMessage; + } + + if (message.command === 'replaceText') { + if (message.text === undefined || typeof message.text !== 'string') { + errorMessage = 'COKbdMgrCallback called for replaceText without text'; + console.log(errorMessage); + throw errorMessage; + } + + if (message.location === undefined || typeof message.location !== 'number') { + errorMessage = 'COKbdMgrCallback called for replaceText without location'; + console.log(errorMessage); + throw errorMessage; + } + + if (message.length === undefined || typeof message.length !== 'number') { + errorMessage = 'COKbdMgrCallback called for replaceText without length'; + console.log(errorMessage); +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js |8 1 file changed, 8 deletions(-) New commits: commit 8657bd21cebac35aa3f09a564e3000a37c94a6c8 Author: Michael Meeks AuthorDate: Tue Aug 18 19:54:41 2020 +0100 Commit: Michael Meeks CommitDate: Wed Aug 19 11:29:42 2020 +0200 We no longer need to mess with focus during sidebar paint. TextInput.js sends keyboard events to the right dialog window now by referring to Map.js - rather than needing several different places that can be focuses. Change-Id: I044bc858a80379b68838d64d1987a1dbd9007195 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100955 Reviewed-by: Ashod Nakashian Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Tested-by: Ashod Nakashian diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index e9440b15f..337acfa5d 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -1610,14 +1610,6 @@ L.Control.LokDialog = L.Control.extend({ spreadsheetRowColumnFrame.style.right = width.toString() + 'px'; this._resizeCalcInputBar(deckOffset); - - // If we didn't have the focus, don't steal it form the editor. - if ($('#' + this._currentDeck.strId + '-cursor').css('display') === 'none') { - if (this._map.editorHasFocus()) { - this._map.fire('editorgotfocus'); - this._map.focus(); - } - } }, _resizeCalcInputBar: function(offset) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.UserList.js | 40 ++ 1 file changed, 25 insertions(+), 15 deletions(-) New commits: commit 449dc691d2d2ebcc6d81410f536b0fc04ff8b0bd Author: Andras Timar AuthorDate: Wed Aug 19 11:19:08 2020 +0200 Commit: Andras Timar CommitDate: Wed Aug 19 11:25:22 2020 +0200 do not show broken images instead of avatars Change-Id: I6babd0a892dccc2ca5d6d1bf6ac6e6007411b1e2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100977 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js index 9a7c27386..949394e4f 100644 --- a/loleaflet/src/control/Control.UserList.js +++ b/loleaflet/src/control/Control.UserList.js @@ -85,7 +85,17 @@ L.Control.UserList = L.Control.extend({ var iconTd = L.DomUtil.create('td', 'usercolor', content); var nameTd = L.DomUtil.create('td', 'username loleaflet-font', content); + var hasAvatar = false; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { + var http = new XMLHttpRequest(); + http.open('HEAD', extraInfo.avatar, false); + http.send(); + if (http.status != 404) { + hasAvatar = true; + } + } + + if (hasAvatar) { var img = L.DomUtil.create('img', 'avatar-img', iconTd); img.src = extraInfo.avatar; $(img).css({'border-color': color}); @@ -93,9 +103,9 @@ L.Control.UserList = L.Control.extend({ img = L.DomUtil.create('div', 'user-info', iconTd); $(img).css({'background-color': color}); } - + nameTd.innerHTML = userName; - + return content; }, @@ -105,7 +115,7 @@ L.Control.UserList = L.Control.extend({ if (userlistItem == null) { return; } - + var count = $(userlistItem.html).find('#userlist_table tbody tr').length; if (count > 1) { userlistItem.text = this.options.nUsers.replace('%n', count); @@ -114,9 +124,9 @@ L.Control.UserList = L.Control.extend({ } else { userlistItem.text = this.options.noUser; } - + w2ui['actionbar'].refresh(); - + var hideUserList = window.ThisIsAMobileApp || (this.map['wopi'].HideUserList !== null && this.map['wopi'].HideUserList !== undefined && @@ -124,7 +134,7 @@ L.Control.UserList = L.Control.extend({ (window.mode.isMobile() && $.inArray('mobile', this.map['wopi'].HideUserList) >= 0) || (window.mode.isTablet() && $.inArray('tablet', this.map['wopi'].HideUserList) >= 0) || (window.mode.isDesktop() && $.inArray('desktop', this.map['wopi'].HideUserList) >= 0)); - + if (!hideUserList && count > 1) { actionbar.show('userlist'); actionbar.show('userlistbreak'); @@ -139,7 +149,7 @@ L.Control.UserList = L.Control.extend({ if (userlistItem === null) { return; } - + $('#user-' + e.viewId).removeClass('selected-user'); }, @@ -169,10 +179,10 @@ L.Control.UserList = L.Control.extend({ var userlistItem = w2ui['actionbar'].get('userlist'); var username = this.escapeHtml(e.username); var showPopup = false; - + if (userlistItem !== null) showPopup = $(userlistItem.html).find('#userlist_table tbody tr').length > 0; - + if (showPopup) { $('#tb_actionbar_item_userlist') .w2overlay({ @@ -188,18 +198,18 @@ L.Control.UserList = L.Control.extend({ that.options.userPopupTimeout = null; }, 3000); } - + var color = L.LOUtil.rgbToHex(this.map.getViewColor(e.viewId)); if (e.viewId === this.map._docLayer._viewId) { username = _('You'); color = '#000'; } - + // Mention readonly sessions in userlist if (e.readonly) { username += ' (' + _('Readonly') + ')'; } - + if (userlistItem !== null) { var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(this.getUserItem(e.vie
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 46e996c76f8f03b4ff8c55f15a3375a1d76fae48 Author: gokaysatir AuthorDate: Thu Aug 13 20:37:32 2020 +0300 Commit: Henry Castro CommitDate: Tue Aug 18 19:52:41 2020 +0200 loleaflet: Make sure lokchild window is not rendered off screen. Change-Id: Ib1d8c045750aeb653d8b1d1e962711e5da1705fe Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100683 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 40e422e02..e9440b15f 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -1562,6 +1562,14 @@ L.Control.LokDialog = L.Control.extend({ var newLeft = window.innerWidth - width - 20; L.DomUtil.setStyle(canvas, 'left', newLeft + 'px'); } + // Also, make sure child is not trimmed on bottom. + var top = parseInt(canvas.style.top); + var height = this._dialogs[parentId].childheight; + var bottomPos = top + height; + if (bottomPos > window.innerHeight) { + var newTop = top - height - 20; + L.DomUtil.setStyle(canvas, 'top', newTop + 'px'); + } // The image is rendered per the HiDPI scale we used // while requesting rendering the image. Here we @@ -1674,7 +1682,7 @@ L.Control.LokDialog = L.Control.extend({ var grandParentID = dialogContainer.parentNode.id; if (grandParentID.includes('sidebar-panel')) { - // This is a sidebar. + // floatingCanvas is a child window of a sidebar. L.DomUtil.setStyle(floatingCanvas, 'left', (containerLeft + left) + 'px'); L.DomUtil.setStyle(floatingCanvas, 'top', (containerTop + top) + 'px'); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js | 10 ++ 1 file changed, 10 insertions(+) New commits: commit f6db27343ff9eabe484a07382b2f67f5193ff63c Author: Andras Timar AuthorDate: Tue Aug 18 14:17:38 2020 +0200 Commit: Andras Timar CommitDate: Tue Aug 18 16:18:41 2020 +0200 polyfill endsWidth for IE11 Change-Id: I4a2d3af2ccffdc7dcd79ff24e00c909bc57d365e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100916 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index c6b20a6ff..5ea9a8500 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -1437,6 +1437,16 @@ L.Control.Menubar = L.Control.extend({ if (menuItem.drawing === false && this._map.getDocType() === 'drawing') return false; + // polyfill endsWidth for IE11 + if (!String.prototype.endsWith) { + String.prototype.endsWith = function(search, thisLen) { + if (thisLen === undefined || thisLen > this.length) { + thisLen = this.length; + } + return this.substring(thisLen - search.length, thisLen) === search; + }; + } + if (menuItem.id === 'downloadas-odg' && !this._map['wopi'].BaseFileName.endsWith('.odg')) return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 6c161540a9ba5942ba052e6c2b8aebed7ec5ef1b Author: Michael Meeks AuthorDate: Tue Aug 18 10:39:05 2020 +0100 Commit: Michael Meeks CommitDate: Tue Aug 18 11:57:37 2020 +0200 Fix annoying exception on calc close with annotations. Change-Id: Ic9fbdd443419365470137858dac2e5b3de71c9b7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100906 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 337ba0f68..917b08b1d 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -63,9 +63,11 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({ }, clearAnnotations: function () { - for (var tab in this._annotations) { - this.hideAnnotations(tab); - } + if (this._map) { + for (var tab in this._annotations) { + this.hideAnnotations(tab); + } + } // else during shutdown. this._annotations = {}; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.TopToolbar.js |8 1 file changed, 8 insertions(+) New commits: commit 0d2a32fe2a030c5c7f02cbb0912434844d240db9 Author: Ashod Nakashian AuthorDate: Tue Aug 11 13:51:19 2020 -0400 Commit: Ashod Nakashian CommitDate: Tue Aug 18 02:28:26 2020 +0200 leaflet: hide the splitter on the toolbar if the first When the toobar buttons to the left of the first splitter are hidden, we start the toolbar with a splitter, which is aesthetically unpleasant. Here we special case for the desktop only, because tablets and mobiles have a slightly different toolbar. Although we should have a similar logic for them too. Change-Id: I9869433f3ca3391d7ee899a77bb1466fe456f9f2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100832 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/loleaflet/src/control/Control.TopToolbar.js b/loleaflet/src/control/Control.TopToolbar.js index 34450e934..2f896e778 100644 --- a/loleaflet/src/control/Control.TopToolbar.js +++ b/loleaflet/src/control/Control.TopToolbar.js @@ -373,6 +373,14 @@ L.Control.TopToolbar = L.Control.extend({ if (e.HidePrintOption) { w2ui['editbar'].hide('print'); } + + // On desktop we only have Save and Print buttons before the first + // splitter/break. Hide the splitter if we hid both save and print. + // TODO: Apply the same logic to mobile/tablet to avoid beginning with a splitter. + if (window.mode.isDesktop() && e.HideSaveOption && e.HidePrintOption) { + w2ui['editbar'].hide('savebreak'); + } + if (e.EnableInsertRemoteImage === true && w2ui['editbar']) { w2ui['editbar'].hide('insertgraphic'); w2ui['editbar'].show('menugraphic'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.MobileWizard.js | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit dcdb0afdf58c97c3d20fbf6a4e9d31f65544f6d0 Author: Henry Castro AuthorDate: Thu Aug 13 12:07:06 2020 -0400 Commit: Andras Timar CommitDate: Mon Aug 17 17:56:37 2020 +0200 loleaflet: fix uncaught exception Control.MobileWizard.js:363 Uncaught TypeError: Cannot read property 'children' of undefined at NewClass._onMobileWizard (Control.MobileWizard.js:363) Change-Id: I13617414aca15d8c6120261264911322128a181a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100680 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 8f399f69c..58f405f50 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -356,10 +356,12 @@ L.Control.MobileWizard = L.Control.extend({ this._reset(); - var mWizardContentLength; - if (data.children[0].type == 'menuitem' || data.children[0].children === undefined) - mWizardContentLength = data.children.length; - else mWizardContentLength = data.children[0].children.length; + var mWizardContentLength = 0; + if (data.children.length > 0) { + if (data.children[0].type == 'menuitem' || data.children[0].children === undefined) + mWizardContentLength = data.children.length; + else mWizardContentLength = data.children[0].children.length; + } this._showWizard(mWizardContentLength); if (!this._map._docLayer.isCalc()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js |4 +--- loleaflet/src/control/Ruler.js |8 ++-- loleaflet/src/dom/DomUtil.js |6 ++ 3 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 1ff9b38198aa503b07023c09902ebea9c328aebd Author: Henry Castro AuthorDate: Mon Aug 17 10:46:00 2020 -0400 Commit: Henry Castro CommitDate: Mon Aug 17 17:50:29 2020 +0200 loleaflet: simplify remove child nodes Change-Id: Ie14b9b933aad74d31acd6add5c07f1e5d9b94b91 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100866 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 531aa3f28..c6b20a6ff 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -849,9 +849,7 @@ L.Control.Menubar = L.Control.extend({ _onRefresh: function() { // clear initial menu - while (this._menubarCont.hasChildNodes()) { - this._menubarCont.removeChild(this._menubarCont.firstChild); - } + L.DomUtil.removeChildNodes(this._menubarCont); // Add document specific menu var docType = this._map.getDocType(); diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index bcca9e186..f9b4a913e 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -294,9 +294,7 @@ L.Control.Ruler = L.Control.extend({ var numCounter = -1 * parseInt(lMargin / 1000); - while (this._rBPContainer.hasChildNodes()) { - this._rBPContainer.removeChild(this._rBPContainer.lastChild); - } + L.DomUtil.removeChildNodes(this._rBPContainer); // this.options.pageWidth is in mm100, so the code here makes one ruler division per // centimetre. @@ -319,9 +317,7 @@ L.Control.Ruler = L.Control.extend({ // The tabstops. Only draw user-created ones, with style RULER_TAB_LEFT, // RULER_TAB_RIGHT, RULER_TAB_CENTER, and RULER_TAB_DECIMAL. See . - while (this._rTSContainer.hasChildNodes()) { - this._rTSContainer.removeChild(this._rTSContainer.lastChild); - } + L.DomUtil.removeChildNodes(this._rTSContainer); var pxPerMm100 = this._map._docLayer._docPixelSize.x / (this._map._docLayer._docWidthTwips * 2540/1440); this._rTSContainer.tabStops = []; diff --git a/loleaflet/src/dom/DomUtil.js b/loleaflet/src/dom/DomUtil.js index 39b87eea6..495421600 100644 --- a/loleaflet/src/dom/DomUtil.js +++ b/loleaflet/src/dom/DomUtil.js @@ -110,6 +110,12 @@ L.DomUtil = { } }, + removeChildNodes: function (el) { + while (el.hasChildNodes()) { + el.removeChild(el.lastChild); + } + }, + setClass: function (el, name) { if (el.className.baseVal === undefined) { el.className = name; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |1 + 1 file changed, 1 insertion(+) New commits: commit 73227645c0d62d69c59aa0bb552ccdc906064b82 Author: Michael Meeks AuthorDate: Fri Aug 14 17:54:08 2020 +0100 Commit: Michael Meeks CommitDate: Sat Aug 15 10:59:14 2020 +0200 Remove parameters from uno commands when creating image names. Change-Id: I26b4a6793e03b178382c04c91bd07b29182176ac Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100760 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index d9fd75926..895af0561 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1606,6 +1606,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var prefixLength = '.uno:'.length; if (name.substr(0, prefixLength) == '.uno:') cleanName = name.substr(prefixLength); + cleanName = cleanName.replace(/\?.*$/,''); // remove potential parameters cleanName = encodeURIComponent(cleanName).replace(/\%/g, ''); return L.LOUtil.getImageURL('lc_' + cleanName.toLowerCase() + '.svg'); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js |5 + 1 file changed, 5 insertions(+) New commits: commit eb8e075ce02e54da4f5eca86157919001978cda0 Author: gokaysatir AuthorDate: Wed Aug 12 17:20:54 2020 +0300 Commit: Henry Castro CommitDate: Thu Aug 13 21:08:24 2020 +0200 loleaflet: Prevent sidebar from opening when file is on read only mode. This patch is for preventing sidebar from being launched when: * Document is on read only mode (No need for an editor bar when doc is read-only). * Also the main reason for this patch was to hide Sidebar when revision history is open (NC). Change-Id: I4d78c65a7e8f39b0827b9e23ecc24fcd9520fef8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100601 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 3332c53ed..40e422e02 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -991,6 +991,11 @@ L.Control.LokDialog = L.Control.extend({ }, _launchSidebar: function(id, width, height) { + // In read-only mode, we don't need to show sidebar. This if clause prevents sidebar from opening also when revision history is open. + if (this._map.isPermissionReadOnly()) { + return; + } + console.log('_launchSidebar: start: id: ' + id + ', width: ' + width + ', height: ' + height); if ((window.mode.isMobile() || window.mode.isTablet()) && !this._map.isPermissionEdit()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/TextInput.js | 52 +- loleaflet/src/map/handler/Map.TouchGesture.js |4 ++ 2 files changed, 47 insertions(+), 9 deletions(-) New commits: commit 1d885323daf63650b2a435b4a640839e1e54bca7 Author: Tor Lillqvist AuthorDate: Wed Aug 12 17:02:56 2020 +0300 Commit: Tor Lillqvist CommitDate: Thu Aug 13 16:58:54 2020 +0200 Stopgap fix to make the on-screen keyboard behave a bit better on iPhone Our focus and blur back-and-forth dance does not seem to work on iOS like it does on Android. So for now, never call the textarea element's blur() function explicitly on iPhone. Also don't play with the readonly attribute on iPhone. Probably whether the calls to the textarea's focus() and blur() functions actually do anything or not might depend on whether the call stack originates in a user input event handler or not, for security reasons. Change-Id: I442f0c26ae5b36913235a7ef96820bff83535b76 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100611 Reviewed-by: Henry Castro Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/src/layer/marker/TextInput.js b/loleaflet/src/layer/marker/TextInput.js index 845bab5b6..6d7ec5851 100644 --- a/loleaflet/src/layer/marker/TextInput.js +++ b/loleaflet/src/layer/marker/TextInput.js @@ -155,6 +155,11 @@ L.TextInput = L.Layer.extend({ // @acceptInput (only on "mobile" (= mobile phone) or on iOS and Android in general) true if we want to // accept key input, and show the virtual keyboard. focus: function(acceptInput) { + // console.trace('L.TextInput.focus(' + acceptInput + ')'); + + // Note that the acceptInput parameter intentionally + // is a tri-state boolean: undefined, false, or true. + // Clicking or otherwise focusing the map should focus on the clipboard // container in order for the user to input text (and on-screen keyboards // to pop-up), unless the document is read only. @@ -165,23 +170,52 @@ L.TextInput = L.Layer.extend({ // Trick to avoid showing the software keyboard: Set the textarea // read-only before focus() and reset it again after the blur() - if ((window.ThisIsAMobileApp || window.mode.isMobile()) && acceptInput !== true) - this._textArea.setAttribute('readonly', true); + if (navigator.platform !== 'iPhone') { + if ((window.ThisIsAMobileApp || window.mode.isMobile()) && acceptInput !== true) + this._textArea.setAttribute('readonly', true); + } - this._textArea.focus(); + if (navigator.platform !== 'iPhone') { + this._textArea.focus(); + } else if (acceptInput === true) { + // On the iPhone, only call the textarea's focus() when we get an explicit + // true parameter. On the other hand, never call the textarea's blur(). - if ((window.ThisIsAMobileApp || window.mode.isMobile()) && acceptInput !== true) { - this._setAcceptInput(false); - this._textArea.blur(); - this._textArea.removeAttribute('readonly'); - } else { + // Calling blur() leads to so confusing behaviour with the keyboard not + // showing up when we want. Better to have it show up a bit too long that + // strictly needed. + + // Probably whether the calls to the textarea's focus() and blur() functions + // actually do anything or not might depend on whether the call stack + // originates in a user input event handler or not, for security reasons. + + // To investigate, uncomment the call to console.trace() at the start of + // this function, and check when the topmost slot in the stack trace is + // "(anonymous function)" in hammer.js (an event handler), and when it is + // _onMessage (the WebSocket message handler in Socket.js). + + this._textArea.focus(); + } + + if (navigator.platform !== 'iPhone') { + if ((window.ThisIsAMobileApp || window.mode.isMobile()) && acceptInput !== true) { + this._setAcceptInput(false); + this._textArea.blur(); + this._textArea.removeAttribute('readonly'); + } else { + this._setAcceptInput(true); + } + } else if (acceptInput !== false) {
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.LokDialog.js |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 35534b7d63d3072862cf02b7a9b910a8ff3e75e0 Author: Szymon Kłos AuthorDate: Thu Aug 13 10:52:49 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 13 11:18:20 2020 +0200 Handle calc-input-win position changes When notebookbar is created calc-input-win is moved down. This change takes into account that change and allows us to handle click position correctly. Change-Id: I7dd6f3ec7d65cd293721321b080626c61a84daf7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100649 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 9e9a1fe4d..3332c53ed 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -380,8 +380,8 @@ L.Control.LokDialog = L.Control.extend({ this._launchSidebar(e.id, width, height); } else if (e.winType === 'calc-input-win' || this.isCalcInputBar(e.id)) { lines = parseInt(e.lines); - left = left | this._calcInputBar.left; - top = top | this._calcInputBar.top; + left = left || this._calcInputBar.left; + top = top || this._calcInputBar.top; this._launchCalcInputBar(e.id, left, top, width, height, lines); } else { @@ -839,8 +839,10 @@ L.Control.LokDialog = L.Control.extend({ _adjustCalcInputBar: function(id, left, top, width, height, textLines) { if (this._calcInputBar) { var oldHeight = this._calcInputBar.height; + var oldX = this._calcInputBar.left; + var oldY = this._calcInputBar.top; var delta = height - oldHeight; - if (delta !== 0) { + if (delta !== 0 || oldX !== left || oldY !== top) { console.log('_adjustCalcInputBar: start: id: ' + id + ', height: ' + oldHeight + ' -> ' + height); // Recreate the input-bar. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit 5fb98cde3523dd470e59d4838e7e0174448b9f72 Author: Szymon Kłos AuthorDate: Mon Aug 10 13:24:15 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 13 09:49:13 2020 +0200 Don't ignore 'transparent' value for color Change-Id: Ie843e85fca76b5aad875426c661e9305c954d627 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100429 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky (cherry picked from commit 97fe8ac3209f952262e515ec05eac655a44f00c9) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100523 Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 2ea8f8fce..d9fd75926 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1760,6 +1760,13 @@ L.Control.JSDialogBuilder = L.Control.extend({ return false; }, + parseHexColor: function(color) { + if (color === 'transparent') + return -1; + else + return parseInt('0x' + color); + }, + _sendColorCommand: function(builder, data, color) { var gradientItem; @@ -1790,7 +1797,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var params = {}; params[data.id] = { type : 'long', - value : parseInt('0x' + color) + value : builder.parseHexColor(color) }; builder.map['stateChangeHandler'].setItemValue(data.command, params[data.id].value); @@ -1802,7 +1809,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ // update the item state as we send var items = builder.map['stateChangeHandler']; - items.setItemValue(data.command, parseInt('0x' + color)); + items.setItemValue(data.command, builder.parseHexColor(color)); builder.map.sendUnoCommand(command); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.MobileWizard.js |2 ++ 1 file changed, 2 insertions(+) New commits: commit 936ad9720819ff9072957347ab248828650cadbc Author: Tamás Zolnai AuthorDate: Wed Aug 12 18:10:00 2020 +0200 Commit: Tamás Zolnai CommitDate: Wed Aug 12 18:51:48 2020 +0200 Fix wrong internal state of mobile wizard. When mobile wizard is opened and then we open the hamburger menu without closing the mobile wizard the showSidebar flag is not set to false. So when a sidebar update comes from core then the hamburger menu is replaced with the sidebar content. Change-Id: I38601b3bf09309a62b2c3404f9ad27323c61cba1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100612 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 61f1017fb..8f399f69c 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -85,6 +85,8 @@ L.Control.MobileWizard = L.Control.extend({ $('#toolbar-down').hide(); if (window.ThisIsTheAndroidApp) window.postMobileMessage('MOBILEWIZARD show'); + if (window.mobileMenuWizard) + this.map.showSidebar = false; }, _showWizardSidebar: function() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.PartsPreview.js |1 - 1 file changed, 1 deletion(-) New commits: commit 9c2bb127611b8653c963816c2f76794455bef682 Author: Henry Castro AuthorDate: Tue Aug 11 15:47:36 2020 -0400 Commit: Henry Castro CommitDate: Wed Aug 12 14:01:24 2020 +0200 Revert "Keep slide sorter in line on mobile devices" This is no longer need it because the orientation is manual changed, adding or removing class styles and the patches below were added to adapt the new changes This reverts commit 69c21d5bb4d084cb8abc38b4176c8b40f12c8490. Change-Id: I70aee6b569f78795487cbff736130e0e74165432 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100592 Tested-by: Jenkins diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index da01e151d..7d4648f7d 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -111,7 +111,6 @@ L.Control.PartsPreview = L.Control.extend({ }, this); this._scrollContainer = $(this._partsPreviewCont).find('.mCSB_container').get(0); - $(this._scrollContainer).css('display', 'inline-table'); // Add a special frame just as a drop-site for reordering. var frameClass = 'preview-frame ' + this.options.frameClass; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 31 1 file changed, 23 insertions(+), 8 deletions(-) New commits: commit 797f8fc775bcaba8c8b1e6909dd4da0ae0b06d64 Author: Dennis Francis AuthorDate: Tue Aug 11 13:58:42 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 11:33:37 2020 +0200 loleaflet: avoid flicker due to map-size changes... by resizing the canvas only when the width/height of the map increases. A canvas resize causes horrible flickering especially when the dpiScale is not 1. This problem is more prevalent in mobile due to the on-screen keyboard. Change-Id: I10135d91f122eb751f16791476e09a45dbe09752 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100490 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 93131252e..06911991c 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -107,6 +107,7 @@ L.CanvasTilePainter = L.Class.extend({ this.setImageSmoothing(enableImageSmoothing); var mapSize = this._map.getPixelBounds().getSize(); this._lastSize = mapSize; + this._lastMapSize = mapSize; this._setCanvasSize(mapSize.x, mapSize.y); }, @@ -216,7 +217,7 @@ L.CanvasTilePainter = L.Class.extend({ var splitPanesContext = this._layer.getSplitPanesContext(); var zoom = Math.round(this._map.getZoom()); var pixelBounds = this._map.getPixelBounds(); - var newSize = pixelBounds.getSize(); + var newMapSize = pixelBounds.getSize(); var newTopLeft = pixelBounds.getTopLeft(); var part = this._layer._selectedPart; var newSplitPos = splitPanesContext ? @@ -224,25 +225,39 @@ L.CanvasTilePainter = L.Class.extend({ var zoomChanged = (zoom !== this._lastZoom); var partChanged = (part !== this._lastPart); - var sizeChanged = !newSize.equals(this._lastSize); + + var mapSizeChanged = !newMapSize.equals(this._lastMapSize); + // To avoid flicker, only resize the canvas element if width or height of the map increases. + var newSize = new L.Point(Math.max(newMapSize.x, this._lastSize.x), + Math.max(newMapSize.y, this._lastSize.y)); + var resizeCanvas = !newSize.equals(this._lastSize); + + var topLeftChanged = this._topLeft === undefined || !newTopLeft.equals(this._topLeft); + var splitPosChanged = !newSplitPos.equals(this._splitPos); var skipUpdate = ( - this._topLeft !== undefined && + !topLeftChanged && !zoomChanged && !partChanged && - !sizeChanged && - !splitPosChanged && - newTopLeft.equals(this._topLeft)); + !resizeCanvas && + !splitPosChanged); if (skipUpdate) { return; } - if (sizeChanged) { + if (resizeCanvas) { this._setCanvasSize(newSize.x, newSize.y); this._lastSize = newSize; } + else if (mapSizeChanged && topLeftChanged) { + this.clear(); + } + + if (mapSizeChanged) { + this._lastMapSize = newMapSize; + } if (splitPosChanged) { this._splitPos = newSplitPos; @@ -250,7 +265,7 @@ L.CanvasTilePainter = L.Class.extend({ // TODO: fix _shiftAndPaint for high DPI. var shiftPaintDisabled = true; - var fullRepaintNeeded = zoomChanged || partChanged || sizeChanged || shiftPaintDisabled; + var fullRepaintNeeded = zoomChanged || partChanged || resizeCanvas || shiftPaintDisabled; this._lastZoom = zoom; this._lastPart = part; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/Map.js |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit 097f4008fa080620bd5e720178cb6866767e772e Author: Tor Lillqvist AuthorDate: Wed Aug 12 09:59:02 2020 +0300 Commit: Tor Lillqvist CommitDate: Wed Aug 12 10:41:39 2020 +0200 Nothing sets _wasSingleTap and there is no Map.Tap.js any more This should have been cleaned away when Map.Tap.js was removed in a89d122479fd5aaae723ab8e646b705472b50591 "remove obsolete Map.Tap handler". Change-Id: Ic3946da8097089af1fb51e7b7a5f1c2e1b82c98b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100576 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 283b6bbfd..6f5677a26 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -1541,11 +1541,7 @@ L.Map = L.Evented.extend({ // .focus() method on hidden input within actual 'click' event here // Calling from some other place with no real 'click' event doesn't work. - // (tml: For me, for this to work with a mobile device, we need to - // accept 'mouseup', too, and check the _wasSingleTap flag set over in Map.Tap.js.) - if (type === 'click' || type === 'dblclick' || (type === 'mouseup' && -typeof this._container._wasSingleTap !== 'undefined' && -this._container._wasSingleTap)) { + if (type === 'click' || type === 'dblclick') { if (this.isPermissionEdit()) { this.fire('editorgotfocus'); this.focus(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |7 +++ loleaflet/src/layer/tile/TileLayer.js |5 + 2 files changed, 12 insertions(+) New commits: commit 9305d75362e56a76e9d95735b626a32157ea88a4 Author: Dennis Francis AuthorDate: Tue Aug 11 11:54:48 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:37:14 2020 +0200 loleaflet: adjust the map position on resize... ... if there is an active/visible cursor *and* it is out of the visible map-area. The map position is so adjusted that the cursor will in the center of the visible map area. This is needed for mobile(at least android) because of the on-screen keyboard. Note: We already do this for every 'invalidatecursor' message. Change-Id: I3342a165ad47fe1b32715f3a6bf35486ba2f287c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100489 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 0c25bd78a..337ba0f68 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -80,6 +80,13 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({ map.addControl(L.control.columnHeader()); map.addControl(L.control.rowHeader()); L.TileLayer.prototype.onAdd.call(this, map); + + map.on('resize', function () { + if (this.isCursorVisible()) { + this._onUpdateCursor(true /* scroll */); + } + }.bind(this)); + this._annotations = {}; }, diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index e0f1b8d37..71340ad89 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -2263,6 +2263,11 @@ L.TileLayer = L.GridLayer.extend({ // Update cursor layer (blinking cursor). _onUpdateCursor: function (scroll, zoom) { + + if (!this._visibleCursor) { + return; + } + var cursorPos = this._visibleCursor.getNorthWest(); var docLayer = this._map._docLayer; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/Marker.js |1 + 1 file changed, 1 insertion(+) New commits: commit 13ba88f73951cd7525a86d99525b5405c1ff35f8 Author: Dennis Francis AuthorDate: Fri Aug 7 21:48:37 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:35:46 2020 +0200 split-panes: update marker position on swipe/pan Change-Id: Idbb4b30be3c0d6f7def4c8baed5a45388de8bb63 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100488 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/marker/Marker.js b/loleaflet/src/layer/marker/Marker.js index 2fe48b10b..a73c1826d 100644 --- a/loleaflet/src/layer/marker/Marker.js +++ b/loleaflet/src/layer/marker/Marker.js @@ -67,6 +67,7 @@ L.Marker = L.Layer.extend({ var splitPanesPossible = this._map._docLayer.hasSplitPanesSupport(); if (splitPanesPossible) { events.moveend = this.update; + events.drag = this.update; events.splitposchanged = this.update; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/vector/SplitPanesSVG.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit c03c8c75318b2ab5a401fdb0f494cc90f8b503e6 Author: Dennis Francis AuthorDate: Fri Aug 7 21:24:00 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:34:25 2020 +0200 split-panes: update svg container position and viewbox on 'drag'... so that they do not get out of sync with the canvas on mobile/tablet swipe/pan. Note: This does not update the contents(path nodes) of the svg's. Note: In the long term we can get rid of the map-pane scrolling and avoid all this but right now only Calc is using canvas based tile layer. Change-Id: Iaf6894b0fc39a2a32ac19d0e9acd6abb14336785 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100487 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/vector/SplitPanesSVG.js b/loleaflet/src/layer/vector/SplitPanesSVG.js index d114c5cb2..20f350b7a 100644 --- a/loleaflet/src/layer/vector/SplitPanesSVG.js +++ b/loleaflet/src/layer/vector/SplitPanesSVG.js @@ -140,7 +140,8 @@ L.SplitPanesSVG = L.SplitPanesRenderer.extend({ getEvents: function () { var events = { - splitposchanged: this._update + splitposchanged: this._update, + drag: this._update, }; return events; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 76644df98020a69014e1fc943c9558e74ddb4480 Author: Dennis Francis AuthorDate: Fri Aug 7 19:53:19 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:32:40 2020 +0200 loleaflet: mobile/tablet: enable tile update check/requests for move with updateInterval throttle like we do for desktop. This is necessary for the inertia based scrolling on swipe especially when doing it rapidly. Change-Id: I870740c9b6cacfe56fce283f092cc68243fed1a6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100486 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 4d7d5dc1f..93131252e 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -482,14 +482,11 @@ L.CanvasTileLayer = L.TileLayer.extend({ viewreset: this._viewReset, movestart: this._moveStart, moveend: this._move, + // update tiles on move, but not more often than once per given interval + move: L.Util.throttle(this._move, this.options.updateInterval, this), splitposchanged: this._move, }; - if (!this.options.updateWhenIdle) { - // update tiles on move, but not more often than once per given interval - events.move = L.Util.throttle(this._move, this.options.updateInterval, this); - } - if (this._zoomAnimated) { events.zoomanim = this._animateZoom; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/geometry/Bounds.js | 39 ++ loleaflet/src/layer/SplitPanesContext.js | 37 ++ loleaflet/src/layer/tile/CanvasTileLayer.js | 458 ++ loleaflet/src/layer/tile/GridLayer.js | 23 + loleaflet/src/map/handler/Map.TouchGesture.js |7 5 files changed, 427 insertions(+), 137 deletions(-) New commits: commit 06e4722cc93a4acdbf47700de97ea1a8e98ad6fa Author: Dennis Francis AuthorDate: Fri Aug 7 18:37:11 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:31:19 2020 +0200 loleaflet: rewrite tile-prefetcher for L.CanvasTileLayer... with full support and optimizations for split-panes. This includes some refactors, for instance the prefetcher implementation is taken out of the doc-layer methods as a L.TilesPrefetcher class. Note: This only affects Calc as Writer/Impress are still using L.TileLayer. Change-Id: I0e43b58bad0a97d44cbffd1ee0d90d94a9426e29 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100485 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/geometry/Bounds.js b/loleaflet/src/geometry/Bounds.js index cadc8e225..8dacdc832 100644 --- a/loleaflet/src/geometry/Bounds.js +++ b/loleaflet/src/geometry/Bounds.js @@ -175,7 +175,44 @@ L.Bounds.prototype = { } return false; - } + }, + + clampX: function (x) { + return Math.max(this.min.x, Math.min(this.max.x, x)); + }, + + clampY: function (y) { + return Math.max(this.min.y, Math.min(this.max.y, y)); + }, + + clamp: function (obj) { // (Point) -> Point or (Bounds) -> Bounds + if (obj instanceof L.Point) { + return new L.Point( + this.clampX(obj.x), + this.clampY(obj.y) + ); + } + + if (obj instanceof L.Bounds) { + return new L.Bounds( + new L.Point( + this.clampX(obj.min.x), + this.clampY(obj.min.y) + ), + + new L.Point( + this.clampX(obj.max.x), + this.clampY(obj.max.y) + ) + ); + } + + console.error('invalid argument type'); + }, + + equals: function (bounds) { // (Bounds) -> Boolean + return this.min.equals(bounds.min) && this.max.equals(bounds.max); + }, }; L.bounds = function (a, b) { // (Bounds) or (Point, Point) or (Point[]) diff --git a/loleaflet/src/layer/SplitPanesContext.js b/loleaflet/src/layer/SplitPanesContext.js index 01920ec8e..b75272221 100644 --- a/loleaflet/src/layer/SplitPanesContext.js +++ b/loleaflet/src/layer/SplitPanesContext.js @@ -158,6 +158,41 @@ L.SplitPanesContext = L.Class.extend({ this._docLayer.updateVertPaneSplitter(); }, + getPanesProperties: function () { + var paneStatusList = []; + if (this._splitPos.x && this._splitPos.y) { + // top-left pane + paneStatusList.push({ + xFixed: true, + yFixed: true, + }); + } + + if (this._splitPos.y) { + // top-right pane or top half pane + paneStatusList.push({ + xFixed: false, + yFixed: true, + }); + } + + if (this._splitPos.x) { + // bottom-left pane or left half pane + paneStatusList.push({ + xFixed: true, + yFixed: false, + }); + } + + // bottom-right/bottom-half/right-half pane or the full pane (when there are no split-panes active) + paneStatusList.push({ + xFixed: false, + yFixed: false, + }); + + return paneStatusList; + }, + // returns all the pane rectangles for the provided full-map area (all in CSS pixels). getPxBoundList: function (pxBounds) { if (!pxBounds) { @@ -191,7 +226,7 @@ L.SplitPanesContext = L.Class.extend({ )); } - // bottom-right pane or the full pane (when there are no split-panes active) + // bottom-right/bottom-half/right-half pane or the full pane (when there are no split-panes active) boundList.push(new L
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit b21f0c37cae85c696fc8f4172bd758b504dc7dd0 Author: Dennis Francis AuthorDate: Fri Aug 7 17:48:50 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:23:40 2020 +0200 loleaflet: decrement _emptyTilesCount when tile is ready... ... and also move the 'statusindicator' event generation code. Change-Id: Ifdd9eb26d58986ce5fea8ea19f7dc7576d12743e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100484 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 57ebab698..3e86d3f0f 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -868,6 +868,16 @@ L.CanvasTileLayer = L.TileLayer.extend({ tile = this._tiles[key]; if (!tile) { return; } + var emptyTilesCountChanged = false; + if (this._emptyTilesCount > 0) { + this._emptyTilesCount -= 1; + emptyTilesCountChanged = true; + } + + if (emptyTilesCountChanged && this._emptyTilesCount === 0) { + this._map.fire('statusindicator', { statusType: 'alltilesloaded' }); + } + tile.loaded = +new Date(); tile.active = true; @@ -1342,12 +1352,6 @@ L.CanvasTileLayer = L.TileLayer.extend({ if (this._tiles[key]._invalidCount > 0) { this._tiles[key]._invalidCount -= 1; } - if (!tile.loaded) { - this._emptyTilesCount -= 1; - if (this._emptyTilesCount === 0) { - this._map.fire('statusindicator', { statusType: 'alltilesloaded' }); - } - } tile.el.src = img; } L.Log.log(textMsg, 'INCOMING', key); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c0e59fb50e3be59fac9753ebda6f905728688f8b Author: Dennis Francis AuthorDate: Fri Aug 7 17:25:06 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:22:13 2020 +0200 loleaflet: canvas should resize/repaint on map-resize Fixes canvas update issues when browser window is resized (esp. when making it larger) and also during sidebar switching. Change-Id: I4870e5294b355c1bd0c4ca74b22383207ed9d060 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100483 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 3da9ea82e..57ebab698 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -443,7 +443,7 @@ L.CanvasTileLayer = L.TileLayer.extend({ this._map.on('movestart', this._painter.startUpdates, this._painter); this._map.on('moveend', this._painter.stopUpdates, this._painter); } - this._map.on('zoomend', this._painter.update, this._painter); + this._map.on('resize zoomend', this._painter.update, this._painter); this._map.on('splitposchanged', this._painter.update, this._painter); this._map.on('move', this._syncTilePanePos, this); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) New commits: commit 6da69a2584402eed292067a7205eb01a04df8b6e Author: Dennis Francis AuthorDate: Fri Aug 7 17:14:56 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:21:25 2020 +0200 loleaflet: mobile/tablet: do not use L.CanvasTilePainter's RAF-loop... ... because the hammerjs swipe handler already uses a requestAnimationFrame loop to fire move/drag events. Using L.CanvasTilePainter's own requestAnimationFrame loop to do the updates in that case results in poor UX/performance. Change-Id: I2e31fb190b62f57bcb0bd00bec8b7ff4b7119aa1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100482 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 51941a73a..3da9ea82e 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -431,8 +431,18 @@ L.CanvasTileLayer = L.TileLayer.extend({ this._cypressHelperDiv = L.DomUtil.create('div', '', this._container); } - this._map.on('movestart', this._painter.startUpdates, this._painter); - this._map.on('moveend', this._painter.stopUpdates, this._painter); + // For mobile/tablet the hammerjs swipe handler already uses a requestAnimationFrame to fire move/drag events + // Using L.CanvasTilePainter's own requestAnimationFrame loop to do the updates in that case does not perform well. + if (window.mode.isMobile() || window.mode.isTablet()) { + this._map.on('move', this._painter.update, this._painter); + this._map.on('moveend', function () { + setTimeout(this.update.bind(this), 200); + }, this._painter); + } + else { + this._map.on('movestart', this._painter.startUpdates, this._painter); + this._map.on('moveend', this._painter.stopUpdates, this._painter); + } this._map.on('zoomend', this._painter.update, this._painter); this._map.on('splitposchanged', this._painter.update, this._painter); this._map.on('move', this._syncTilePanePos, this); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/Map.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 9ee08676cc69f7f381f3c9b66bd33903998dfba8 Author: Dennis Francis AuthorDate: Fri Aug 7 16:42:30 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:19:43 2020 +0200 loleaflet: do not modify the input L.Point... in containerPointToLayerPoint() and layerPointToContainerPoint() and hence avoid its side-effects. Note: L.point() does not copy-construct if the argument is already a L.Point, so we need to call .clone() This fixes unwanted scrolling of the map when drag-selecting cells. Change-Id: If59852fa448c662b11a96d8b5681c59b673403b7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100481 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 13d62dcdd..283b6bbfd 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -913,7 +913,7 @@ L.Map = L.Evented.extend({ var splitPos = splitPanesContext.getSplitPos(); var pixelOrigin = this.getPixelOrigin(); var mapPanePos = this._getMapPanePos(); - var result = L.point(point); + var result = L.point(point).clone(); if (point.x <= splitPos.x) { result.x -= pixelOrigin.x; } @@ -944,7 +944,7 @@ L.Map = L.Evented.extend({ var splitPos = splitPanesContext.getSplitPos(); var pixelOrigin = this.getPixelOrigin(); var mapPanePos = this._getMapPanePos(); - var result = L.point(point)._add(pixelOrigin); + var result = L.point(point).add(pixelOrigin); if (result.x > splitPos.x) { result.x -= (pixelOrigin.x - mapPanePos.x); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) New commits: commit 0d366059e9659c60d80673ddcadb3e72ab2b85bd Author: Dennis Francis AuthorDate: Fri Aug 7 14:36:42 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:18:30 2020 +0200 loleaflet: use the empty tile-container as a proxy... ... for the canvas to get the mouse-move+drag events and the various touch events. This is needed because the canvas element (created by L.CanvasTileLayer) is a sibling of the map-pane div and not a decendant. Any change in canvas-size is also applied on the tile-container. Also if there is a move event, counter adjust the tile-container position so that it is precisely over the canvas at all times. Change-Id: I5d5bc070c0063c5f24c4b1cb1448db0ce19841bd Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100480 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 13a1c0f40..51941a73a 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -119,6 +119,15 @@ L.CanvasTilePainter = L.Class.extend({ this._width = parseInt(this._canvas.style.width); this._height = parseInt(this._canvas.style.height); this.clear(); + this._syncTileContainerSize(); + }, + + _syncTileContainerSize: function () { + var tileContainer = this._layer._container; + if (tileContainer) { + tileContainer.style.width = this._width + 'px'; + tileContainer.style.height = this._height + 'px'; + } }, clear: function () { @@ -416,11 +425,6 @@ L.CanvasTileLayer = L.TileLayer.extend({ this._canvas = L.DomUtil.create('canvas', '', this._canvasContainer); this._painter = new L.CanvasTilePainter(this, L.getDpiScaleFactor()); - - // FIXME: A hack to get the Hammer events from the pane, which does not happen with - // no tile img's in it. - this._container.style.width = this._canvas.style.width; - this._container.style.height = this._canvas.style.height; this._container.style.position = 'absolute'; if (L.Browser.cypressTest) { @@ -431,6 +435,15 @@ L.CanvasTileLayer = L.TileLayer.extend({ this._map.on('moveend', this._painter.stopUpdates, this._painter); this._map.on('zoomend', this._painter.update, this._painter); this._map.on('splitposchanged', this._painter.update, this._painter); + this._map.on('move', this._syncTilePanePos, this); + }, + + _syncTilePanePos: function () { + var tilePane = this._container.parentElement; + if (tilePane) { + var mapPanePos = this._map._getMapPanePos(); + L.DomUtil.setPosition(tilePane, new L.Point(-mapPanePos.x , -mapPanePos.y)); + } }, hasSplitPanesSupport: function () { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js |1 + 1 file changed, 1 insertion(+) New commits: commit 4f58b831160caa5771a130b835b46cbc85509143 Author: Dennis Francis AuthorDate: Fri Aug 7 14:20:38 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:16:12 2020 +0200 loleaflet: fix flag for canvas update RAF-loop Set _updatesRunning flag back to false after the loop is stopped. Change-Id: I413d5beac4133326a4bc0b3d6729d03f77b20227 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100479 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Dennis Francis diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 3190fbb11..13a1c0f40 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -85,6 +85,7 @@ L.CanvasTilePainter = L.Class.extend({ if (this._updatesRunning) { L.Util.cancelAnimFrame(this._canvasRAF); this.update(); + this._updatesRunning = false; return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.ColumnHeader.js |2 +- loleaflet/src/control/Control.RowHeader.js|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 691e4f66eb9721a6aca62245592d8f6e8205d611 Author: Dennis Francis AuthorDate: Fri Aug 7 14:14:06 2020 +0530 Commit: Dennis Francis CommitDate: Wed Aug 12 10:15:18 2020 +0200 loleaflet: update headers for every 'move' event (and not just for 'moveend'). Change-Id: I487d22fff5e55741baa1a1d7f99798371fa3d284 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100478 Tested-by: Jenkins CollaboraOffice Tested-by: Jenkins Reviewed-by: Dennis Francis diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index 0bafd515a..cbd73c919 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -11,7 +11,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({ onAdd: function (map) { map.on('updatepermission', this._onUpdatePermission, this); - map.on('moveend zoomchanged sheetgeometrychanged splitposchanged', this._updateCanvas, this); + map.on('move zoomchanged sheetgeometrychanged splitposchanged', this._updateCanvas, this); this._initialized = false; }, diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index faadb575d..e39162ff2 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -11,7 +11,7 @@ L.Control.RowHeader = L.Control.Header.extend({ onAdd: function (map) { map.on('updatepermission', this._onUpdatePermission, this); - map.on('moveend zoomchanged sheetgeometrychanged splitposchanged', this._updateCanvas, this); + map.on('move zoomchanged sheetgeometrychanged splitposchanged', this._updateCanvas, this); this._initialized = false; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/marker/TextInput.js |3 --- 1 file changed, 3 deletions(-) New commits: commit 7974e3e848b136522e8726cf062a2648966be301 Author: Tor Lillqvist AuthorDate: Wed Aug 12 09:56:49 2020 +0300 Commit: Tor Lillqvist CommitDate: Wed Aug 12 10:14:35 2020 +0200 Nothing uses _selectionHandler Leftover from hacking that lead to its addition? Change-Id: Ic033ffc625613908ff57d27c10ffbba087ff03c4 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100575 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/loleaflet/src/layer/marker/TextInput.js b/loleaflet/src/layer/marker/TextInput.js index 1910d93d0..845bab5b6 100644 --- a/loleaflet/src/layer/marker/TextInput.js +++ b/loleaflet/src/layer/marker/TextInput.js @@ -59,9 +59,6 @@ L.TextInput = L.Layer.extend({ draggable: true }).on('dragend', this._onCursorHandlerDragEnd, this); - var that = this; - this._selectionHandler = function(ev) { that._onEvent(ev); }; - // Auto-correct characters can trigger auto-correction, but // must be sent as key-up/down if we want correction. // cf. SvxAutoCorrect::IsAutoCorrectChar ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/core/Socket.js |5 + 1 file changed, 5 insertions(+) New commits: commit b8fd4328afb4e0ed1dc93ecb6a4f8917455ccb5b Author: Ashod Nakashian AuthorDate: Thu Jul 2 14:21:35 2020 -0400 Commit: Ashod Nakashian CommitDate: Tue Aug 11 20:05:17 2020 +0200 leaflet: copy the reuse_cookies param from URI to map.options Change-Id: I1eee6d2cda3809aeeb2de015c7e18b2c14291bf9 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97783 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 310dbbd22..fa78bf1a3 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -768,6 +768,11 @@ L.Socket = L.Class.extend({ this._map.options.docParams = {}; } + var reuseCookies = this._getParameterByName(url, 'reuse_cookies'); + if (reuseCookies !== '') { + this._map.options.docParams['reuse_cookies'] = reuseCookies; + } + // setup for loading the new document, and trigger the load var docUrl = url.split('?')[0]; this._map.options.doc = docUrl; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.AlertDialog.js | 12 loleaflet/src/control/Control.ContextMenu.js |2 +- loleaflet/src/control/Toolbar.js | 16 +++- loleaflet/src/unocommands.js |1 + 4 files changed, 17 insertions(+), 14 deletions(-) New commits: commit 5287950d71f3324fb99b66b6d5fa77fb7ae46125 Author: gokaysatir AuthorDate: Sat Aug 8 20:32:27 2020 +0300 Commit: Tamás Zolnai CommitDate: Tue Aug 11 19:16:04 2020 +0200 loleaflet: remove edit button from open hyperlink modal. Change-Id: I597281b136a41c49954c66f50fd546a209bba75a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100392 Reviewed-by: Szymon Kłos Tested-by: Jenkins diff --git a/loleaflet/src/control/Control.AlertDialog.js b/loleaflet/src/control/Control.AlertDialog.js index c7cff3b8b..8118a30f1 100644 --- a/loleaflet/src/control/Control.AlertDialog.js +++ b/loleaflet/src/control/Control.AlertDialog.js @@ -68,18 +68,6 @@ L.Control.AlertDialog = L.Control.extend({ }); } - if (this._map.getDocType() != 'presentation') { - buttonsList.push({ - text: _('Edit'), - type: 'button', - className: 'vex-dialog-button-secondary', - click: function editClick () { - vex.closeAll(); - e.map.showHyperlinkDialog(); - } - }); - } - vex.dialog.open({ message: messageText, showCloseButton: true, diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index c4449340e..107da8ba0 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -22,7 +22,7 @@ L.Control.ContextMenu = L.Control.extend({ */ general: ['Cut', 'Copy', 'Paste', 'Delete', 'NumberingStart', 'ContinueNumbering', 'IncrementLevel', 'DecrementLevel', - 'OpenHyperlinkOnCursor', 'CopyHyperlinkLocation', 'RemoveHyperlink', + 'OpenHyperlinkOnCursor', 'EditHyperlink', 'CopyHyperlinkLocation', 'RemoveHyperlink', 'AnchorMenu', 'SetAnchorToPage', 'SetAnchorToPara', 'SetAnchorAtChar', 'SetAnchorToChar', 'SetAnchorToFrame', 'WrapMenu', 'WrapOff', 'WrapOn', 'WrapIdeal', 'WrapLeft', 'WrapRight', 'WrapThrough', diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index b22be1c83..2af30b3ed 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -156,17 +156,31 @@ L.Map.include({ this._socket.sendMessage(msg); }, + messageNeedsToBeRedirected: function(command) { + if (command === '.uno:EditHyperlink') { + var that = this; + setTimeout(function () { that.showHyperlinkDialog(); }, 500); + return true; + } + else { + return false; + } + }, + sendUnoCommand: function (command, json) { var isAllowedInReadOnly = false; var allowedCommands = ['.uno:Save', '.uno:WordCountDialog', '.uno:EditAnnotation', '.uno:InsertAnnotation', '.uno:DeleteAnnotation']; + for (var i in allowedCommands) { if (allowedCommands[i] === command) { isAllowedInReadOnly = true; break; } } + if (this.isPermissionEdit() || isAllowedInReadOnly) { - this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : '')); + if (!this.messageNeedsToBeRedirected(command)) + this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : '')); } }, diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index be4f9f46e..75caedecd 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -230,6 +230,7 @@ var unoCommandsArray = { ObjectForwardOne:{global:{menu:_('Forward One'),},}, OnlineAutoFormat:{text:{menu:_('~While Typing'),},}, OpenHyperlinkOnCursor:{global:{menu:_('Open Hyperlink'),},}, + EditHyper
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/core/Socket.js |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 82cd3292ab8ef87e3cb6f9ebb066ec99bc23d9ed Author: Szymon Kłos AuthorDate: Thu Aug 6 14:27:59 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 6 16:05:16 2020 +0200 Fix resuming after idle In other apps than Calc there was an error when trying to resume after idle: Uncaught TypeError: Cannot set property 'id' of null at HTMLDivElement.restartConnectionFn (Socket.js:490) Change-Id: I0b3c8d907aa220a3b9504ff62b0437c121bd3619 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100241 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos (cherry picked from commit 8409f1ce2f6585aa82b0b21c7e9bb791f48b6a1b) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100220 Tested-by: Jenkins diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 526c51410..310dbbd22 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -500,7 +500,8 @@ L.Socket = L.Class.extend({ console.debug('idleness: reactivating'); map._documentIdle = false; // force reinitialization of calcInputBar(formulabar) - map.dialog._calcInputBar.id = null; + if (map.dialog._calcInputBar) + map.dialog._calcInputBar.id = null; return map._activate(); } return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarBuilder.js | 15 +++ loleaflet/src/layer/tile/TileLayer.js |1 - 2 files changed, 15 insertions(+), 1 deletion(-) New commits: commit 64fba4f3afd6ffb68222a531dbb3bcabbcef1eac Author: Szymon Kłos AuthorDate: Thu Aug 6 08:37:26 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 6 09:33:16 2020 +0200 notebookbar: working insert header/footer Change-Id: Ib5419669bdcb3ce05b10e0093d87bcea9ffeb905 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100194 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index 40e3320cc..cc42143e2 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -48,6 +48,8 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:Presentation'] = this._startPresentationControl; this._toolitemHandlers['.uno:Save'] = this._saveControl; this._toolitemHandlers['.uno:Menubar'] = this._menubarControl; + this._toolitemHandlers['.uno:InsertPageHeader'] = this._headerFooterControl; + this._toolitemHandlers['.uno:InsertPageFooter'] = this._headerFooterControl; this._toolitemHandlers['up'] = this._toolbarItemControl; this._toolitemHandlers['down'] = this._toolbarItemControl; @@ -422,6 +424,19 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ }); }, + _headerFooterControl: function(parentContainer, data, builder) { + var control = builder._unoToolButton(parentContainer, data, builder); + + $(control.container).unbind('click'); + $(control.container).click(function () { + if (!$(control.container).hasClass('disabled')) { + builder.refreshSidebar = true; + var command = data.command + '?On:bool=true'; + builder.callback('toolbutton', 'click', control.button, command, builder); + } + }); + }, + _insertTableControl: function(parentContainer, data, builder) { var options = {hasDropdownArrow: true}; var control = builder._unoToolButton(parentContainer, data, builder, options); diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index ad3d0a598..e0f1b8d37 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1010,7 +1010,6 @@ L.TileLayer = L.GridLayer.extend({ }, _onJSDialogMsg: function (textMsg) { - console.log(textMsg); if (window.mode.isMobile()) { var msgData = JSON.parse(textMsg.substring('jsdialog:'.length + 1)); if (msgData.type == 'borderwindow') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.NotebookbarBuilder.js |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 36844c0e73305546e9664fdec2cdd504319be89c Author: Szymon Kłos AuthorDate: Tue Aug 4 15:59:14 2020 +0200 Commit: Szymon Kłos CommitDate: Wed Aug 5 09:39:44 2020 +0200 notebookbar: hide unsupported items provide non async dialogs Change-Id: I70b58cc3bbd6067553ca5d3b098fc48bb0dfc9a6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100116 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index da036bf85..2420109cb 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -172,7 +172,12 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:InsertExternalDataSource'] = function() {}; this._toolitemHandlers['.uno:RecalcPivotTable'] = function() {}; this._toolitemHandlers['.uno:DataProviderRefresh'] = function() {}; - this._toolitemHandlers['.uno:Calculate'] = function() {}; + this._toolitemHandlers['.uno:DataSubTotals'] = function() {}; + this._toolitemHandlers['.uno:DefineDBName'] = function() {}; + this._toolitemHandlers['.uno:SelectDB'] = function() {}; + this._toolitemHandlers['.uno:DataAreaRefresh'] = function() {}; + this._toolitemHandlers['.uno:TextToColumns'] = function() {}; + this._toolitemHandlers['.uno:DataConsolidate'] = function() {}; this._toolitemHandlers['vnd.sun.star.findbar:FocusToFindbar'] = function() {}; }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits