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-21 19:32:01 +0200 |
commit | d7788287456cb633226203f259e212c143b83050 (patch) | |
tree | bf58cd4fa76b3aa1e72016437c89e8da4929cdd9 /desktop | |
parent | cd72269a6a2c85ae9dd4552aa4808ef4fd1f6c0e (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
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 d9b763a1d2d2..a0e9d5f49640 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2115,6 +2115,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; @@ -2143,6 +2156,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); |