gnumeric r17276 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17276 - in trunk: . src
- Date: Wed, 1 Apr 2009 20:03:59 +0000 (UTC)
Author: mortenw
Date: Wed Apr 1 20:03:59 2009
New Revision: 17276
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17276&view=rev
Log:
2009-04-01 Morten Welinder <terra gnome org>
* src/sheet-style.c (cb_style_list_add_node): Fix type confusion
for user pointer. Fixes #577561.
Modified:
trunk/ChangeLog
trunk/src/sheet-style.c
Modified: trunk/src/sheet-style.c
==============================================================================
--- trunk/src/sheet-style.c (original)
+++ trunk/src/sheet-style.c Wed Apr 1 20:03:59 2009
@@ -2003,25 +2003,20 @@
typedef struct {
GHashTable *cache;
gboolean (*style_equal) (GnmStyle const *a, GnmStyle const *b);
-} StyleListMerge;
-
-struct add_node_closure {
Sheet const *sheet;
- StyleListMerge *mi;
-};
+} StyleListMerge;
static void
cb_style_list_add_node (GnmStyle *style,
int corner_col, int corner_row, int width, int height,
- GnmRange const *apply_to, gpointer user)
+ GnmRange const *apply_to, gpointer user_)
{
- StyleListMerge *mi = ((struct add_node_closure*) user)->mi;
+ StyleListMerge *mi = user_;
GnmStyleRegion *sr = NULL;
- GnmCellPos key;
+ GnmCellPos key;
GnmRange range;
- /* FIXME we need a real Sheet here */
- Sheet const *sheet = ((struct add_node_closure*) user)->sheet;
-
+ Sheet const *sheet = mi->sheet;
+
range.start.col = corner_col;
range.start.row = corner_row;
range.end.col = corner_col + width - 1;
@@ -2146,17 +2141,14 @@
{
GnmStyleList *res = NULL;
StyleListMerge mi;
- struct add_node_closure cl;
mi.style_equal = gnm_style_equal;
mi.cache = g_hash_table_new ((GHashFunc)&gnm_cellpos_hash,
(GCompareFunc)&gnm_cellpos_equal);
- cl.mi = &mi;
- cl.sheet = sheet;
-
+ mi.sheet = sheet;
foreach_tile (sheet->style_data->styles,
sheet->tile_top_level, 0, 0, r,
- cb_style_list_add_node, &cl);
+ cb_style_list_add_node, &mi);
#ifdef DEBUG_STYLE_LIST
g_printerr ("=========\n");
#endif
@@ -2203,6 +2195,7 @@
mi.style_equal = style_conditions_equal;
mi.cache = g_hash_table_new ((GHashFunc)&gnm_cellpos_hash,
(GCompareFunc)&gnm_cellpos_equal);
+ mi.sheet = sheet;
foreach_tile (sheet->style_data->styles,
sheet->tile_top_level, 0, 0, r,
@@ -2253,6 +2246,7 @@
mi.style_equal = style_hlink_equal;
mi.cache = g_hash_table_new ((GHashFunc)&gnm_cellpos_hash,
(GCompareFunc)&gnm_cellpos_equal);
+ mi.sheet = sheet;
foreach_tile (sheet->style_data->styles,
sheet->tile_top_level, 0, 0, r,
@@ -2306,6 +2300,7 @@
mi.style_equal = style_validation_equal;
mi.cache = g_hash_table_new ((GHashFunc)&gnm_cellpos_hash,
(GCompareFunc)&gnm_cellpos_equal);
+ mi.sheet = sheet;
foreach_tile (sheet->style_data->styles,
sheet->tile_top_level, 0, 0, r,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]