Kaydet (Commit) 5f5073a8 authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) pranavk

lok: Implement new callbacks for comment notifications

Change-Id: I298183b295c68c4a39cb1f6fffe4b89b4eaee0f3
Reviewed-on: https://gerrit.libreoffice.org/33469Reviewed-by: 's avatarpranavk <pranavk@collabora.co.uk>
Tested-by: 's avatarpranavk <pranavk@collabora.co.uk>
üst a623b3a4
......@@ -467,6 +467,32 @@ typedef enum
* - 'action' is 'Modify'.
*/
LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED = 31,
/**
* There is some change in comments in the document
*
* The payload example:
* {
* "comment": {
* "action": "Add",
* "id": "11",
* "parent": "4",
* "author": "Unknown Author",
* "text": "",
* "dateTime": "2016-08-18T13:13:00",
* "anchorPos": "4529, 3906",
* "textRange": "1418, 3906, 3111, 919"
* }
* }
*
* The format is the same as an entry of
* lok::Document::getCommandValues('.uno:ViewAnnotations'), extra
* fields:
*
* - 'action' can be 'Add', 'Remove' or 'Modify' depending on whether
* comment has been added, removed or modified.
*/
LOK_CALLBACK_COMMENT = 32
}
LibreOfficeKitCallbackType;
......
......@@ -426,6 +426,8 @@ callbackTypeToString (int nType)
return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
case LOK_CALLBACK_COMMENT:
return "LOK_CALLBACK_COMMENT";
}
g_assert(false);
return nullptr;
......@@ -1395,6 +1397,8 @@ callback (gpointer pData)
{
break;
}
case LOK_CALLBACK_COMMENT:
break;
default:
g_assert(false);
break;
......
......@@ -186,7 +186,7 @@ class SwPostItMgr: public SfxListener
sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const;
void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
SwSidebarItem* InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
void RemoveItem( SfxBroadcaster* pBroadcast );
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment