diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-20 16:21:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-23 10:10:30 +0100 |
commit | 77debb673e61340dfc3ddc63b6d72731c091c210 (patch) | |
tree | 00166a3ca1312f24dd7a1689ec310e11c089e8ac /desktop | |
parent | 916d40e047ae7a46ce8da05776c66a4e8630c809 (diff) |
Extract LibreOfficeKitEnums.h from LibreOfficeKit.h
This massively reduces the rebuild time in case only a new enumeration
value is added to one of the enums.
Change-Id: I4e58adf36fcd29da1672a5e5091bd3f6744f148d
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 11 | ||||
-rw-r--r-- | desktop/source/lib/lokandroid.cxx | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a144b51969bf..3acb7bf1f0c7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -18,6 +18,7 @@ #define LOK_USE_UNSTABLE_API #include <LibreOfficeKit/LibreOfficeKit.h> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <tools/errinf.hxx> #include <osl/file.hxx> @@ -182,12 +183,12 @@ extern "C" static void doc_destroy(LibreOfficeKitDocument* pThis); static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* pUrl, const char* pFormat, const char* pFilterOptions); -static LibreOfficeKitDocumentType doc_getDocumentType(LibreOfficeKitDocument* pThis); +static int doc_getDocumentType(LibreOfficeKitDocument* pThis); static int doc_getParts(LibreOfficeKitDocument* pThis); static int doc_getPart(LibreOfficeKitDocument* pThis); static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart); static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart); -static void doc_setPartMode(LibreOfficeKitDocument* pThis, LibreOfficeKitPartMode ePartMode); +static void doc_setPartMode(LibreOfficeKitDocument* pThis, int nPartMode); void doc_paintTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, const int nCanvasWidth, const int nCanvasHeight, @@ -450,7 +451,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha return false; } -static LibreOfficeKitDocumentType doc_getDocumentType (LibreOfficeKitDocument* pThis) +static int doc_getDocumentType (LibreOfficeKitDocument* pThis) { LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); @@ -541,7 +542,7 @@ static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart) } static void doc_setPartMode(LibreOfficeKitDocument* pThis, - LibreOfficeKitPartMode ePartMode) + int nPartMode) { ITiledRenderable* pDoc = getTiledRenderable(pThis); if (!pDoc) @@ -554,7 +555,7 @@ static void doc_setPartMode(LibreOfficeKitDocument* pThis, int nCurrentPart = pDoc->getPart(); - pDoc->setPartMode(ePartMode); + pDoc->setPartMode(nPartMode); // We need to make sure the internal state is updated, just changing the mode // might not update the relevant shells (i.e. impress will keep rendering the diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx index 9ea1842975a3..a4f7297e7178 100644 --- a/desktop/source/lib/lokandroid.cxx +++ b/desktop/source/lib/lokandroid.cxx @@ -209,7 +209,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPart { LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject); - pDocument->pClass->setPartMode(pDocument, (LibreOfficeKitPartMode) nPartMode); + pDocument->pClass->setPartMode(pDocument, nPartMode); } extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getDocumentTypeNative |