loleaflet/dist/images/document-properties.png |binary loleaflet/dist/toolbar.css | 1 + loleaflet/dist/toolbar/toolbar.js | 4 ++++ loleaflet/src/layer/tile/TileLayer.js | 18 +++++++++++++++++- 4 files changed, 22 insertions(+), 1 deletion(-)
New commits: commit ab780acd0a3b503ec6c4333b400fe9a2e9137d88 Author: Henry Castro <hcas...@collabora.com> Date: Sun Aug 28 08:38:54 2016 -0400 loleaflet: add document repair toolbar item diff --git a/loleaflet/dist/images/document-properties.png b/loleaflet/dist/images/document-properties.png new file mode 100644 index 0000000..0eadfbf Binary files /dev/null and b/loleaflet/dist/images/document-properties.png differ diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 13f7f5b..dfb9de3 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -268,6 +268,7 @@ button.leaflet-control-search-next .w2ui-icon.sortascending{ background: url('/loleaflet/dist/images/lc_sortascending.png') no-repeat center !important; } .w2ui-icon.sortdescending{ background: url('/loleaflet/dist/images/lc_sortdescending.png') no-repeat center !important; } .w2ui-icon.selected{ background: url('/loleaflet/dist/images/lc_ok.png') no-repeat center !important; } +.w2ui-icon.repair{ background: url('/loleaflet/dist/images/document-properties.png') no-repeat center !important; } .inserttable-pop { z-index: 100000; diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index c12d533..8232486 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -103,6 +103,9 @@ function onClick(id, item, subItem) { map.toggleCommandState(item.uno); } } + else if (id === 'repair') { + map._socket.sendMessage('commandvalues command=.uno:DocumentRepair'); + } else if (id === 'zoomin' && map.getZoom() < map.getMaxZoom()) { map.zoomIn(1); } @@ -344,6 +347,7 @@ $(function () { {type: 'break'}, {type: 'button', id: 'undo', img: 'undo', hint: _('Undo'), uno: 'Undo'}, {type: 'button', id: 'redo', img: 'redo', hint: _('Redo'), uno: 'Redo'}, + {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair')}, {type: 'break'}, {type: 'html', id: 'styles', html: '<select class="styles-select"></select>'}, {type: 'html', id: 'fonts', html: '<select class="fonts-select"></select>'}, diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 6c1fe71..d449c74 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -382,7 +382,10 @@ L.TileLayer = L.GridLayer.extend({ _onCommandValuesMsg: function (textMsg) { var obj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); - if (obj.commandName === '.uno:CellCursor') { + if (obj.commandName == '.uno:DocumentRepair') { + this._onDocumentRepair(obj); + } + else if (obj.commandName === '.uno:CellCursor') { this._onCellCursorMsg(obj.commandValues); } else if (this._map.unoToolbarCommands.indexOf(obj.commandName) !== -1) { this._toolbarCommandValues[obj.commandName] = obj.commandValues; @@ -515,6 +518,19 @@ L.TileLayer = L.GridLayer.extend({ this._onUpdateCellCursor(horizontalDirection, verticalDirection); }, + _onDocumentRepair: function (textMsg) { + if (!this._docRepair) { + this._docRepair = L.control.documentRepair(); + } + + if (!this._docRepair.isVisible()) { + this._docRepair.addTo(this._map); + this._docRepair.fillActions(textMsg); + this._map.enable(false); + this._docRepair.show(); + } + }, + _onMousePointerMsg: function (textMsg) { textMsg = textMsg.substring(14); // "mousepointer: " textMsg = L.Cursor.getCustomCursor(textMsg) || textMsg; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits