[Libreoffice-commits] core.git: include/LibreOfficeKit
Jan Holesovsky
kendy at collabora.com
Tue Feb 17 08:15:12 PST 2015
include/LibreOfficeKit/LibreOfficeKit.h | 2 ++
include/LibreOfficeKit/LibreOfficeKit.hxx | 13 +++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 7a17c038a6f4c433a69c6c1ed04aca2e5c929027
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Feb 17 17:12:45 2015 +0100
LOK: Add support for documentLoadWithOptions also to LibreOfficeKit.hxx.
Change-Id: I89f018f524aad84f59372f1be76a8522010345f8
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 7cbaad3..ce1e636 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -146,7 +146,9 @@ struct _LibreOfficeKitClass
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
+#ifdef LOK_USE_UNSTABLE_API
void (*postKeyEvent) (LibreOfficeKit* pThis, int nType, int nCode);
+#endif // LOK_USE_UNSTABLE_API
};
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index ef365ce..74c8533 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -147,11 +147,18 @@ public:
mpThis->pClass->destroy(mpThis);
}
- inline Document* documentLoad(const char* pUrl)
+ inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = NULL)
{
- LibreOfficeKitDocument* pDoc = mpThis->pClass->documentLoad(mpThis, pUrl);
+ LibreOfficeKitDocument* pDoc = NULL;
+
+ if (LIBREOFFICEKIT_HAS(mpThis, documentLoadWithOptions))
+ pDoc = mpThis->pClass->documentLoadWithOptions(mpThis, pUrl, pFilterOptions);
+ else
+ pDoc = mpThis->pClass->documentLoad(mpThis, pUrl);
+
if (pDoc == NULL)
return NULL;
+
return new Document(pDoc);
}
@@ -161,6 +168,7 @@ public:
return mpThis->pClass->getError(mpThis);
}
+#ifdef LOK_USE_UNSTABLE_API
/**
* Posts a keyboard event to the focused frame.
*
@@ -171,6 +179,7 @@ public:
{
mpThis->pClass->postKeyEvent(mpThis, nType, nCode);
}
+#endif // LOK_USE_UNSTABLE_API
};
inline Office* lok_cpp_init(const char* pInstallPath)
More information about the Libreoffice-commits
mailing list