diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-04-25 19:25:11 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-16 13:15:00 +0200 |
commit | cb33a0fb8b7d9fcdf7ef26ac690842574d359f4b (patch) | |
tree | 590533d83e8975b8de1bc6fb2d578a23b2ae9ee1 /desktop/source | |
parent | 658eec1d5b96ea0a971fbdf531979480f72516a4 (diff) |
lok: sc: misplaced comment mark on inserting/deleting/resizing row/col
A unique id has been introduced, in a similar way of what occurs in
Writer.
Change-Id: I7b2ef694867fb4184c4cfc616fe1c8f12da3b676
Reviewed-on: https://gerrit.libreoffice.org/36962
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b090ae4e377c..ebfe46a7efe3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2049,6 +2049,18 @@ static char* getPostIts(LibreOfficeKitDocument* pThis) return strdup(aComments.toUtf8().getStr()); } +/// Returns the JSON representation of the positions of all the comments in the document +static char* getPostItsPos(LibreOfficeKitDocument* pThis) +{ + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return nullptr; + } + OUString aComments = pDoc->getPostItsPos(); + return strdup(aComments.toUtf8().getStr()); +} static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nCharCode, int nKeyCode) { @@ -2653,6 +2665,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo { return getPostIts(pThis); } + else if (aCommand == ".uno:ViewAnnotationsPosition") + { + return getPostItsPos(pThis); + } else if (aCommand.startsWith(aViewRowColumnHeaders)) { ITiledRenderable* pDoc = getTiledRenderable(pThis); |