[Libreoffice-commits] core.git: Branch 'feature/liblibo' - desktop/inc desktop/Module_desktop.mk desktop/source Repository.mk
Michael Meeks
michael.meeks at suse.com
Tue Mar 5 05:18:18 PST 2013
Repository.mk | 1 +
desktop/Module_desktop.mk | 1 +
desktop/inc/liblibreoffice.h | 38 ++++++++++++++++++++++++++++++++++++++
desktop/source/lib/init.cxx | 40 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 80 insertions(+)
New commits:
commit baa661b2b66201d79281395c94e3dd9f0c266bf2
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Mar 5 13:16:36 2013 +0000
liblibo: create initial stub liblibreoffice.
Change-Id: I855b640557f93959749e966a2d8e5e577fd84574
diff --git a/Repository.mk b/Repository.mk
index be52c79..d1f1956 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -472,6 +472,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
hsqldb \
index_data \
java_uno_accessbridge \
+ libreoffice \
localedata_en \
localedata_es \
localedata_euro \
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 1122360..6e8cc1f 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
AllLangResTarget_dkt \
Library_deployment \
Library_deploymentmisc \
+ Library_libreoffice \
Library_offacc \
Library_sofficeapp \
Library_spl \
diff --git a/desktop/inc/liblibreoffice.h b/desktop/inc/liblibreoffice.h
new file mode 100644
index 0000000..200688b
--- /dev/null
+++ b/desktop/inc/liblibreoffice.h
@@ -0,0 +1,38 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ * A simple C API to setup and use libreoffice
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ int errno;
+ char *message;
+} LOError;
+
+typedef int loboolean;
+typedef struct _LODocument LODocument;
+
+void lo_initialize (const char *install_path);
+
+void lo_error_free (LOError *error);
+LOError *lo_error_new (int errno, const char *message);
+
+LODocument *lo_document_load (const char *url, LOError **opt_error);
+loboolean lo_document_save (const char *url, LOError **opt_error);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
new file mode 100644
index 0000000..d3c2e98
--- /dev/null
+++ b/desktop/source/lib/init.cxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <stdio.h>
+#include <liblibreoffice.h>
+
+
+void lo_error_free( LOError * )
+{
+}
+
+LOError *lo_error_new( int, const char * )
+{
+ return NULL;
+}
+
+LODocument *
+lo_document_load (const char *, LOError ** )
+{
+ return NULL;
+}
+
+loboolean
+lo_document_save (const char *, LOError ** )
+{
+ return 1;
+}
+
+void lo_initialize(const char *)
+{
+ fprintf (stderr, "do nothing yet");
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list