loleaflet/src/layer/tile/CalcTileLayer.js |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

New commits:
commit d99dbade2b3a4090c4ff3fd593cd45a4ed6ff121
Author: Henry Castro <hcas...@collabora.com>
Date:   Sun Mar 26 11:55:04 2017 -0400

    loleaflet: handle annotation reply for Calc documents
    
    Change-Id: I27d03313bf4cdc43e7356e78424ee236b90c5269

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js 
b/loleaflet/src/layer/tile/CalcTileLayer.js
index 0dd18011..1fa97c45 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -51,6 +51,7 @@ L.CalcTileLayer = L.TileLayer.extend({
                map.on('zoomend', this._onZoomRowColumns, this);
                map.on('updateparts', this._onUpdateParts, this);
                map.on('AnnotationCancel', this._onAnnotationCancel, this);
+               map.on('AnnotationReply', this._onAnnotationReply, this);
                map.on('AnnotationSave', this._onAnnotationSave, this);
        },
 
@@ -86,6 +87,11 @@ L.CalcTileLayer = L.TileLayer.extend({
                this._map.focus();
        },
 
+       onAnnotationReply: function (annotation) {
+               annotation.reply();
+               annotation.focus();
+       },
+
        showAnnotation: function (annotation) {
                this._map.addLayer(annotation.mark);
                this._map.addLayer(annotation);
@@ -119,6 +125,21 @@ L.CalcTileLayer = L.TileLayer.extend({
                this._map.focus();
        },
 
+       _onAnnotationReply: function (e) {
+               var comment = {
+                       Id: {
+                               type: 'string',
+                               value: e.annotation._data.id
+                       },
+                       Text: {
+                               type: 'string',
+                               value: e.annotation._data.reply
+                       }
+               };
+               this._map.sendUnoCommand('.uno:ReplyComment', comment);
+               this._map.focus();
+       },
+
        _onAnnotationSave: function (e) {
                var comment;
                if (e.annotation._data.id === 'new') {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to