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

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 29 18:17:27 UTC 2019


 loleaflet/src/control/Control.JSDialogBuilder.js |   45 ++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 045c93cf135dfdbcb14f087268789e4dd0621745
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 29 16:26:01 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 29 19:17:13 2019 +0100

    jsdialogs: dont show empty controls from panel titlebars
    
    Change-Id: I548d4280f90f7c271c44cbf279ece941b1fbed33
    Reviewed-on: https://gerrit.libreoffice.org/84083
    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 c6342ec13..4a8bd352b 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1449,6 +1449,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
 			var needsToCreateContainer =
 				childType == 'panel' || childType == 'frame' || childType == 'toolbox';
 
+			if ((childData.id === undefined || childData.id === '' || childData.id === null)
+				&& (childType == 'checkbox' || childType == 'radiobutton')) {
+				continue;
+			}
+
 			var childObject = needsToCreateContainer ? L.DomUtil.createWithId('div', childData.id, parent) : parent;
 
 			var handler = this._controlHandlers[childType];
commit 476aedb5eea4ecd0abeb094ed70b96db0f41ff5a
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 29 12:30:40 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 29 19:16:41 2019 +0100

    jsdialog: process transparency type updates
    
    Change-Id: I3cded8b48bd0bd57053242a7ffca8c34dfbb6110
    Reviewed-on: https://gerrit.libreoffice.org/84058
    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 c71eb2def..c6342ec13 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -142,6 +142,34 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		return text.replace(/[^\d.-]/g, '').trim();
 	},
 
+	_gradientStyleToLabel: function(state) {
+		switch (state) {
+		case 'LINEAR':
+			return _('Linear');
+
+		case 'AXIAL':
+			return _('Axial');
+
+		case 'RADIAL':
+			return _('Radial');
+
+		case 'ELLIPTICAL':
+			return _('Elipsoid');
+
+		// no, not a typo (square - quadratic, rect - square) - same as in the core
+		case 'SQUARE':
+			return _('Quadratic');
+
+		case 'RECT':
+			return _('Square');
+
+		case 'MAKE_FIXED_SIZE':
+			return _('Fixed size');
+		}
+
+		return '';
+	},
+
 	_containerHandler: function(parentContainer, data, builder) {
 		if (data.cols && data.rows) {
 			return builder._gridHandler(parentContainer, data, builder);
@@ -574,6 +602,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
 
 		case 'verticalpos':
 			return '.uno:Position';
+
+		case 'transtype':
+			return '.uno:FillFloatTransparence';
 		}
 
 		return null;
@@ -718,7 +749,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		case 'gradientstyle':
 			state = items.getItemValue('.uno:FillGradient');
 			if (state) {
-				return state.style;
+				return builder._gradientStyleToLabel(state.style);
 			}
 			break;
 
@@ -819,6 +850,13 @@ L.Control.JSDialogBuilder = L.Control.extend({
 				return String(L.mm100thToInch(state.split('/')[1]).toFixed(2));
 			}
 			break;
+
+		case 'transtype':
+			state = items.getItemValue('.uno:FillFloatTransparence');
+			if (state) {
+				return builder._gradientStyleToLabel(state.style);
+			}
+			break;
 		}
 
 		return null;


More information about the Libreoffice-commits mailing list