shared_headers.h
1/* This file is part of the TDE project
2
3 This library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Library General Public
5 License as published by the Free Software Foundation; either
6 version 2 of the License, or (at your option) any later version.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17*/
18
19/*
20 This file handles the different version of include files required
21 when using libwpd-0.8, libwpd-0.9 or libwpd-0.10
22*/
23
24#ifndef __SHARED_HEADERS_H__
25#define __SHARED_HEADERS_H__
26
27#include <config.h>
28
29#ifdef HAVE_LIBWPD_0100
30 //libwpd-0.10
31 #include <librevenge/RVNGBinaryData.h>
32 #include <librevenge-stream/librevenge-stream.h>
33 #include <librevenge/RVNGPropertyList.h>
34 #include <librevenge/RVNGPropertyListVector.h>
35 #include <librevenge/RVNGString.h>
36
37 #define _SH_BinaryData librevenge::RVNGBinaryData
38 #define _SH_DocumentInterface librevenge::RVNGTextInterface
39 #define _SH_InputStream librevenge::RVNGInputStream
40 #define _SH_PropertyList librevenge::RVNGPropertyList
41 #define _SH_PropertyListVector librevenge::RVNGPropertyListVector
42 #define _SH_SEEK_CUR librevenge::RVNG_SEEK_CUR
43 #define _SH_SEEK_SET librevenge::RVNG_SEEK_SET
44 #define _SH_SEEK_TYPE librevenge::RVNG_SEEK_TYPE
45 #define _SH_String librevenge::RVNGString
46
47#else
48 //libwpd-0.9 and libwpd-0.8
49 #include <libwpd/WPXPropertyList.h>
50 #include <libwpd/WPXPropertyListVector.h>
51 #include <libwpd/WPXString.h>
52
53#ifdef HAVE_LIBWPD_090
54 #include <libwpd/WPXBinaryData.h>
55 #include <libwpd-stream/libwpd-stream.h>
56#else
57 #include <libwpd/WPXStream.h>
58#endif
59
60 #define _SH_BinaryData WPXBinaryData
61#ifdef HAVE_LIBWPD_090
62 #define _SH_DocumentInterface WPXDocumentInterface
63#else
64 #define _SH_DocumentInterface WPXHLListenerImpl
65#endif
66 #define _SH_InputStream WPXInputStream
67 #define _SH_PropertyList WPXPropertyList
68 #define _SH_PropertyListVector WPXPropertyListVector
69 #define _SH_SEEK_CUR WPX_SEEK_CUR
70 #define _SH_SEEK_SET WPX_SEEK_SET
71 #define _SH_SEEK_TYPE WPX_SEEK_TYPE
72 #define _SH_String WPXString
73#endif
74
75#endif