tdf#129979: loleaflet send postMessage on cancel for password protected files

Change-Id: Ied484ee8cce185c707d16c5181ca9246f69bdea2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86679
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index f472d46..5f917e1 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3396,6 +3396,14 @@
		</td>
	</tr>
	<tr>
		<td><code><b>UI_Cancel_Password</b></code></td>
		<td></td>
		<td>
		Notifies WOPI host that the user clicked on the 'cancel' option when opening
		a password protected file, instead of providing the password to decrypt it.
		</td>
	</tr>
	<tr>
		<td><code><b>Doc_ModifiedStatus</b></code></td>
		<td></td>
		<td>
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index a65133d..fa60540 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -655,6 +655,7 @@
							this._map._docPassword = '';
							this._map.loadDocument();
						} else {
							this._map.fire('postMessage', {msgId: 'UI_Cancel_Password'});
							this._map.hideBusy();
						}
					}, this)