1 /*
2  * gsf-opendoc-utils.h:  Handle the application neutral portions of OpenDocument
3  *
4  * Author:  Luciano Wolf (luciano.wolf@indt.org.br)
5  *
6  * Copyright (C) 2005-2006 INdT - Instituto Nokia de Tecnologia
7  * http://www.indt.org.br
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of version 2.1 of the GNU Lesser General Public
11  * License as published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
21  * USA
22  */
23 
24 #ifndef GSF_OPENDOC_UTILS_H
25 #define GSF_OPENDOC_UTILS_H
26 
27 #include <gsf/gsf-fwd.h>
28 #include <gsf/gsf-libxml.h>
29 
30 G_BEGIN_DECLS
31 
32 /****************************************************************************/
33 
34 typedef struct {
35 	GsfXMLOutClass base;
36 
37 	/*< private >*/
38 	/* Padding for future expansion */
39 	void (*_gsf_reserved1) (void);
40 	void (*_gsf_reserved2) (void);
41 	void (*_gsf_reserved3) (void);
42 	void (*_gsf_reserved4) (void);
43 } GsfODFOutClass;
44 
45 typedef struct _GsfODFOut GsfODFOut;
46 struct _GsfODFOut {
47 	GsfXMLOut base;
48 	/*< private >*/
49 	struct _GsfODFOutPrivate *priv;
50 };
51 
52 #define GSF_ODF_OUT_TYPE	(gsf_odf_out_get_type ())
53 #define GSF_ODF_OUT(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_ODF_OUT_TYPE, GsfODFOut))
54 #define GSF_IS_ODF_OUT(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_ODF_OUT_TYPE))
55 
56 GType gsf_odf_out_get_type      (void);
57 
58 int gsf_odf_out_get_version     (GsfODFOut *oout);
59 char *gsf_odf_out_get_version_string (GsfODFOut *oout);
60 
61 /****************************************************************************/
62 
63 enum {
64 	OO_NS_OFFICE,
65 	OO_NS_STYLE,
66 	OO_NS_TEXT,
67 	OO_NS_TABLE,
68 	OO_NS_DRAW,
69 	OO_NS_NUMBER,
70 	OO_NS_CHART,
71 	OO_NS_DR3D,
72 	OO_NS_FORM,
73 	OO_NS_SCRIPT,
74 	OO_NS_CONFIG,
75 	OO_NS_MATH,
76 	OO_NS_FO,
77 	OO_NS_DC,
78 	OO_NS_META,
79 	OO_NS_XLINK,
80 	OO_NS_SVG,
81 
82 	/* new in 2.0 */
83 	OO_NS_OOO,
84 	OO_NS_OOOW,
85 	OO_NS_OOOC,
86 	OO_NS_DOM,
87 	OO_NS_XFORMS,
88 	OO_NS_XSD,
89 	OO_NS_XSI,
90 
91 	OO_NS_PRESENT,	/* added in gsf-1.14.8 */
92 
93 	/* new in 3.0 */
94 	OO_NS_RPT,
95 	OO_NS_OF,
96 	OO_NS_RDFA,
97 	OO_NS_FIELD,
98 	OO_NS_FORMX,
99 
100 	/* Other OpenDocument 1.1 */
101 	OO_NS_ANIM,
102 	OO_NS_DATASTYLE,
103 	OO_NS_MANIFEST,
104 	OO_NS_SMIL,
105 
106 	/* Symphony 1.3 */
107 	OO_LOTUS_NS_PRODTOOLS,
108 
109 	/* KOffice 1.6.3 */
110 	OO_KDE_NS_KOFFICE,
111 
112 	/*CleverAge ODF Add-in for Microsoft Office 3.0.5224.0 (11.0.8302)*/
113 	OO_CLEVERAGE_NS_DC,
114 
115 	/* Microsoft Excel Formulas */
116 	OO_MS_NS_MSOXL,
117 
118 	/* Gnumeric ODF extensions */
119 	OO_GNUM_NS_EXT,
120 
121 	/* New in ODF 3.2 */
122 	OO_NS_GRDDL,
123 	OO_NS_XHTML,
124 	OO_NS_TABLE_OOO,
125 
126 	/* New in ODF 3.3 */
127 	OO_NS_CHART_OOO,
128 
129 	/* New in LOCALC */
130 	OO_NS_LOCALC_EXT,
131 	OO_NS_LOCALC_EXT2
132 };
133 
134 GsfXMLInNS const *gsf_odf_get_ns (void);
135 char const *gsf_odf_get_version_string (void);
136 short gsf_odf_get_version (void);
137 
138 GError	*gsf_doc_meta_data_read_from_odf (GsfDocMetaData *md, GsfInput *input);
139 void	 gsf_doc_meta_data_odf_subtree   (GsfDocMetaData *md, GsfXMLIn *doc);
140 gboolean gsf_doc_meta_data_write_to_odf  (GsfDocMetaData const *md, gpointer output);
141 
142 
143 /* For 1.15.x s/opendoc/odf/ and s/ooo/odf/ */
144 #ifndef GSF_DISABLE_DEPRECATED
145 extern GsfXMLInNS gsf_ooo_ns[]; /* use get_gsf_ooo_ns instead */
146 G_DEPRECATED_FOR (gsf_odf_get_ns)
147 GsfXMLInNS *get_gsf_ooo_ns (void);
148 G_DEPRECATED_FOR (gsf_odf_get_version_string)
149 char const *get_gsf_odf_version_string (void);
150 G_DEPRECATED_FOR (gsf_odf_get_version)
151 short get_gsf_odf_version (void);
152 G_DEPRECATED_FOR (gsf_doc_meta_data_read_from_odf)
153 GError	*gsf_opendoc_metadata_read    (GsfInput *input, GsfDocMetaData *md);
154 G_DEPRECATED_FOR (gsf_doc_meta_data_odf_subtree)
155 void	 gsf_opendoc_metadata_subtree (GsfXMLIn *doc,   GsfDocMetaData *md);
156 G_DEPRECATED_FOR (gsf_doc_meta_data_write_to_odf)
157 gboolean gsf_opendoc_metadata_write   (gpointer output, GsfDocMetaData const *md);
158 #endif
159 
160 G_END_DECLS
161 
162 #endif /* GSF_OPENDOC_UTILS_H */
163