summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-30 11:18:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-30 12:35:56 +0100
commita7ce5f83343f8f6ba8a59b05820b3a2066c0ce9a (patch)
tree1696769691eb0b0acba8d1c0eb02badac9a61599 /desktop
parent5aee8e8cf48cf6c5fe5a4065554e96597e39e73d (diff)
LOK: initial Document::getCommandValues() for RowColumnHeaders
Only the row info and for the entire tiled rendering area as a start. Change-Id: Idbccd805b355e8d151ab7025ac1cf0c686cb237b
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8e3b88ed1187..32b01012d4ed 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1135,7 +1135,23 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
{
return getStyles(pThis, pCommand);
}
- else {
+ else if (OString(pCommand) == ".uno:ViewRowColumnHeaders")
+ {
+ ITiledRenderable* pDoc = getTiledRenderable(pThis);
+ if (!pDoc)
+ {
+ gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+ return 0;
+ }
+
+ OUString aHeaders = pDoc->getRowColumnHeaders();
+ OString aString = OUStringToOString(aHeaders, RTL_TEXTENCODING_UTF8);
+ char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1));
+ strcpy(pMemory, aString.getStr());
+ return pMemory;
+ }
+ else
+ {
gImpl->maLastExceptionMsg = "Unknown command, no values returned";
return NULL;
}