"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/workbook.c" between
gnumeric-1.12.49.tar.xz and gnumeric-1.12.50.tar.xz

About: Gnumeric - The GNOME office spreadsheet.

workbook.c  (gnumeric-1.12.49.tar.xz):workbook.c  (gnumeric-1.12.50.tar.xz)
skipping to change at line 670 skipping to change at line 670
g_return_val_if_fail (wb != NULL, cells); g_return_val_if_fail (wb != NULL, cells);
WORKBOOK_FOREACH_SHEET (wb, sheet, { WORKBOOK_FOREACH_SHEET (wb, sheet, {
size_t oldlen = cells->len; size_t oldlen = cells->len;
GPtrArray *scells; GPtrArray *scells;
if (sheet->visibility > vis) if (sheet->visibility > vis)
continue; continue;
scells = sheet_cell_positions (sheet, comments); scells = sheet_cell_positions (sheet, comments);
g_ptr_array_set_size (cells, oldlen + scells->len); if (scells->len) {
memcpy (&g_ptr_array_index (cells, oldlen), g_ptr_array_set_size (cells, oldlen + scells->len);
&g_ptr_array_index (scells, 0), memcpy (&g_ptr_array_index (cells, oldlen),
scells->len * sizeof (GnmEvalPos *)); &g_ptr_array_index (scells, 0),
scells->len * sizeof (GnmEvalPos *));
}
g_ptr_array_free (scells, TRUE); g_ptr_array_free (scells, TRUE);
}); });
return cells; return cells;
} }
GnmExprSharer * GnmExprSharer *
workbook_share_expressions (Workbook *wb, gboolean freeit) workbook_share_expressions (Workbook *wb, gboolean freeit)
{ {
GnmExprSharer *es = gnm_expr_sharer_new (); GnmExprSharer *es = gnm_expr_sharer_new ();
skipping to change at line 832 skipping to change at line 833
g_ptr_array_remove (wbv->wb->wb_views, wbv); g_ptr_array_remove (wbv->wb->wb_views, wbv);
if (wbv->wb->wb_views->len == 0) { if (wbv->wb->wb_views->len == 0) {
g_ptr_array_free (wbv->wb->wb_views, TRUE); g_ptr_array_free (wbv->wb->wb_views, TRUE);
wbv->wb->wb_views = NULL; wbv->wb->wb_views = NULL;
} }
} }
/*****************************************************************************/ /*****************************************************************************/
/** /**
* workbook_sheets: * workbook_sheets: (skip)
* @wb: #Workbook * @wb: #Workbook
* *
* Get an ordered list of the sheets in the workbook * Get an ordered list of the sheets in the workbook
* *
* Returns: (element-type Sheet) (transfer container): the sheets list. * Returns: (element-type Sheet) (transfer container): the sheets list.
*/ */
GPtrArray * GPtrArray *
workbook_sheets (Workbook const *wb) workbook_sheets (Workbook const *wb)
{ {
g_return_val_if_fail (GNM_IS_WORKBOOK (wb), NULL); g_return_val_if_fail (GNM_IS_WORKBOOK (wb), NULL);
return g_ptr_array_ref (wb->sheets); return g_ptr_array_ref (wb->sheets);
} }
// Alternate version for the sake of introspection which is unhappy with
// the GPtrArray api.
/**
* gnm_workbook_sheets0: (rename-to workbook_sheets)
* @wb: #Workbook
*
* Get an ordered list of the sheets in the workbook
*
* Returns: (element-type Sheet) (transfer full): the sheets list.
*/
GSList *
gnm_workbook_sheets0 (Workbook const *wb)
{
GSList *res = NULL;
unsigned ui;
g_return_val_if_fail (GNM_IS_WORKBOOK (wb), NULL);
for (ui = wb->sheets->len; ui--; ) {
Sheet *sheet = g_ptr_array_index (wb->sheets, ui);
res = g_slist_prepend (res, g_object_ref (sheet));
}
return g_slist_reverse (res);
}
int int
workbook_sheet_count (Workbook const *wb) workbook_sheet_count (Workbook const *wb)
{ {
g_return_val_if_fail (GNM_IS_WORKBOOK (wb), 0); g_return_val_if_fail (GNM_IS_WORKBOOK (wb), 0);
return wb->sheets ? wb->sheets->len : 0; return wb->sheets ? wb->sheets->len : 0;
} }
static void static void
pre_sheet_index_change (Workbook *wb) pre_sheet_index_change (Workbook *wb)
 End of changes. 3 change blocks. 
6 lines changed or deleted 34 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)