[Libreoffice-commits] online.git: loleaflet/dist

Henry Castro hcastro at collabora.com
Wed May 25 23:33:24 UTC 2016


 loleaflet/dist/toolbar/toolbar.js |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 4379d2fc3b247f2efbcc100e81464efee98b4d7a
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed May 25 19:32:58 2016 -0400

    loleaflet: bccu#1798 Choice of styles in listbox limited to a few in presentation

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 28176f4..baaf79a 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -692,7 +692,21 @@ map.on('updatetoolbarcommandvalues', function (e) {
 			styles = e.commandValues.CellStyles;
 		}
 		else if (map.getDocType() === 'presentation' || map.getDocType() === 'drawing') {
-			styles = e.commandValues.Default || e.commandValues.Standard;
+			Object.keys(e.commandValues).forEach(function(style) {
+				switch (style) {
+					case 'graphics':
+					case 'table':
+					case 'cell':
+					case 'Commands':
+						break;
+
+					default:
+						if ( styles.length === 0 ) {
+							styles = e.commandValues[style];
+						}
+						break;
+				}
+			});
 		}
 
 		if (topStyles.length > 0) {


More information about the Libreoffice-commits mailing list