Kaydet (Commit) 5bcc79e8 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Michael Meeks

[API CHANGE] lok: Don't use 'bool' and 'uint64_t' in the stable API.

This is a f70e0ec6 follow-up.

Change-Id: I4acf00a6da85ed14be4ed0ca20d541a9441736e7
Reviewed-on: https://gerrit.libreoffice.org/42266Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst be78f7b8
......@@ -1098,12 +1098,12 @@ static void lo_registerCallback (LibreOfficeKit* pThis,
LibreOfficeKitCallback pCallback,
void* pData);
static char* lo_getFilterTypes(LibreOfficeKit* pThis);
static void lo_setOptionalFeatures(LibreOfficeKit* pThis, uint64_t features);
static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long features);
static void lo_setDocumentPassword(LibreOfficeKit* pThis,
const char* pURL,
const char* pPassword);
static char* lo_getVersionInfo(LibreOfficeKit* pThis);
static bool lo_runMacro (LibreOfficeKit* pThis, const char* pURL);
static int lo_runMacro (LibreOfficeKit* pThis, const char* pURL);
LibLibreOffice_Impl::LibLibreOffice_Impl()
: m_pOfficeClass( gOfficeClass.lock() )
......@@ -1262,7 +1262,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
return nullptr;
}
static bool lo_runMacro( LibreOfficeKit* pThis, const char *pURL)
static int lo_runMacro(LibreOfficeKit* pThis, const char *pURL)
{
SolarMutexGuard aGuard;
......@@ -3014,7 +3014,7 @@ static char* lo_getFilterTypes(LibreOfficeKit* pThis)
return strdup(aStream.str().c_str());
}
static void lo_setOptionalFeatures(LibreOfficeKit* pThis, uint64_t const features)
static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long const features)
{
SolarMutexGuard aGuard;
......
......@@ -163,7 +163,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_setOption
{
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
uint64_t pOptions = (uint64_t)options;
unsigned long long pOptions = (unsigned long long)options;
pLibreOfficeKit->pClass->setOptionalFeatures(pLibreOfficeKit, pOptions);
}
......
......@@ -12,11 +12,14 @@
#include <stddef.h>
#ifndef _WIN32
// the unstable API needs C99's bool
# include <stdbool.h>
// TODO remove the C99 types from the API before making stable
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
# ifndef _WIN32
# include <stdbool.h>
# endif
# include <stdint.h>
#endif
#include <stdint.h>
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
......@@ -73,7 +76,7 @@ struct _LibreOfficeKitClass
/** @see lok::Office::setOptionalFeatures().
@since LibreOffice 6.0
*/
void (*setOptionalFeatures)(LibreOfficeKit* pThis, uint64_t features);
void (*setOptionalFeatures)(LibreOfficeKit* pThis, unsigned long long features);
/** @see lok::Office::setDocumentPassword().
@since LibreOffice 6.0
......@@ -90,7 +93,7 @@ struct _LibreOfficeKitClass
/** @see lok::Office::runMacro().
@since LibreOffice 6.0
*/
bool (*runMacro) (LibreOfficeKit *pThis, const char* pURL);
int (*runMacro) (LibreOfficeKit *pThis, const char* pURL);
};
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
......
......@@ -554,7 +554,7 @@ public:
* @since LibreOffice 6.0
* @see LibreOfficeKitOptionalFeatures
*/
void setOptionalFeatures(uint64_t features)
void setOptionalFeatures(unsigned long long features)
{
return mpThis->pClass->setOptionalFeatures(mpThis, features);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment