[Libreoffice-commits] core.git: Branch 'feature/cib_contract561' - 2 commits - desktop/source include/LibreOfficeKit solenv/gbuild
Stephan Bergmann
sbergman at redhat.com
Tue Sep 19 14:12:20 UTC 2017
Rebased ref, commits from common ancestor:
commit ce508ddfa90ad2b51c7dff393f529f7a2adee814
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Mar 9 10:10:57 2017 +0100
Remove stray CR from input
...that remained there with recent Cygwin/Bash version, which apparently had
changes to their Unix-vs.-DOS line end handling
Change-Id: Ib4c7c924362f9e93066e544ed5214fe589aa5336
Reviewed-on: https://gerrit.libreoffice.org/34990
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/solenv/gbuild/platform/filter-showIncludes.awk b/solenv/gbuild/platform/filter-showIncludes.awk
index 06788a94d368..47f7f6cb41ba 100755
--- a/solenv/gbuild/platform/filter-showIncludes.awk
+++ b/solenv/gbuild/platform/filter-showIncludes.awk
@@ -40,6 +40,7 @@ BEGIN {
}
{
+ sub(/\r$/, "")
sub(/^ */, "")
if (index($0, showincludes_prefix) == 1) {
$0 = substr($0, length(showincludes_prefix) + 1)
commit 86e2fdc963276af9e99cc65e889a3e6b72bf779d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 21 09:10:29 2016 +0100
Clean up lok::Office::freeError()
- let it take a non-const pointer, just like free() or g_free() does
- remove lok::Document::freeError(), which was declared, but not
implemented
- move the declaration at the end of the stable API, but before the
unstable section
Change-Id: I5a8ced61fc87641dc2fa0ea3615a350361fae3a1
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ff156399926f..fc957bf2effb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -300,7 +300,7 @@ static int lo_initialize (LibreOfficeKit* pThis, const ch
static LibreOfficeKitDocument* lo_documentLoad (LibreOfficeKit* pThis, const char* pURL);
static bool lo_runMacro (LibreOfficeKit* pThis, const char* pURL);
static char * lo_getError (LibreOfficeKit* pThis);
-static void lo_freeError (const char *pfree);
+static void lo_freeError (char* pFree);
static LibreOfficeKitDocument* lo_documentLoadWithOptions (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
@@ -974,7 +974,7 @@ static char* lo_getError (LibreOfficeKit *pThis)
return pMemory;
}
-static void lo_freeError(const char *pfree)
+static void lo_freeError(char *pfree)
{
free((void *) pfree);
}
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index ad453ef37ab3..c8611f7a6bbd 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -50,14 +50,15 @@ struct _LibreOfficeKitClass
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
-#ifdef LOK_USE_UNSTABLE_API
+ void (*freeError) (char* pFree);
+
+#if defined LOK_USE_UNSTABLE_API
void (*registerCallback) (LibreOfficeKit* pThis,
LibreOfficeKitCallback pCallback,
void* pData);
bool (*runMacro) (LibreOfficeKit *pThis, const char* pURL);
#endif
- void (*freeError) (const char *pfree);
};
@@ -78,7 +79,6 @@ struct _LibreOfficeKitDocumentClass
const char* pUrl,
const char* pFormat,
const char* pFilterOptions);
- void (*freeError) (const char *pfree);
#ifdef LOK_USE_UNSTABLE_API
/// @see lok::Document::getDocumentType().
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 060158d08800..9621e5090c67 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -247,10 +247,6 @@ public:
mpDoc->pClass->resetSelection(mpDoc);
}
#endif // LOK_USE_UNSTABLE_API
- inline void freeError(const char *pfree)
- {
- mpDoc->pClass->freeError(pfree);
- }
};
/// The lok::Office class represents one started LibreOfficeKit instance.
@@ -296,12 +292,14 @@ public:
{
return mpThis->pClass->getError(mpThis);
}
- inline void freeError(const char *pfree)
+
+ /// Frees the memory pointed to by pFree.
+ inline void freeError(char* pFree)
{
- mpThis->pClass->freeError(pfree);
+ mpThis->pClass->freeError(pFree);
}
-#ifdef LOK_USE_UNSTABLE_API
+#if defined LOK_USE_UNSTABLE_API
/**
* Run a macro.
*
More information about the Libreoffice-commits
mailing list