[Libreoffice-commits] online.git: 2 commits - loleaflet/src

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 4 10:24:45 UTC 2019


 loleaflet/src/control/Control.JSDialogBuilder.js |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit a758eaf5a93cd72907f2ae2b7e9c680266042474
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Oct 4 12:05:08 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Oct 4 12:24:35 2019 +0200

    jsdialogs: add custom controls for font name and size
    
    Change-Id: I2b54c66abf370629a2516496d53b47958bcf5a57
    Reviewed-on: https://gerrit.libreoffice.org/80200
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 33927baa8..1d073d8e2 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({
 
 		this._toolitemHandlers['.uno:XLineColor'] = this._colorControl;
 		this._toolitemHandlers['.uno:SelectWidth'] = this._lineWidthControl;
+		this._toolitemHandlers['.uno:CharFontName'] = this._fontNameControl;
+		this._toolitemHandlers['.uno:FontHeight'] = this._fontHeightControl;
 
 		this._currentDepth = 0;
 	},
@@ -364,6 +366,16 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		builder._spinfieldControl(parentContainer, data, builder);
 	},
 
+	_fontNameControl: function(parentContainer, data, builder) {
+		data.entries = [ 'Liberation Sans' ];
+		builder._comboboxControl(parentContainer, data, builder);
+	},
+
+	_fontHeightControl: function(parentContainer, data, builder) {
+		data.entries = [ '8', '10', '11', '12', '14', '16', '24', '32', '48' ];
+		builder._comboboxControl(parentContainer, data, builder);
+	},
+
 	build: function(parent, data, currentType, currentIsVertival) {
 		var currentInsertPlace = parent;
 		var currentHorizontalRow = parent;
commit 65ae51d1f32639acf8bc02c3810c5e12ad72e6fb
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Oct 4 11:56:42 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Oct 4 12:24:27 2019 +0200

    jsdialogs: add ids for uno buttons
    
    Change-Id: I31bc46c919e76ea329532244e38d2df2f69bc0e8
    Reviewed-on: https://gerrit.libreoffice.org/80199
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 7d01dbe6d..33927baa8 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -321,6 +321,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
 			button.innerHTML = builder._cleanText(data.text);
 		}
 
+		if (data.command)
+			button.id = data.command.substr('.uno:'.length);
+
 		$(button).click(function () {
 			builder.callback('toolbutton', 'click', button, data.command, builder);
 		});


More information about the Libreoffice-commits mailing list