summaryrefslogtreecommitdiff
path: root/loleaflet/src/map/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'loleaflet/src/map/Map.js')
-rw-r--r--loleaflet/src/map/Map.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index c43f873d9..f0f692c28 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -209,8 +209,12 @@ L.Map = L.Evented.extend({
this._docLoaded = false;
this.on('commandstatechanged', function(e) {
- if (e.commandName === '.uno:ModifiedStatus')
+ if (e.commandName === '.uno:ModifiedStatus') {
this._everModified = this._everModified || (e.state === 'true');
+
+ // Fire an event to let the client know whether the document needs saving or not.
+ this.fire('postMessage', {msgId: 'Doc_ModifiedStatus', args: { Modified: e.state === 'true' }});
+ }
}, this);
this.on('docloaded', function(e) {