[Libreoffice-commits] online.git: loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 9 15:33:07 UTC 2019
loleaflet/src/control/Control.JSDialogBuilder.js | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 2476b7650680e58b3cb73c7a4722eb95b819735f
Author: Szymon KÅos <szymon.klos at collabora.com>
AuthorDate: Mon Dec 9 16:00:04 2019 +0100
Commit: Szymon KÅos <szymon.klos at collabora.com>
CommitDate: Mon Dec 9 16:00:04 2019 +0100
jsdialog: send gradient color porperties
Change-Id: I404f92c76402ede4b042e6d913900a7e1c453243
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 2bdb09b26..6d788bcac 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1247,6 +1247,22 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
+ _getColorCommandToSend: function(builder, data, color) {
+ var gradientItem;
+
+ if (data.id === 'fillgrad1') {
+ gradientItem = builder.map['stateChangeHandler'].getItemValue('.uno:FillGradient');
+ gradientItem.startcolor = color;
+ return '.uno:FillGradient?FillGradientJSON:string=' + JSON.stringify(gradientItem);
+ } else if (data.id === 'fillgrad2') {
+ gradientItem = builder.map['stateChangeHandler'].getItemValue('.uno:FillGradient');
+ gradientItem.endcolor = color;
+ return '.uno:FillGradient?FillGradientJSON:string=' + JSON.stringify(gradientItem);
+ }
+
+ return data.command + '?Color:string=' + color;
+ },
+
_getDefaultColorForCommand: function(command) {
if (command == '.uno:BackColor')
return '#';
@@ -1303,7 +1319,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
var noColorControl = (data.command !== '.uno:FontColor' && data.command !== '.uno:Color');
var callback = function(color) {
- var command = data.command + '?Color:string=' + color;
+ var command = builder._getColorCommandToSend(builder, data, color);
builder.map.sendUnoCommand(command);
};
More information about the Libreoffice-commits
mailing list