[gnumeric] some minor ODF export speedup
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] some minor ODF export speedup
- Date: Tue, 6 Nov 2012 23:10:02 +0000 (UTC)
commit 9943bc1a5062d46312b0fa0a8d67a4a5f432071c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Nov 6 16:08:53 2012 -0700
some minor ODF export speedup
2012-11-05 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_cell): use gnm_style_get_format instead of
gnm_cell_get_format if possible
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-write.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index c006feb..f016650 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-05 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (odf_write_cell): use gnm_style_get_format instead of
+ gnm_cell_get_format if possible
+
2012-11-04 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_cell): add argument, change caller
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 6ddc25c..62ab57f 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -3149,11 +3149,8 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
GnmStyle const *style, GSList *objects)
{
int rows_spanned = 0, cols_spanned = 0;
- gboolean pp = TRUE;
GnmHLink *link = NULL;
- g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, NULL);
-
if (merge_range != NULL) {
rows_spanned = merge_range->end.row - merge_range->start.row + 1;
cols_spanned = merge_range->end.col - merge_range->start.col + 1;
@@ -3225,7 +3222,7 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
value_get_as_bool (cell->value, NULL));
break;
case VALUE_FLOAT: {
- GOFormat const *fmt = gnm_cell_get_format (cell);
+ GOFormat const *fmt = style ? gnm_style_get_format (style) : gnm_cell_get_format (cell);
if (go_format_is_date (fmt)) {
char *str;
gnm_float f = value_get_as_float (cell->value);
@@ -3298,7 +3295,10 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
odf_write_objects (state, objects);
if (cell != NULL && cell->value != NULL) {
+ gboolean pp = TRUE;
+ g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, NULL);
g_object_set (G_OBJECT (state->xml), "pretty-print", FALSE, NULL);
+
if ((VALUE_FMT (cell->value) == NULL)
|| (!VALUE_IS_STRING (cell->value))
|| (!go_format_is_markup (VALUE_FMT (cell->value)))) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]