diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-16 09:30:41 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-21 07:30:20 +0200 |
commit | 46588c42a546d4517b773853856b9c8f8c2e5ece (patch) | |
tree | ee35d297a358b2f28a388003e48920d7929535b9 /desktop/source | |
parent | 855e1bac1d5155352706c7d849942f5dc453c67d (diff) |
lok::Document: add get/setView()
Change-Id: Ic3bce8f01d7e048e853c063c4bce1255845c60d0
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 15ab2e7ffa50..fd332975f2e7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -249,6 +249,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo static int doc_createView(LibreOfficeKitDocument* pThis); static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId); +static void doc_setView(LibreOfficeKitDocument* pThis, int nId); +static int doc_getView(LibreOfficeKitDocument* pThis); LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent) : mxComponent( xComponent ) @@ -282,6 +284,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone m_pDocumentClass->createView = doc_createView; m_pDocumentClass->destroyView = doc_destroyView; + m_pDocumentClass->setView = doc_setView; + m_pDocumentClass->getView = doc_getView; gDocumentClass = m_pDocumentClass; } @@ -1064,6 +1068,20 @@ static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, int nId) SfxLokHelper::destroyView(nId); } +static void doc_setView(LibreOfficeKitDocument* /*pThis*/, int nId) +{ + SolarMutexGuard aGuard; + + SfxLokHelper::setView(nId); +} + +static int doc_getView(LibreOfficeKitDocument* /*pThis*/) +{ + SolarMutexGuard aGuard; + + return SfxLokHelper::getView(); +} + static char* lo_getError (LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); |