Commit d930d032 authored by Jon Kåre Hellan's avatar Jon Kåre Hellan

Unref pixbuf returned by excel_read_IMDATA.

* ms-obj.c (ms_obj_read_pre_biff8_obj): Unref pixbuf returned by
excel_read_IMDATA.

* ms-excel-read.c (excel_read_os2bmp): New. Handle headerless OS/2
bitmap.
(excel_read_IMDATA): Call excel_read_os2bmp to handle OS/2
BMP. Other format may be dumped to file.
(excel_read_sheet): Unref pixbuf returned by excel_read_IMDATA.
parent 13eb8637
2004-10-18 Jon K Hellan <hellan@acm.org>
* ms-obj.c (ms_obj_read_pre_biff8_obj): Unref pixbuf returned by
excel_read_IMDATA.
* ms-excel-read.c (excel_read_os2bmp): New. Handle headerless OS/2
bitmap.
(excel_read_IMDATA): Call excel_read_os2bmp to handle OS/2
BMP. Other format may be dumped to file.
(excel_read_sheet): Unref pixbuf returned by excel_read_IMDATA.
2004-10-15 Morten Welinder <terra@gnome.org>
......
......@@ -5375,7 +5375,12 @@ excel_read_sheet (BiffQuery *q, ExcelWorkbook *ewb,
biff_get_rk (q->data + 6));
break;
case BIFF_IMDATA: excel_read_IMDATA (q, FALSE); break;
case BIFF_IMDATA: {
GdkPixbuf *pixbuf = excel_read_IMDATA (q, FALSE);
if (pixbuf)
g_object_unref (pixbuf);
}
break;
case BIFF_GUTS: excel_read_GUTS (q, esheet); break;
case BIFF_WSBOOL: excel_read_WSBOOL (q, esheet); break;
case BIFF_GRIDSET: break;
......
......@@ -727,8 +727,12 @@ ms_obj_read_pre_biff8_obj (BiffQuery *q, MSContainer *c, MSObj *obj)
if (obj->excel_type == 8) { /* picture */
guint16 op;
if (ms_biff_query_peek_next (q, &op) && op == BIFF_IMDATA) {
GdkPixbuf *pixbuf;
ms_biff_query_next (q);
excel_read_IMDATA (q, FALSE);
pixbuf = excel_read_IMDATA (q, FALSE);
if (pixbuf)
g_object_unref (pixbuf);
}
}
return FALSE;
......@@ -1046,9 +1050,13 @@ ms_obj_read_biff8_obj (BiffQuery *q, MSContainer *container, MSObj *obj)
guint16 op;
if (ms_biff_query_peek_next (q, &op) && op == BIFF_IMDATA) {
GdkPixbuf *pixbuf;
printf ("Reading trailing IMDATA;\n");
ms_biff_query_next (q);
excel_read_IMDATA (q, FALSE);
pixbuf = excel_read_IMDATA (q, FALSE);
if (pixbuf)
g_object_unref (pixbuf);
}
}
......
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