[libgsf] Try to make things work on WIN32 and change a float to int
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgsf] Try to make things work on WIN32 and change a float to int
- Date: Tue, 26 May 2009 17:40:44 -0400 (EDT)
commit 92a0f3961a53f00ccd305c1a5c550489a1f67f9b
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue May 26 15:39:28 2009 -0600
Try to make things work on WIN32 and change a float to int
2009-05-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* gsf/gsf-opendoc-utils.h (gsf_odf_version): deleted
(gsf_odf_version_string): deleted
(get_gsf_ooo_ns): new
(get_gsf_odf_version_string): new
(get_gsf_odf_version): new
---
ChangeLog | 8 ++++++++
gsf/gsf-opendoc-utils.c | 26 ++++++++++++++++++++++----
gsf/gsf-opendoc-utils.h | 9 ++++++---
3 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bfda694..1a702b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * gsf/gsf-opendoc-utils.h (gsf_odf_version): deleted
+ (gsf_odf_version_string): deleted
+ (get_gsf_ooo_ns): new
+ (get_gsf_odf_version_string): new
+ (get_gsf_odf_version): new
+
2009-05-25 Andreas J. Guelzow <aguelzow pyrshep ca>
* gsf/gsf-opendoc-utils.[ch]: replace GSF_ODF_VERSION with a variable
diff --git a/gsf/gsf-opendoc-utils.c b/gsf/gsf-opendoc-utils.c
index 6243710..5d8521f 100644
--- a/gsf/gsf-opendoc-utils.c
+++ b/gsf/gsf-opendoc-utils.c
@@ -31,6 +31,7 @@
#include <gsf/gsf-docprop-vector.h>
#include <string.h>
+
#define OFFICE "office:"
typedef struct {
@@ -40,8 +41,19 @@ typedef struct {
char *name;
} GsfOOMetaIn;
-char const *gsf_odf_version_string = "1.1";
-float gsf_odf_version = 1.1;
+G_MODULE_EXPORT char const *
+get_gsf_odf_version_string (void)
+{
+ return "1.1";
+}
+
+G_MODULE_EXPORT short
+get_gsf_odf_version (void)
+{
+ return 101;
+}
+
+
/* Generated based on:
* http://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf */
@@ -122,6 +134,12 @@ GsfXMLInNS gsf_ooo_ns[] = {
{ NULL, 0 }
};
+G_MODULE_EXPORT GsfXMLInNS *get_gsf_ooo_ns (void)
+{
+ return gsf_ooo_ns;
+}
+
+
static void
od_get_meta_prop (GsfXMLIn *xin, char const *prop_name, GType g_type)
{
@@ -512,8 +530,8 @@ gsf_opendoc_metadata_write (GsfXMLOut *output, GsfDocMetaData const *md)
"urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
gsf_xml_out_add_cstr_unchecked (output, "xmlns:ooo",
"http://openoffice.org/2004/office");
- gsf_xml_out_add_cstr_unchecked (output, "office:version", gsf_odf_version_string);
-
+ gsf_xml_out_add_cstr_unchecked (output, "office:version",
+ get_gsf_odf_version_string ());
gsf_xml_out_start_element (output, OFFICE "meta");
gsf_doc_meta_data_foreach (md, (GHFunc) meta_write_props, output);
gsf_xml_out_end_element (output); /* </office:meta> */
diff --git a/gsf/gsf-opendoc-utils.h b/gsf/gsf-opendoc-utils.h
index 93ed172..0b307f3 100644
--- a/gsf/gsf-opendoc-utils.h
+++ b/gsf/gsf-opendoc-utils.h
@@ -27,6 +27,7 @@
#include <gsf/gsf.h>
#include <gsf/gsf-libxml.h>
+#include <gmodule.h>
G_BEGIN_DECLS
@@ -89,9 +90,11 @@ enum {
OO_GNUM_NS_EXT
};
-extern GsfXMLInNS gsf_ooo_ns[];
-extern char const *gsf_odf_version_string;
-extern float gsf_odf_version;
+G_MODULE_EXPORT GsfXMLInNS *get_gsf_ooo_ns (void);
+G_MODULE_EXPORT char const *get_gsf_odf_version_string (void);
+G_MODULE_EXPORT short get_gsf_odf_version (void);
+
+extern GsfXMLInNS gsf_ooo_ns[]; /* use get_gsf_ooo_ns instead */
/* For 1.15.x s/opendoc/odf/ and s/ooo/odf/ */
GError *gsf_opendoc_metadata_read (GsfInput *input, GsfDocMetaData *md);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]