[Libreoffice-commits] core.git: Branch 'feature/cib_contract561' - desktop/source include/LibreOfficeKit

Vasily Melenchuk Vasily.Melenchuk at cib.de
Fri Sep 29 14:56:21 UTC 2017


 desktop/source/lib/init.cxx             |    7 +++++++
 include/LibreOfficeKit/LibreOfficeKit.h |   14 ++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 4ea27577f20570064070515ccd643e94f72894f8
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date:   Fri Sep 29 17:52:58 2017 +0300

    Extra stubs in LibreOfficeKit interface to be compatible with version 5.2.
    
    Change-Id: I58f6a6136ba80b80252a5c9f2abd2f0c5e174b10

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fc957bf2effb..ea8fe87a7f3d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -331,6 +331,13 @@ struct LibLibreOffice_Impl : public _LibreOfficeKit
             m_pOfficeClass->freeError = lo_freeError;
             m_pOfficeClass->documentLoadWithOptions = lo_documentLoadWithOptions;
             m_pOfficeClass->registerCallback = lo_registerCallback;
+            // These methods are not implemented in LibreOffice 5.0 and
+            // they are included just to have compatibility with
+            // LibreOfficeKit 5.2 interface.
+            m_pOfficeClass->getFilterTypes = nullptr;
+            m_pOfficeClass->setOptionalFeatures = nullptr;
+            m_pOfficeClass->setDocumentPassword = nullptr;
+            m_pOfficeClass->getVersionInfo = nullptr;
             m_pOfficeClass->runMacro = lo_runMacro;
 
             gOfficeClass = m_pOfficeClass;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index c8611f7a6bbd..9fd563ba017c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -57,6 +57,20 @@ struct _LibreOfficeKitClass
                               LibreOfficeKitCallback pCallback,
                               void* pData);
 
+    /// @see lok::Office::getFilterTypes().
+    char* (*getFilterTypes) (LibreOfficeKit* pThis);
+
+    /// @see lok::Office::setOptionalFeatures().
+    void (*setOptionalFeatures)(LibreOfficeKit* pThis, uint64_t features);
+
+    /// @see lok::Office::setDocumentPassword().
+    void (*setDocumentPassword) (LibreOfficeKit* pThis,
+            char const* pURL,
+            char const* pPassword);
+
+    /// @see lok::Office::getVersionInfo().
+    char* (*getVersionInfo) (LibreOfficeKit* pThis);
+
     bool (*runMacro) (LibreOfficeKit *pThis, const char* pURL);
 #endif
 


More information about the Libreoffice-commits mailing list