diff options
author | Jack Leigh <leighman@gmx.se> | 2013-03-05 16:19:58 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-12 15:35:34 +0000 |
commit | 07352f07ce40ef40e9b73fd05aa4f9c5eac38290 (patch) | |
tree | 9a0ece5e5781f2a2846a0948f50727ed467278a8 /desktop/inc | |
parent | 8887de72c184bec6225a952ec90433ae1b7a5b26 (diff) |
liblibo: move to C++ interface.
Change-Id: Ie14a9446abd9524604feddf811d5373a26a30cbd
Diffstat (limited to 'desktop/inc')
-rw-r--r-- | desktop/inc/liblibreoffice.h | 38 | ||||
-rw-r--r-- | desktop/inc/liblibreoffice.hxx | 30 | ||||
-rw-r--r-- | desktop/inc/liblibreoffice_impl.hxx | 30 |
3 files changed, 60 insertions, 38 deletions
diff --git a/desktop/inc/liblibreoffice.h b/desktop/inc/liblibreoffice.h deleted file mode 100644 index dde50cec88e1..000000000000 --- a/desktop/inc/liblibreoffice.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- 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; - -loboolean 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/inc/liblibreoffice.hxx b/desktop/inc/liblibreoffice.hxx new file mode 100644 index 000000000000..74f6769944e4 --- /dev/null +++ b/desktop/inc/liblibreoffice.hxx @@ -0,0 +1,30 @@ +/* -*- 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/. + */ + +#ifndef _LIBLIBREOFFICE_HXX +#define _LIBLIBREOFFICE_HXX + +typedef int loboolean; +typedef struct _LODocument LODocument; + +class LibLibreOffice +{ +public: + virtual loboolean initialize (const char *installPath) = 0; + + virtual LODocument *documentLoad (const char *url) = 0; + virtual loboolean documentSave (const char *url) = 0; + + virtual ~LibLibreOffice () {}; +}; + +LibLibreOffice *lo_init (const char *install_path); + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/inc/liblibreoffice_impl.hxx b/desktop/inc/liblibreoffice_impl.hxx new file mode 100644 index 000000000000..d7686eb1dbdf --- /dev/null +++ b/desktop/inc/liblibreoffice_impl.hxx @@ -0,0 +1,30 @@ +/* -*- 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/. + */ + +#ifndef _LIBLIBREOFFICE_IMPL_HXX +#define _LIBLIBREOFFICE_IMPL_HXX + +#include "liblibreoffice.hxx" + +typedef int loboolean; +typedef struct _LODocument LODocument; + +class LibLibreOffice_Impl : public LibLibreOffice +{ +public: + virtual loboolean initialize (const char *installPath); + + virtual LODocument *documentLoad (const char *url); + virtual loboolean documentSave (const char *url); + + virtual ~LibLibreOffice_Impl (); +}; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |