diff options
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 3 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 8 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 3 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 6 |
4 files changed, 19 insertions, 1 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 31a72a0a5dfe..945be7009d0a 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3677,9 +3677,10 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(75), offsetof(struct _LibreOfficeKitDocumentClass, createSlideRenderer)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(76), offsetof(struct _LibreOfficeKitDocumentClass, postSlideshowCleanup)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(77), offsetof(struct _LibreOfficeKitDocumentClass, renderNextSlideLayer)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(78), offsetof(struct _LibreOfficeKitDocumentClass, setViewOption)); // As above - CPPUNIT_ASSERT_EQUAL(documentClassOffset(78), sizeof(struct _LibreOfficeKitDocumentClass)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(79), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d6d0e2c42ca2..d5ac74a2d14e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1339,6 +1339,8 @@ static void doc_postSlideshowCleanup(LibreOfficeKitDocument* pThis); static bool doc_renderNextSlideLayer( LibreOfficeKitDocument* pThis, unsigned char* pBuffer, bool* bIsBitmapLayer, char** pJsonMsg); +static void doc_setViewOption(LibreOfficeKitDocument* pDoc, const char* pOption, const char* pValue); + } // extern "C" namespace { @@ -1544,6 +1546,7 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference <css::lang::XComponent> xC m_pDocumentClass->createSlideRenderer = doc_createSlideRenderer; m_pDocumentClass->postSlideshowCleanup = doc_postSlideshowCleanup; m_pDocumentClass->renderNextSlideLayer = doc_renderNextSlideLayer; + m_pDocumentClass->setViewOption = doc_setViewOption; gDocumentClass = m_pDocumentClass; } @@ -5783,6 +5786,11 @@ static bool doc_renderNextSlideLayer( return bDone; } +static void doc_setViewOption(LibreOfficeKitDocument* /*pDoc*/, const char* /*pOption*/, const char* /*pValue*/) +{ + // placeholder for now +} + static bool getFromTransferable( const css::uno::Reference<css::datatransfer::XTransferable> &xTransferable, const OString &aInMimeType, OString &aRet); diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 0e14a349ddfa..757fb75821f7 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -551,6 +551,9 @@ struct _LibreOfficeKitDocumentClass bool (*renderNextSlideLayer)( LibreOfficeKitDocument* pThis, unsigned char* pBuffer, bool* bIsBitmapLayer, char** pJsonMessage); + /// @see lok::Document::setViewOption + void (*setViewOption)(LibreOfficeKitDocument* pThis, const char* pOption, const char* pValue); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 1e99d910ba0d..edd62dd59aff 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -936,6 +936,12 @@ public: return mpDoc->pClass->renderNextSlideLayer(mpDoc, pBuffer, bIsBitmapLayer, pJsonMessage); } + /// Set named view options + void setViewOption(const char* pOption, const char* pValue) + { + mpDoc->pClass->setViewOption(mpDoc, pOption, pValue); + } + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; |