[goffice] GOFormat: the odf version from output.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] GOFormat: the odf version from output.
- Date: Wed, 21 Mar 2012 20:32:14 +0000 (UTC)
commit 0602fa73851608396834a89fd075853b90259217
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 21 16:31:57 2012 -0400
GOFormat: the odf version from output.
ChangeLog | 5 +++++
configure.in | 8 ++++++++
goffice/utils/go-format.c | 8 +++++++-
goffice/utils/go-format.h | 1 -
4 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4049946..4105319 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-21 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-format.c (go_format_output_to_odf): Undo last
+ change. Get version from output.
+
2012-03-20 Morten Welinder <terra gnome org>
* goffice/utils/go-format.c (go_format_output_to_odf): Take extra
diff --git a/configure.in b/configure.in
index 85554b5..1a7a2ce 100644
--- a/configure.in
+++ b/configure.in
@@ -530,6 +530,14 @@ if test $ac_cv_func_log = no; then
LIBS="$LIBS -lm"])
fi
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+CFLAGS="$CFLAGS $GOFFICE_CFLAGS"
+LIBS="$GOFFICE_LIBS $LIBS"
+AC_CHECK_FUNCS(gsf_odf_out_get_version)
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
+
if test $gtk_disable_deprecated = yes; then
CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED"
fi
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index ec049ce..b85325c 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -8349,7 +8349,6 @@ go_format_output_general_to_odf (GsfXMLOut *xout, char const *name, int cond_par
gboolean
go_format_output_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
int cond_part, char const *name,
- int odf_version,
gboolean with_extension)
{
gboolean pp = TRUE, result = TRUE;
@@ -8358,10 +8357,17 @@ go_format_output_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
GOFormat const *act_fmt, *det_fmt = fmt;
GOFormatCondition *condition = NULL;
GOFormatFamily family;
+ int odf_version;
if (fmt == NULL)
return FALSE;
+#ifdef HAVE_GSF_ODF_OUT_GET_VERSION
+ odf_version = gsf_odf_out_get_version (GSF_ODF_OUT (xout));
+#else
+ odf_version = get_gsf_odf_version ();
+#endif
+
if (fmt->typ == GO_FMT_COND) {
g_return_val_if_fail (cond_part <= fmt->u.cond.n, FALSE);
condition = &(fmt->u.cond.conditions[cond_part]);
diff --git a/goffice/utils/go-format.h b/goffice/utils/go-format.h
index 3dd44ee..8ae07ae 100644
--- a/goffice/utils/go-format.h
+++ b/goffice/utils/go-format.h
@@ -259,7 +259,6 @@ GOFormat *go_format_toggle_1000sep (GOFormat const *fmt);
char *go_format_odf_style_map (GOFormat const *fmt, int cond_part);
gboolean go_format_output_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
int cond_part, char const *name,
- int odf_version,
gboolean with_extension);
void go_format_foreach (GHFunc func, gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]