diff --git a/browser/src/control/Control.Menubar.js b/browser/src/control/Control.Menubar.js index 34bb14bb8..cbddbfc85 100644 --- a/browser/src/control/Control.Menubar.js +++ b/browser/src/control/Control.Menubar.js @@ -722,7 +722,7 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:VerticalText'), uno: '.uno:VerticalText'}, {uno: '.uno:FunctionDialog'}, {type: 'separator'}, - {name: _UNO('.uno:HyperlinkDialog'), id: 'inserthyperlink', type: 'action'}, + {name: _UNO('.uno:HyperlinkDialog'), uno: '.uno:HyperlinkDialog'}, {name: _('Smart Picker'), id: 'remotelink', type: 'action'}, {uno: '.uno:InsertSymbol'}, {type: 'separator'}, diff --git a/browser/src/control/Control.NotebookbarCalc.js b/browser/src/control/Control.NotebookbarCalc.js index 5aa06211f..24446f32d 100644 --- a/browser/src/control/Control.NotebookbarCalc.js +++ b/browser/src/control/Control.NotebookbarCalc.js @@ -1373,9 +1373,9 @@ L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({ { 'id': 'HyperlinkDialog', 'class': 'unoHyperlinkDialog', - 'type': 'bigcustomtoolitem', + 'type': 'bigtoolitem', 'text': _UNO('.uno:HyperlinkDialog'), - 'command': 'hyperlinkdialog', + 'command': '.uno:HyperlinkDialog', 'accessibility': { focusBack: true, combination: 'I2', de: null } }, (this._map['wopi'].EnableRemoteLinkPicker) ? { diff --git a/browser/src/control/Control.Toolbar.js b/browser/src/control/Control.Toolbar.js index 0db1fd9fb..7b71fecbe 100644 --- a/browser/src/control/Control.Toolbar.js +++ b/browser/src/control/Control.Toolbar.js @@ -155,7 +155,10 @@ function onClick(e, id, item) { map.uiManager.enterReadonlyOrClose(); } else if (id === 'link') { - map.showHyperlinkDialog(); + if (map.getDocType() == 'spreadsheet') + map.sendUnoCommand('.uno:HyperlinkDialog'); + else + map.showHyperlinkDialog(); } } diff --git a/browser/src/control/Toolbar.js b/browser/src/control/Toolbar.js index 1b8940141..3a682558f 100644 --- a/browser/src/control/Toolbar.js +++ b/browser/src/control/Toolbar.js @@ -839,6 +839,13 @@ L.Map.include({ }, showHyperlinkDialog: function() { + if (this.getDocType() === 'spreadsheet') { + // show native core dialog + // in case we try to edit email EditHyperlink doesn't work + this.sendUnoCommand('.uno:HyperlinkDialog'); + return; + } + var text = this.getTextForLink(); var link = ''; if (this.hyperlinkUnderCursor && this.hyperlinkUnderCursor.link)