[gnumeric] Introspection fixes
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Introspection fixes
- Date: Thu, 19 Apr 2018 12:39:40 +0000 (UTC)
commit 2bfc354a90923f74a93da9a2958818aa43ed328c
Author: Morten Welinder <terra gnome org>
Date: Thu Apr 19 08:39:20 2018 -0400
Introspection fixes
src/application.c | 2 +-
src/selection.c | 2 +-
src/sheet-control-gui.c | 4 ++--
src/sheet-merge.c | 22 +++++++++++++---------
src/sheet-merge.h | 2 +-
src/stf-parse.c | 9 +++++----
src/stf-parse.h | 2 +-
src/workbook.c | 4 ++--
8 files changed, 26 insertions(+), 21 deletions(-)
---
diff --git a/src/application.c b/src/application.c
index a912340..c352ae9 100644
--- a/src/application.c
+++ b/src/application.c
@@ -603,7 +603,7 @@ compare_mru (GtkRecentInfo *a, GtkRecentInfo *b)
*
* creating it if necessary.
*
- * Return value: (element-type char) (transfer full): the list, which must be
+ * Return value: (element-type utf8) (transfer full): the list, which must be
* freed along with the strings in it.
**/
GSList *
diff --git a/src/selection.c b/src/selection.c
index e86a3b4..de91460 100644
--- a/src/selection.c
+++ b/src/selection.c
@@ -489,7 +489,7 @@ sheet_selection_set_internal (SheetView *sv,
g_return_if_fail (range_is_sane (&new_sel));
if (sv->sheet != NULL) /* beware initialization */
- gnm_sheet_merge_find_container (sv->sheet, &new_sel);
+ gnm_sheet_merge_find_bounding_box (sv->sheet, &new_sel);
ss = (GnmRange *)sv->selections->data;
if (!just_add_it && range_equal (ss, &new_sel))
return;
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 3b76fa3..a6ee36a 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -1012,7 +1012,7 @@ gnm_pane_make_cell_visible (GnmPane *pane, int col, int row,
canvas = GOC_CANVAS (pane);
range.start.col = range.end.col = col;
range.start.row = range.end.row = row;
- gnm_sheet_merge_find_container (sheet, &range);
+ gnm_sheet_merge_find_bounding_box (sheet, &range);
gtk_widget_get_allocation (GTK_WIDGET (canvas), &ca);
@@ -3487,7 +3487,7 @@ scg_rangesel_changed (SheetControlGUI *scg,
/* 3) now double check that all merged regions are fully contained */
last_r = *r;
- gnm_sheet_merge_find_container (sheet, r);
+ gnm_sheet_merge_find_bounding_box (sheet, r);
if (!range_equal (&last_r, r))
gnm_expr_entry_load_from_range (expr_entry, sheet, r);
diff --git a/src/sheet-merge.c b/src/sheet-merge.c
index 930306a..ef46280 100644
--- a/src/sheet-merge.c
+++ b/src/sheet-merge.c
@@ -204,7 +204,6 @@ gnm_sheet_merge_remove (Sheet *sheet, GnmRange const *r)
* Returns: (element-type GnmRange) (transfer container): a list of the merged
* regions that overlap the target region.
* The list is ordered from top to bottom and RIGHT TO LEFT (by start coord).
- * Caller is responsible for freeing the list, but not the content.
*/
GSList *
gnm_sheet_merge_get_overlap (Sheet const *sheet, GnmRange const *range)
@@ -226,9 +225,11 @@ gnm_sheet_merge_get_overlap (Sheet const *sheet, GnmRange const *range)
/**
* gnm_sheet_merge_contains_pos:
+ * @sheet: #Sheet to query
+ * @pos: Position to look for a merged range.
*
- * If the GnmCellPos is contained in a merged region return the range.
- * The GnmRange should NOT be freed.
+ * Returns: (transfer none) (nullable): the merged range covering @pos, or
+ * %NULL if @pos is not within a merged region.
*/
GnmRange const *
gnm_sheet_merge_contains_pos (Sheet const *sheet, GnmCellPos const *pos)
@@ -285,11 +286,11 @@ gnm_sheet_merge_get_adjacent (Sheet const *sheet, GnmCellPos const *pos,
/**
* gnm_sheet_merge_is_corner:
- * @sheet:
+ * @sheet: #Sheet to query
* @pos: cellpos if top left corner
*
- * Returns a GnmRange pointer if the @pos is the topleft of a merged region.
- * The pointer should NOT be freed by the caller.
+ * Returns: (transfer none): a merged #GnmRange covering @pos if is the
+ * top-left corner of a merged region.
*/
GnmRange const *
gnm_sheet_merge_is_corner (Sheet const *sheet, GnmCellPos const *pos)
@@ -331,6 +332,7 @@ cb_restore_list_free (GSList *restore)
/**
* gnm_sheet_merge_relocate:
* @ri: Descriptor of what is moving.
+ * @pundo: (out) (optional) (transfer full): Undo information.
*
* Shifts merged regions that need to move.
*/
@@ -422,12 +424,14 @@ gnm_sheet_merge_relocate (GnmExprRelocateInfo const *ri, GOUndo **pundo)
}
/**
- * gnm_sheet_merge_find_container:
+ * gnm_sheet_merge_find_bounding_box:
* @sheet: sheet
- * @r: the range to test
+ * @r: the range to exten
+ *
+ * Extends @r such that no merged range is split by its boundary.
*/
void
-gnm_sheet_merge_find_container (Sheet const *sheet, GnmRange *target)
+gnm_sheet_merge_find_bounding_box (Sheet const *sheet, GnmRange *target)
{
gboolean changed;
GSList *merged, *ptr;
diff --git a/src/sheet-merge.h b/src/sheet-merge.h
index 04eb931..84ac5b1 100644
--- a/src/sheet-merge.h
+++ b/src/sheet-merge.h
@@ -18,7 +18,7 @@ GnmRange const *gnm_sheet_merge_contains_pos (Sheet const *sheet, GnmCellPos con
GnmRange const *gnm_sheet_merge_is_corner (Sheet const *sheet, GnmCellPos const *pos);
void gnm_sheet_merge_relocate (GnmExprRelocateInfo const *ri,
GOUndo **pundo);
-void gnm_sheet_merge_find_container (Sheet const *sheet,
+void gnm_sheet_merge_find_bounding_box (Sheet const *sheet,
GnmRange *r);
void gnm_sheet_merge_get_adjacent (Sheet const *sheet,
GnmCellPos const *pos,
diff --git a/src/stf-parse.c b/src/stf-parse.c
index 44c1339..41c1d99 100644
--- a/src/stf-parse.c
+++ b/src/stf-parse.c
@@ -324,13 +324,14 @@ stf_parse_options_set_trim_spaces (StfParseOptions_t *parseoptions, StfTrimType_
* stf_parse_options_csv_set_separators:
* @parseoptions: #StfParseOptions_t
* @character:
- * @string: (element-type char):
+ * @seps: (element-type utf8): the separators to be used
*
* A copy is made of the parameters.
**/
void
-stf_parse_options_csv_set_separators (StfParseOptions_t *parseoptions, char const *character,
- GSList const *string)
+stf_parse_options_csv_set_separators (StfParseOptions_t *parseoptions,
+ char const *character,
+ GSList const *seps)
{
g_return_if_fail (parseoptions != NULL);
@@ -338,7 +339,7 @@ stf_parse_options_csv_set_separators (StfParseOptions_t *parseoptions, char cons
parseoptions->sep.chr = g_strdup (character);
g_slist_free_full (parseoptions->sep.str, g_free);
- parseoptions->sep.str = go_slist_map (string, (GOMapFunc)g_strdup);
+ parseoptions->sep.str = go_slist_map (seps, (GOMapFunc)g_strdup);
}
void
diff --git a/src/stf-parse.h b/src/stf-parse.h
index fc6f689..18b2889 100644
--- a/src/stf-parse.h
+++ b/src/stf-parse.h
@@ -82,7 +82,7 @@ void stf_parse_options_add_line_terminator (StfParseOptions_t *parse
void stf_parse_options_set_trim_spaces (StfParseOptions_t *parseoptions,
StfTrimType_t const trim_spaces);
void stf_parse_options_csv_set_separators (StfParseOptions_t *parseoptions,
- char const *character, GSList const *string);
+ char const *character, GSList const *seps);
void stf_parse_options_csv_set_stringindicator (StfParseOptions_t *parseoptions,
gunichar const stringindicator);
void stf_parse_options_csv_set_indicator_2x_is_single (StfParseOptions_t *parseoptions,
diff --git a/src/workbook.c b/src/workbook.c
index 739dfc2..8b30d1b 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -1251,8 +1251,8 @@ workbook_sheet_get_free_name (Workbook *wb,
/**
* workbook_sheet_rename:
* @wb: #Workbook in which to rename sheets
- * @sheet_indices: (element-type void): list of sheet indices (ignore -1)
- * @new_names: (element-type char): list of new names
+ * @sheet_indices: (element-type void): list of sheet indices (ignore -1)
+ * @new_names: (element-type utf8): list of new names
*
* Adjusts the names of the sheets. We assume that everything is
* valid. If in doubt call workbook_sheet_reorder_check first.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]