Commit 2bfc354a authored by Morten Welinder's avatar Morten Welinder

Introspection fixes

parent dd76a0d3
......@@ -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 *
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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
......
......@@ -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,
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment