diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2018-02-01 12:17:45 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-02-22 12:17:20 +0100 |
commit | 0a25b404359ff28ef21603c47a8e0acdb9d8b3fb (patch) | |
tree | bcbf57b994f11ea79c9c9655cae0a7edfa7447e2 /desktop/source/lib/init.cxx | |
parent | 90440d7b06c48ea76c72f5fd7fdd8ba17d13891b (diff) |
lok - calc: add support for show/hide tabs in online
Change-Id: Ibd061414a0c3a5fad83d03f7047831cef62076d2
Reviewed-on: https://gerrit.libreoffice.org/49978
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r-- | desktop/source/lib/init.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6309802f6971..1bf6d00674a8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -640,6 +640,8 @@ static void doc_paintWindow(LibreOfficeKitDocument* pThis, unsigned nLOKWindowId static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned nLOKWindowId, int nAction); +static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart); + LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent) : mxComponent(xComponent) { @@ -695,6 +697,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone m_pDocumentClass->setViewLanguage = doc_setViewLanguage; + m_pDocumentClass->getPartInfo = doc_getPartInfo; + gDocumentClass = m_pDocumentClass; } pClass = m_pDocumentClass.get(); @@ -1903,6 +1907,24 @@ static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart) pDoc->setPart( nPart ); } +static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart) +{ + SolarMutexGuard aGuard; + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; + return nullptr; + } + + OUString aPartInfo = pDoc->getPartInfo( nPart ); + OString aString = OUStringToOString(aPartInfo, RTL_TEXTENCODING_UTF8); + + char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1)); + strcpy(pMemory, aString.getStr()); + return pMemory; +} + static char* doc_getPartPageRectangles(LibreOfficeKitDocument* pThis) { SolarMutexGuard aGuard; |