[gnumeric] Format Dialog: ignore markup formats when scanning selection.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Format Dialog: ignore markup formats when scanning selection.
- Date: Sat, 16 May 2009 19:54:45 -0400 (EDT)
commit 454b84b943006f5f08a49f3403651d3ddac9ecbd
Author: Morten Welinder <terra gnome org>
Date: Sat May 16 19:54:20 2009 -0400
Format Dialog: ignore markup formats when scanning selection.
---
NEWS | 1 +
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-cell-format.c | 17 +++++++++--------
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 259a582..31e6ba1 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ Morten:
* Improve ssindex' coverage.
* Make it possible to have horizontal widgets too. [#166487]
* Fix sheet-object paste crash. [#490479]
+ * Fix critical in format dialog. [#582890]
Paul Fitzpatrick:
* Extend ssconvert to also merge multiple sheets. [#581616]
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 62eb45e..4931796 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-16 Morten Welinder <terra gnome org>
+
+ * dialog-cell-format.c (cb_check_cell_format): Ignore markup
+ formats. Fixes #582890.
+
2009-05-16 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-stf-export.glade: don't asked for translation of
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 2330d19..a459c4f 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -463,9 +463,10 @@ fmt_dialog_init_format_page (FormatState *state)
gtk_label_new (_("Number")));
gtk_widget_show (GTK_WIDGET (gfs));
- if (0 == (state->conflicts & (1 << MSTYLE_FORMAT)))
- go_format_sel_set_style_format (gfs,
- gnm_style_get_format (state->style));
+ if (0 == (state->conflicts & (1 << MSTYLE_FORMAT))) {
+ GOFormat const *fmt = gnm_style_get_format (state->style);
+ go_format_sel_set_style_format (gfs, fmt);
+ }
if (state->value)
gnm_format_sel_set_value (gfs, state->value);
go_format_sel_set_dateconv (gfs,
@@ -2337,15 +2338,15 @@ cb_check_cell_format (GnmCellIter const *iter, gpointer user)
FormatState *state = user;
GnmValue const *value = iter->cell->value;
GOFormat const *common = gnm_style_get_format (state->style);
+ GOFormat const *fmt = value ? VALUE_FMT (value) : NULL;
- if (!value || !VALUE_FMT (value))
- return NULL;
-
- if (go_format_eq (common, VALUE_FMT (value)))
+ if (!fmt ||
+ go_format_is_markup (fmt) ||
+ go_format_eq (common, fmt))
return NULL;
if (go_format_is_general (common)) {
- gnm_style_set_format (state->style, VALUE_FMT (value));
+ gnm_style_set_format (state->style, fmt);
return NULL;
} else {
state->conflicts |= MSTYLE_FORMAT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]