diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-01-19 10:58:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-29 17:05:47 +0100 |
commit | 375f32c3307f9521ab6397621832dfd0754be654 (patch) | |
tree | 09595ef2ebb69d7a89bb8160a9dc3162817731d2 /desktop | |
parent | 840ad19b6409070bfb27b7644cec7cae86aa5d3c (diff) |
Make LibreOffice kit usable on windows
Uses Ascii variants of LoadLibrary,Get/SetEnvironmentVariable_A_
and adds a freeError function
includes windows.h instead of pre/postwin.h
(cherry picked from commit 442a022cf7baefbd5519ea55c7978cf839e1f44d)
Conflicts:
include/LibreOfficeKit/LibreOfficeKitInit.h
Change-Id: I88b7e3ed3818078efec5688e207da47dc4049b98
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cbce5ccc9b75..a02a3a2ce272 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -441,6 +441,7 @@ static void lo_destroy (LibreOfficeKit* pThis); static int lo_initialize (LibreOfficeKit* pThis, const char* pInstallPath, const char* pUserProfilePath); static LibreOfficeKitDocument* lo_documentLoad (LibreOfficeKit* pThis, const char* pURL); static char * lo_getError (LibreOfficeKit* pThis); +static void lo_freeError (const char *pfree); static LibreOfficeKitDocument* lo_documentLoadWithOptions (LibreOfficeKit* pThis, const char* pURL, const char* pOptions); @@ -461,6 +462,7 @@ LibLibreOffice_Impl::LibLibreOffice_Impl() m_pOfficeClass->destroy = lo_destroy; m_pOfficeClass->documentLoad = lo_documentLoad; m_pOfficeClass->getError = lo_getError; + m_pOfficeClass->freeError = lo_freeError; m_pOfficeClass->documentLoadWithOptions = lo_documentLoadWithOptions; m_pOfficeClass->registerCallback = lo_registerCallback; m_pOfficeClass->getFilterTypes = lo_getFilterTypes; @@ -1613,6 +1615,10 @@ static char* lo_getError (LibreOfficeKit *pThis) strcpy(pMemory, aString.getStr()); return pMemory; } +static void lo_freeError(const char *pfree) +{ + free((void *) pfree); +} static char* lo_getFilterTypes(LibreOfficeKit* pThis) { |