diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-01-19 10:58:07 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2016-01-19 14:39:24 +0000 |
commit | 442a022cf7baefbd5519ea55c7978cf839e1f44d (patch) | |
tree | b847bc44a14988bb4f6252e8bfa9e4cf22e67bdd /desktop | |
parent | 802564e036db1ee3df8b19593b7f9f1be0deec54 (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
Change-Id: I88b7e3ed3818078efec5688e207da47dc4049b98
Reviewed-on: https://gerrit.libreoffice.org/21600
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
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 28a54420eccd..f8d6a6c243c7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -430,6 +430,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); @@ -451,6 +452,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; @@ -1571,6 +1573,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) { |