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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 26 19:16:00 UTC 2019


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

New commits:
commit ce9ec5f25df6ac6b88e815dc5623a61f813ba655
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Dec 26 17:55:14 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Thu Dec 26 20:11:10 2019 +0100

    Show checked state for insert header / insert footer menu items.
    
    In mobile wizard.
    
    Change-Id: Ie64851fdfafdead309bac3525fa75b4135f834c9

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index ede42fcfa..75ec190c8 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1498,6 +1498,19 @@ L.Control.Menubar = L.Control.extend({
 			children : []
 		};
 
+		// Checked state for insert header / footer
+		var insertHeaderString = '.uno:InsertPageHeader?PageStyle:string=';
+		var insertFooterString = '.uno:InsertPageFooter?PageStyle:string=';
+		if (item.uno && (item.uno.startsWith(insertHeaderString) || item.uno.startsWith(insertFooterString))) {
+			var style = decodeURIComponent(item.uno.slice(item.uno.search('=') + 1));
+			style = style.slice(0, style.length - 1);
+			var shortUno = item.uno.slice(0, item.uno.search('\\?'));
+			var state = this._map['stateChangeHandler'].getItemValue(shortUno);
+			if (state && state[style]) {
+				menuStructure['checked'] = true;
+			}
+		}
+
 		if (item.menu)
 		{
 			for (var i = 0; i < item.menu.length; i++) {


More information about the Libreoffice-commits mailing list