diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-21 17:27:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-22 10:29:28 +0200 |
commit | 73ae22aae1d856c62d08ca576daea15056afbb58 (patch) | |
tree | 1f6d589b81df72999a50a6d7dee19d9288484947 /desktop | |
parent | 6f53baab070270b6913fd6035152382e963f4a66 (diff) |
lok::Document::getCommandValues: expose sw redline author colors
These colors are used in the tiles, so it's a good idea if the client
can use matching colors for cursors and selections. But to be able to do
that, we need an API to expose these colors.
Change-Id: Ia688c07e6c300fecdf8dc428d5a3f000d1857387
(cherry picked from commit d7788287456cb633226203f259e212c143b83050)
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index ead812baf6d4..fcb27d97a07c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2117,6 +2117,19 @@ static char* getTrackedChanges(LibreOfficeKitDocument* pThis) return pJson; } +/// Returns the JSON representation of the redline author table. +static char* getTrackedChangeAuthors(LibreOfficeKitDocument* pThis) +{ + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return nullptr; + } + OUString aAuthors = pDoc->getTrackedChangeAuthors(); + return strdup(aAuthors.toUtf8().getStr()); +} + static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCommand) { SolarMutexGuard aGuard; @@ -2145,6 +2158,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo { return getTrackedChanges(pThis); } + else if (aCommand == ".uno:TrackedChangeAuthors") + { + return getTrackedChangeAuthors(pThis); + } else if (aCommand.startsWith(aViewRowColumnHeaders)) { ITiledRenderable* pDoc = getTiledRenderable(pThis); |