[libgsf] Bump ODF version to 1.1 and add enum to inform users



commit 99267d5f3a6338cf8b56f905af2004b0b56b1d12
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Mon May 25 10:29:04 2009 -0600

    Bump ODF version to 1.1 and add enum to inform users
    
    2009-05-25  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gsf/gsf-opendoc-utils.[ch]: replace GSF_ODF_VERSION_STRING with the
    	  varaible gsf_odf_version_string and turn GSF_ODF_VERSION into an
    	  enum.
---
 ChangeLog               |    6 ++++++
 NEWS                    |    3 +++
 gsf/gsf-opendoc-utils.c |    4 +++-
 gsf/gsf-opendoc-utils.h |   10 +++++++---
 4 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a3d43f..59ee589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-25  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* gsf/gsf-opendoc-utils.[ch]: replace GSF_ODF_VERSION_STRING with the 
+	  varaible gsf_odf_version_string and turn GSF_ODF_VERSION into an 
+	  enum.
+
 2009-05-24  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* gsf/gsf-opendoc-utils.c (gsf_opendoc_metadata_write): use
diff --git a/NEWS b/NEWS
index 44b347e..d4f82f5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 libgsf 1.14.15
 
+Andreas:
+	* Bump ODF version to 1.1 and add enum to inform users. 
+
 --------------------------------------------------------------------------
 libgsf 1.14.14
 
diff --git a/gsf/gsf-opendoc-utils.c b/gsf/gsf-opendoc-utils.c
index 7bd4dc1..2170466 100644
--- a/gsf/gsf-opendoc-utils.c
+++ b/gsf/gsf-opendoc-utils.c
@@ -40,6 +40,8 @@ typedef struct {
 	char             *name;
 } GsfOOMetaIn;
 
+char const *gsf_odf_version_string = "1.1";
+
 /* Generated based on:
  * http://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf */
 /* and  OpenDocument-v1.1.pdf */
@@ -509,7 +511,7 @@ 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", gsf_odf_version_string);
 
 	gsf_xml_out_start_element (output, OFFICE "meta");
 	gsf_doc_meta_data_foreach (md, (GHFunc) meta_write_props, output);
diff --git a/gsf/gsf-opendoc-utils.h b/gsf/gsf-opendoc-utils.h
index f274a24..80f86e9 100644
--- a/gsf/gsf-opendoc-utils.h
+++ b/gsf/gsf-opendoc-utils.h
@@ -89,10 +89,14 @@ enum {
 	OO_GNUM_NS_EXT
 };
 
-extern GsfXMLInNS gsf_ooo_ns[];
+/* When we bump the GSF_ODF_VERSION we also need to change *\
+\* gsf_odf_version_string                                  */
+enum {
+	GSF_ODF_VERSION = 11
+};
 
-#define GSF_ODF_VERSION 11
-#define GSF_ODF_VERSION_STRING "1.1"
+extern GsfXMLInNS gsf_ooo_ns[];
+extern char const *gsf_odf_version_string;
 
 /* 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]