loleaflet/src/control/Control.NotebookbarBuilder.js | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+)
New commits: commit a2f6921fec76990d064c55c1af803905c4320a84 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Apr 29 11:59:05 2020 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Fri May 1 21:38:48 2020 +0200 notebookbar: linespacing control Change-Id: Idb481aec70fe43d143a16d978492372f650320df Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93293 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index 4f0b067df..b0eb08e03 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -31,6 +31,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:InsertTable'] = this._insertTableControl; this._toolitemHandlers['.uno:InsertGraphic'] = this._insertGraphicControl; this._toolitemHandlers['.uno:InsertAnnotation'] = this._insertAnnotationControl; + this._toolitemHandlers['.uno:LineSpacing'] = this._lineSpacingControl; this._toolitemHandlers['.uno:Cut'] = this._clipboardButtonControl; this._toolitemHandlers['.uno:Copy'] = this._clipboardButtonControl; this._toolitemHandlers['.uno:Paste'] = this._clipboardButtonControl; @@ -243,6 +244,27 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ } }, + _lineSpacingControl: function(parentContainer, data, builder) { + var control = builder._unoToolButton(parentContainer, data, builder); + + $(control.container).unbind('click'); + $(control.container).click(function () { + $(control.container).w2menu({ + items: [ + {id: 'spacepara1', text: _UNO('.uno:SpacePara1'), uno: 'SpacePara1'}, + {id: 'spacepara15', text: _UNO('.uno:SpacePara15'), uno: 'SpacePara15'}, + {id: 'spacepara2', text: _UNO('.uno:SpacePara2'), uno: 'SpacePara2'}, + {type: 'break'}, + {id: 'paraspaceincrease', text: _UNO('.uno:ParaspaceIncrease'), uno: 'ParaspaceIncrease'}, + {id: 'paraspacedecrease', text: _UNO('.uno:ParaspaceDecrease'), uno: 'ParaspaceDecrease'} + ], + onSelect: function (event) { + builder.map.sendUnoCommand('.uno:' + event.item.uno); + } + }); + }); + }, + build: function(parent, data, hasVerticalParent, parentHasManyChildren) { this._amendJSDialogData(data); commit 2f98cbbf91bcd2f0b9ce113482acb0d5bc92b8c6 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Apr 29 09:26:33 2020 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Fri May 1 21:38:37 2020 +0200 notebookbar: override copy, cut & paste actions Change-Id: I5338d844fd279f33d3832fdb2e05d83ee0a79a3f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93292 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index e2fb923d5..4f0b067df 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -31,6 +31,9 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:InsertTable'] = this._insertTableControl; this._toolitemHandlers['.uno:InsertGraphic'] = this._insertGraphicControl; this._toolitemHandlers['.uno:InsertAnnotation'] = this._insertAnnotationControl; + this._toolitemHandlers['.uno:Cut'] = this._clipboardButtonControl; + this._toolitemHandlers['.uno:Copy'] = this._clipboardButtonControl; + this._toolitemHandlers['.uno:Paste'] = this._clipboardButtonControl; this._toolitemHandlers['.uno:SelectWidth'] = function() {}; @@ -229,6 +232,17 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ $(control.container).click(function () {builder.map.insertComment();}); }, + _clipboardButtonControl: function(parentContainer, data, builder) { + var control = builder._unoToolButton(parentContainer, data, builder); + + if (builder.map._clip) { + $(control.container).unbind('click'); + $(control.container).click(function () { + builder.map._clip.filterExecCopyPaste(data.command); + }); + } + }, + build: function(parent, data, hasVerticalParent, parentHasManyChildren) { this._amendJSDialogData(data); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
