[gnumeric] Leak fix + doc fix.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Leak fix + doc fix.
- Date: Mon, 27 Apr 2020 01:30:33 +0000 (UTC)
commit 2f04586d3f34f4bf18a4c90d6474b75c94ad8b20
Author: Morten Welinder <terra gnome org>
Date: Sun Apr 26 21:30:12 2020 -0400
Leak fix + doc fix.
ChangeLog | 4 ++++
src/sheet.c | 23 +++++++++++------------
src/sheet.h | 2 +-
3 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 679e3dd97..9fdf161b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2020-04-26 Morten Welinder <terra gnome org>
+ * src/sheet.c (sheet_clear_region): Fix type of clear_flags.
+ (gnm_sheet_finalize): Free the list of pending redraws, just in
+ case.
+
* src/dependent.c (style_dep_unrender): Queue the redraw instead
of doing it.
diff --git a/src/sheet.c b/src/sheet.c
index f44620c87..3f0558fcf 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -4898,6 +4898,7 @@ gnm_sheet_finalize (GObject *obj)
g_source_remove (sheet->pending_redraw_src);
sheet->pending_redraw_src = 0;
}
+ g_slist_free_full (sheet->pending_redraw, g_free);
if (debug_FMR) {
g_printerr ("Sheet %p is %s\n", sheet, sheet->name_quoted);
@@ -4952,24 +4953,22 @@ cb_empty_cell (GnmCellIter const *iter, gpointer user)
/**
* sheet_clear_region:
- * @sheet:
- * @start_col:
- * @start_row:
- * @end_col:
- * @end_row:
- * @clear_flags: If this is %TRUE then styles are erased.
- * @cc: (nullable):
- *
- * Clears are region of cells
+ * @sheet: the sheet being changed
+ * @start_col: Starting column
+ * @start_row: Starting row
+ * @end_col: Ending column
+ * @end_row: Ending row
+ * @clear_flags: flags indicating what to clear
+ * @cc: (nullable): command context for error reporting
*
- * We assemble a list of cells to destroy, since we will be making changes
- * to the structure being manipulated by the sheet_foreach_cell_in_region routine
+ * Clears a region of cells, formats, object, etc. as indicated by
+ * @clear_flags.
*/
void
sheet_clear_region (Sheet *sheet,
int start_col, int start_row,
int end_col, int end_row,
- int clear_flags,
+ SheetClearFlags clear_flags,
GOCmdContext *cc)
{
GnmRange r;
diff --git a/src/sheet.h b/src/sheet.h
index 4ec65cc50..50cf7d97c 100644
--- a/src/sheet.h
+++ b/src/sheet.h
@@ -400,7 +400,7 @@ typedef enum {
void sheet_clear_region (Sheet *sheet,
int start_col, int start_row,
int end_col, int end_row,
- int clear_flags, GOCmdContext *cc);
+ SheetClearFlags clear_flags, GOCmdContext *cc);
GOUndo *sheet_clear_region_undo (GnmSheetRange *sr,
int clear_flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]