[gnumeric] Code cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Code cleanup.
- Date: Sun, 19 Jul 2020 22:05:15 +0000 (UTC)
commit be414ff881b47035bdb9ac1522bc98e9fe305abf
Author: Morten Welinder <terra gnome org>
Date: Sun Jul 19 18:04:56 2020 -0400
Code cleanup.
plugins/excel/xlsx-read.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 37b808fa2c..248dd93c58 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -2616,21 +2616,20 @@ static void
xlsx_cond_fmt_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- GnmStyle *style = NULL;
- GSList *ptr;
if (NULL != state->conditions) {
- style = gnm_style_new ();
+ GSList *ptr;
+ GnmStyle *style = gnm_style_new ();
gnm_style_set_conditions (style, state->conditions);
for (ptr = state->cond_regions ; ptr != NULL ; ptr = ptr->next) {
+ GnmRange *r = ptr->data;
gnm_style_ref (style);
- sheet_style_apply_range (state->sheet, ptr->data, style);
- g_free (ptr->data);
+ sheet_style_apply_range (state->sheet, r, style);
}
gnm_style_unref (style);
- } else for (ptr = state->cond_regions ; ptr != NULL ; ptr = ptr->next)
- g_free (ptr->data);
- g_slist_free (state->cond_regions);
+ state->conditions = NULL;
+ }
+ g_slist_free_full (state->cond_regions, g_free);
state->cond_regions = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]