Commit 5500f712 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

add some safety checking (ms_obj_read_pre_biff8_obj) : merge up the


2004-09-24  Jody Goldberg <jody@gnome.org>

	* ms-obj.c (ms_obj_attr_new_flag) : add some safety checking
	(ms_obj_read_pre_biff8_obj) : merge up the handling of similar
	  structures to get more consistent import.

	* ms-excel-write.c (excel_write_objs) : now that text boxes and
	  rectangles are the same we need to do more work to figure out which
	  are which.  Make a list and use that in place of repeated lookups.
	(excel_sheet_new) : make the list here.
	(excel_write_state_new) : use the list.
	(excel_sheet_free) : new.
	(excel_write_state_free) : use excel_sheet_free.

	* ms-excel-read.c (ms_sheet_map_color) : rework to use GOColor
	(ms_sheet_realize_obj) : simplify greatly by using GObject properties
	  with common names in the sheet objects and merging the handling of
	  related types (text==rectangle ...)
	(ms_sheet_create_obj) : Use the new object types in a step towards
	  removing this function.

	* ms-escher.c (ms_escher_read_OPT_bools) : new.
	(ms_escher_read_OPT) : read the boolean blocks as a group to avoid
	  kludging around the infrastructure for 1:1 properties.
	 While in here make the debug spew for complex options more useful
	 Store PTR properties


2004-09-26  Jody Goldberg <jody@gnome.org>

	* src/gnumeric-pane.c (gnm_pane_object_move) :  handle symetric
	  movement via ctrl-click and object duplicate via ctrl-click on
	  acetate

	* src/gnumeric-pane.c (build_so_menu) : new
	(display_object_menu) : create a GtkMenu based on the actions.

	* src/sheet-object.c (sheet_object_populate_menu) : Rework the
	  interface to return action descririptors rather than a GtkMenu
	  Change all implementations

2004-09-26  Jody Goldberg <jody@gnome.org>

	* src/xml-io.c (xml_cellregion_read) : read objects
	(xml_cellregion_write) : write them too

2004-09-25  Jody Goldberg <jody@gnome.org>

	* src/wbcg-actions.c (cb_edit_copy) : Use
	  gnm_app_clipboard_cut_copy_obj for objects
	(cb_edit_cut) : ditto.

	* src/sheet-object.c (sheet_object_populate_menu) : put the stacking
	  items into a sub menu.

2004-09-24  Jody Goldberg <jody@gnome.org>

	* src/clipboard.c (paste_object) : new.
	(clipboard_paste_region) : use it.
	(cb_dup_objects) : new.
	(clipboard_copy_range) : dup the objects in the range.
	(cellregion_new) : init the object list
	(cellregion_unref) : free the object list

	* src/sheet-object.c (sheet_object_dup) : make public, and tweak
	  interface.
	(sheet_object_clone_sheet) : adjust to the interface change.

2004-09-24  Jody Goldberg <jody@gnome.org>

	* src/sheet-object-image.c (sheet_object_image_copy) : implement

	* src/wbcg-actions.c : update the actions to handle the new drawing
	  object types.

	* src/sheet-object.c (sheet_object_clone) : Change the interface to
	  have the wrapper create the object.  Then s/clone/copy/ and have it
	  just do the assignament rather, not allocation.
	* src/sheet-object*.c : s/clone/copy/ with related semantic changes

	* src/rendered-value.c (rendered_value_render) : trivial
	  constification

	* src/main-application.c (main) : Use bonobo_main WITH_GNOME just in
	  case.

	* src/gnumeric-pane.c (gnm_pane_object_register) : Change return type
	  to GObject.  There's no need to be more specific.
	(gnm_pane_widget_register) : ditto.

	* src/gnm-so-filled.c : Rewrite of the old SheetObjectGraphic
	  to use GogStyle, merge text into the base, and use GObject properties
	* src/gnm-so-line.c : Rewrite of the old SheetObjectFilled
	  to use GogStyle  and use GObject properties

	* src/Makefile.am : Adjust to the file changes for
	  sheet-object-graphic.c

2004-09-13  Stepan Kasal  <kasal@ucw.cz>

	* configure.in (GCONF_SCHEMAS_INSTALL): AM_CONDITIONAL has to be
	  called in all branches.

2004-09-24  Jody Goldberg <jody@gnome.org>

	* src/xml-io.c (xml_read_sheet_object) : add hooks to the old names
	  for GnmSOFilled, and GnmSOLine

2004-09-23  Jody Goldberg <jody@gnome.org>

	* src/commands.c (cmd_object_format) : undo redo for the new line and
	  filled objects.

2004-09-23  Jody Goldberg <jody@gnome.org>

	* configure.in (GNUMERIC_PLUGIN_LDFLAGS) : new macro to give the win32
	  folk a hook for the plugins.
	* plugins/*/Makefile.am : Use it
	* plugins/*/plugin.xml.in : Remove the .la for module names.  Core of
	  glib adds just before checking platform specific names.

2004-09-23  Jody Goldberg <jody@gnome.org>

	* src/wbcg-actions.c (cb_view_zoom_out) : in and out were reversed
	(cb_view_zoom_in) : ditto
parent 9c8cccc8
2004-09-24 Jody Goldberg <jody@gnome.org>
* ms-obj.c (ms_obj_attr_new_flag) : add some safety checking
(ms_obj_read_pre_biff8_obj) : merge up the handling of similar
structures to get more consistent import.
* ms-excel-write.c (excel_write_objs) : now that text boxes and
rectangles are the same we need to do more work to figure out which
are which. Make a list and use that in place of repeated lookups.
(excel_sheet_new) : make the list here.
(excel_write_state_new) : use the list.
(excel_sheet_free) : new.
(excel_write_state_free) : use excel_sheet_free.
* ms-excel-read.c (ms_sheet_map_color) : rework to use GOColor
(ms_sheet_realize_obj) : simplify greatly by using GObject properties
with common names in the sheet objects and merging the handling of
related types (text==rectangle ...)
(ms_sheet_create_obj) : Use the new object types in a step towards
removing this function.
* ms-escher.c (ms_escher_read_OPT_bools) : new.
(ms_escher_read_OPT) : read the boolean blocks as a group to avoid
kludging around the infrastructure for 1:1 properties.
While in here make the debug spew for complex options more useful
Store PTR properties
2004-09-17 Jody Goldberg <jody@gnome.org>
* ms-excel-read.c (ms_sheet_realize_obj) : default to outline with == 1
2004-09-22 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=153260
......
This diff is collapsed.
......@@ -58,10 +58,12 @@
#include <command-context.h>
#include <sheet-object-cell-comment.h>
#include <sheet-object-widget.h>
#include <sheet-object-graphic.h>
#include <gnm-so-line.h>
#include <gnm-so-filled.h>
#include <sheet-object-graph.h>
#include <sheet-object-image.h>
#include <goffice/utils/go-units.h>
#include <goffice/graph/gog-style.h>
#include <gsf/gsf-input.h>
#include <gsf/gsf-utils.h>
......@@ -217,24 +219,30 @@ ms_sheet_get_fmt (MSContainer const *container, unsigned indx)
return excel_wb_get_fmt (container->ewb, indx);
}
static GnmColor *
ms_sheet_map_color (ExcelReadSheet const *esheet, MSObj const *obj, MSObjAttrID id)
static GOColor
ms_sheet_map_color (ExcelReadSheet const *esheet, MSObj const *obj, MSObjAttrID id, GOColor default_val)
{
gushort r, g, b;
MSObjAttr *attr = ms_obj_attr_bag_lookup (obj->attrs, id);
if (attr == NULL)
return NULL;
return default_val;
if ((~0x7ffffff) & attr->v.v_uint)
return excel_palette_get (esheet->container.ewb->palette,
if ((~0x7ffffff) & attr->v.v_uint) {
GnmColor *c = excel_palette_get (esheet->container.ewb->palette,
(0x7ffffff & attr->v.v_uint));
r = (attr->v.v_uint) & 0xff;
g = (attr->v.v_uint >> 8) & 0xff;
b = (attr->v.v_uint >> 16) & 0xff;
r = c->color.red >> 8;
g = c->color.green >> 8;
b = c->color.blue >> 8;
style_color_unref (c);
} else {
r = (attr->v.v_uint) & 0xff;
g = (attr->v.v_uint >> 8) & 0xff;
b = (attr->v.v_uint >> 16) & 0xff;
}
return style_color_new_i8 (r, g, b);
return RGBA_TO_UINT (r,g,b,0xff);
}
static SheetObject *
......@@ -364,6 +372,7 @@ ms_sheet_realize_obj (MSContainer *container, MSObj *obj)
SheetObjectDirection direction;
SheetObjectAnchor anchor;
SheetObject *so;
GogStyle *style;
if (obj == NULL)
return TRUE;
......@@ -395,87 +404,64 @@ ms_sheet_realize_obj (MSContainer *container, MSObj *obj)
sheet_object_anchor_set (so, &anchor);
sheet_object_set_sheet (so, esheet->sheet);
/* handle common attributes */
/* THIS IS DAMN UGLY we should be using gobject properties with common names or something */
label = ms_obj_attr_get_ptr (obj->attrs, MS_OBJ_ATTR_TEXT, NULL);
if (label != NULL) {
switch (obj->excel_type) {
#if 0
#warning boxs and circles can have text ?? (map box to label, what to do with circle)
unhandled text for type 0x2
#endif
if (label != NULL)
g_object_set (G_OBJECT (so), "text", label, NULL);
case 0x0E: /* label or text box */
case 0x06: gnm_so_text_set_text (so, label);
break;
case 0x07: sheet_widget_button_set_label (so, label);
break;
case 0x0B: sheet_widget_checkbox_set_label (so, label);
break;
case 0x0C: sheet_widget_radio_button_set_label (so, label);
break;
case 0x19: cell_comment_text_set (CELL_COMMENT (so), label);
break;
default:
g_warning ("unhandled text for type 0x%x", obj->excel_type);
break;
}
}
markup = ms_obj_attr_get_markup (obj->attrs, MS_OBJ_ATTR_MARKUP, NULL);
if (markup != NULL) {
switch (obj->excel_type) {
if (markup != NULL)
g_object_set (so, "markup", markup, NULL);
#if 0
unhandled markup for type 0x2
unhandled markup for type 0x7
unhandled markup for type 0xb
unhandled markup for type 0xc
#endif
case 0x06: /* TextBox */
case 0x0E: /* Label */
case 0x19: /* Comment */
g_object_set (so, "markup", markup, NULL);
break;
default:
g_warning ("unhandled markup for type 0x%x", obj->excel_type);
break;
}
}
switch (obj->excel_type) {
case 0x00:
break;
case 0x01: { /* Line */
GnmColor *color = ms_sheet_map_color (esheet, obj,
MS_OBJ_ATTR_FILL_COLOR);
if (color != NULL)
gnm_so_graphic_set_fill_color (so, color);
break;
}
case 0x05: /* Chart */
/* NOTE : We should not need to do anything for charts */
case 0x01: /* Line */
case 0x04: /* Arc */
style = gog_style_new ();
style->line.color = ms_sheet_map_color (esheet, obj,
MS_OBJ_ATTR_OUTLINE_COLOR, RGBA_BLACK);
style->line.width = ms_obj_attr_get_uint (obj->attrs,
MS_OBJ_ATTR_OUTLINE_WIDTH, 0) / 256.;
style->line.pattern = ms_obj_attr_bag_lookup (obj->attrs, MS_OBJ_ATTR_OUTLINE_HIDE)
? 0 : ms_obj_attr_get_int (obj->attrs, MS_OBJ_ATTR_OUTLINE_STYLE, 1);
g_object_set (G_OBJECT (so), "style", style, NULL);
g_object_unref (style);
break;
case 0x09:
g_object_set (G_OBJECT (so), "points",
ms_obj_attr_get_array (obj->attrs, MS_OBJ_ATTR_POLYGON_COORDS, NULL),
NULL);
/* fallthrough */
case 0x02: /* rectangle */
case 0x03: /* oval */
case 0x06: /* TextBox */
case 0x0E: /* Label */
if (ms_obj_attr_bag_lookup (obj->attrs, MS_OBJ_ATTR_UNFILLED))
gnm_so_graphic_set_fill_color (so, NULL);
else
gnm_so_graphic_set_fill_color (so,
ms_sheet_map_color (esheet, obj, MS_OBJ_ATTR_FILL_COLOR));
gnm_so_filled_set_outline_style (so,
ms_obj_attr_get_int (obj->attrs, MS_OBJ_ATTR_OUTLINE_STYLE, 1));
gnm_so_filled_set_outline_color (so,
ms_sheet_map_color (esheet, obj, MS_OBJ_ATTR_OUTLINE_COLOR));
gnm_so_graphic_set_width (so,
ms_obj_attr_get_int (obj->attrs, MS_OBJ_ATTR_OUTLINE_WIDTH, 0));
style = gog_style_new ();
style->outline.color = ms_sheet_map_color (esheet, obj,
MS_OBJ_ATTR_OUTLINE_COLOR, RGBA_BLACK);
style->outline.width = ms_obj_attr_get_uint (obj->attrs,
MS_OBJ_ATTR_OUTLINE_WIDTH, 0) / 256.;
style->outline.pattern = ms_obj_attr_bag_lookup (obj->attrs, MS_OBJ_ATTR_OUTLINE_HIDE)
? 0 : ms_obj_attr_get_int (obj->attrs, MS_OBJ_ATTR_OUTLINE_STYLE, 1);
style->fill.pattern.back = ms_sheet_map_color (esheet, obj,
MS_OBJ_ATTR_FILL_COLOR, RGBA_WHITE);
style->fill.pattern.fore = ms_sheet_map_color (esheet, obj,
MS_OBJ_ATTR_FILL_BACKGROUND, RGBA_BLACK);
style->fill.type = ms_obj_attr_bag_lookup (obj->attrs, MS_OBJ_ATTR_UNFILLED)
? GOG_FILL_STYLE_NONE : GOG_FILL_STYLE_PATTERN;
g_object_set (G_OBJECT (so), "style", style, NULL);
g_object_unref (style);
break;
/* Button */
case 0x07:
case 0x05: /* Chart */
/* NOTE : We should not need to do anything for charts */
break;
case 0x07: /* Button */
break;
case 0x08: { /* Picture */
......@@ -493,17 +479,9 @@ unhandled markup for type 0xc
/* replace blips we don't know how to handle with rectangles */
if (so == NULL)
so = sheet_object_box_new (FALSE); /* placeholder */
so = g_object_new (GNM_SO_FILLED_TYPE, NULL); /* placeholder */
break;
}
case 0x09:
gnm_so_polygon_set_points (SHEET_OBJECT (so),
ms_obj_attr_get_array (obj->attrs, MS_OBJ_ATTR_POLYGON_COORDS, NULL));
gnm_so_polygon_set_fill_color (so,
ms_sheet_map_color (esheet, obj, MS_OBJ_ATTR_FILL_COLOR));
gnm_so_polygon_set_outline_color (so,
ms_sheet_map_color (esheet, obj, MS_OBJ_ATTR_OUTLINE_COLOR));
break;
case 0x0B:
sheet_widget_checkbox_set_link (obj->gnum_obj,
......@@ -553,7 +531,6 @@ ms_sheet_create_obj (MSContainer *container, MSObj *obj)
SheetObject *so = NULL;
Workbook *wb;
ExcelReadSheet *esheet;
MSObjAttr *attr;
if (obj == NULL)
return NULL;
......@@ -565,34 +542,27 @@ ms_sheet_create_obj (MSContainer *container, MSObj *obj)
switch (obj->excel_type) {
case 0x01: /* Line */
attr = ms_obj_attr_bag_lookup (obj->attrs,
MS_OBJ_ATTR_ARROW_END);
so = sheet_object_line_new (attr != NULL);
case 0x04: /* Arc */
so = g_object_new (GNM_SO_LINE_TYPE,
"is-arrow", 0 != ms_obj_attr_get_int (obj->attrs, MS_OBJ_ATTR_ARROW_END, 0),
NULL);
break;
case 0x02:
attr = ms_obj_attr_get_ptr (obj->attrs, MS_OBJ_ATTR_TEXT, NULL);
if (attr != NULL) {
obj->excel_type = 0xE;
so = g_object_new (sheet_object_text_get_type (), NULL);
break;
}
/* fall through */
case 0x00: /* draw the group border */
case 0x03: /* Box or Oval */
so = sheet_object_box_new (obj->excel_type == 3);
case 0x02: /* Box */
case 0x03: /* Oval */
case 0x06: /* TextBox */
case 0x0E: /* Label */
so = g_object_new (GNM_SO_FILLED_TYPE,
"text", ms_obj_attr_get_ptr (obj->attrs, MS_OBJ_ATTR_TEXT, NULL),
"is-oval", obj->excel_type == 3,
NULL);
break;
case 0x05: /* Chart */
so = sheet_object_graph_new (NULL);
break;
case 0x0E: /* Label */
case 0x06: /* TextBox */
so = g_object_new (sheet_object_text_get_type (), NULL);
break;
/* Button */
case 0x07: so = g_object_new (sheet_widget_button_get_type (), NULL);
break;
......@@ -611,10 +581,10 @@ ms_sheet_create_obj (MSContainer *container, MSObj *obj)
/* replace blips we don't know how to handle with rectangles */
if (so == NULL)
so = sheet_object_box_new (FALSE); /* placeholder */
so = g_object_new (GNM_SO_FILLED_TYPE, NULL); /* placeholder */
break;
}
case 0x09: so = g_object_new (sheet_object_polygon_get_type (), NULL);
case 0x09: so = g_object_new (GNM_SO_POLYGON_TYPE, NULL);
break;
case 0x0B: so = g_object_new (sheet_widget_checkbox_get_type (), NULL);
break;
......@@ -5914,6 +5884,7 @@ excel_read_workbook (IOContext *context, WorkbookView *wb_view,
excel_unexpected_biff (q, "Workbook", ms_excel_read_debug);
break;
}
/* check here in case any of the handlers read additional records */
prev_was_eof = (q->opcode == BIFF_EOF);
}
ms_biff_query_destroy (q);
......
......@@ -39,8 +39,8 @@
#include <sheet-object.h>
#include <sheet-object-cell-comment.h>
#include <sheet-object-graph.h>
#include <sheet-object-graphic.h>
#include <sheet-object-image.h>
#include <gnm-so-filled.h>
#include <application.h>
#include <style.h>
#include <validation.h>
......@@ -334,7 +334,6 @@ points_to_inches (double pts)
return pts / 72.0;
}
void
excel_write_SETUP (BiffPut *bp, ExcelWriteSheet *esheet)
{
......@@ -2330,10 +2329,7 @@ excel_write_XFs (ExcelWriteState *ewb)
GnmStyle *st;
/* it is more compact to just spew the default representations than
* to store a readable form, and generate the constant data.
* At some point it would be good to generate the default style in
* entry 0 but not crucial given that col default xf handles most of it
*/
* to store a readable form, and generate the constant data. */
static guint8 const builtin_xf_biff8 [XF_RESERVED][20] = {
{ 0, 0, 0, 0, 0xf5, 0xff, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc0, 0x20 },
{ 1, 0, 0, 0, 0xf5, 0xff, 0x20, 0, 0, 0xf4, 0, 0, 0, 0, 0, 0, 0, 0, 0xc0, 0x20 },
......@@ -3987,8 +3983,6 @@ excel_write_objs (ExcelWriteSheet *esheet)
BiffPut *bp = esheet->ewb->bp;
GSList *ptr, *charts = sheet_objects_get (esheet->gnum_sheet,
NULL, SHEET_OBJECT_GRAPH_TYPE);
GSList *texts = sheet_objects_get (esheet->gnum_sheet,
NULL, SHEET_OBJECT_TEXT_TYPE);
int len;
if (esheet->num_objs == 0)
......@@ -4008,7 +4002,7 @@ excel_write_objs (ExcelWriteSheet *esheet)
guint8 buf [sizeof header_obj_v8];
unsigned last_id, num_filters = 0;
unsigned num_charts = g_slist_length (charts);
unsigned num_texts = g_slist_length (texts);
unsigned num_texts = g_slist_length (esheet->textboxes);
if (esheet->gnum_sheet->filters != NULL) {
GnmFilter const *f = esheet->gnum_sheet->filters->data;
......@@ -4042,9 +4036,8 @@ excel_write_objs (ExcelWriteSheet *esheet)
if (ptr->data)
excel_write_image (esheet, ptr->data);
for (ptr = texts; ptr != NULL ; ptr = ptr->next)
for (ptr = esheet->textboxes; ptr != NULL ; ptr = ptr->next)
excel_write_textbox (esheet, ptr->data);
g_slist_free (texts);
excel_write_autofilter_objs (esheet);
}
......@@ -4230,8 +4223,11 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
esheet->blips = g_slist_reverse (esheet->blips);
g_slist_free (objs);
esheet->num_objs += esheet->num_blips;
/* Text boxes */
objs = sheet_objects_get (sheet, NULL, SHEET_OBJECT_TEXT_TYPE);
esheet->textboxes = sheet_objects_get (sheet, NULL, GNM_SO_FILLED_TYPE);
#warning TODO TODO FIXME FIXME FIXME : filter for boxes with text
esheet->num_objs += g_slist_length (objs);
g_slist_free (objs);
......@@ -4244,6 +4240,14 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
return esheet;
}
static void
excel_sheet_free (ExcelWriteSheet *esheet)
{
g_slist_free (esheet->textboxes);
g_slist_free_custom (esheet->blips, (GFreeFunc) blipinf_free);
g_free (esheet);
}
/**
* pre_pass
* @context: Command context.
......@@ -5089,11 +5093,8 @@ excel_write_state_new (IOContext *context, WorkbookView const *gwb_view,
extract_gog_object_style (ewb,
(GogObject *)sheet_object_graph_get_gog (ptr->data));
g_slist_free (objs);
objs = sheet_objects_get (sheet,
NULL, SHEET_OBJECT_TEXT_TYPE);
for (ptr = objs ; ptr != NULL ; ptr = ptr->next)
for (ptr = esheet->textboxes ; ptr != NULL ; ptr = ptr->next)
extract_txomarkup (ewb, ptr->data);
g_slist_free (objs);
}
if (biff8) {
......@@ -5121,11 +5122,8 @@ excel_write_state_free (ExcelWriteState *ewb)
palette_free (ewb);
xf_free (ewb);
for (i = 0; i < ewb->sheets->len; i++) {
ExcelWriteSheet *esheet = g_ptr_array_index (ewb->sheets, i);
g_slist_free_custom (esheet->blips, (GFreeFunc) blipinf_free);
g_free (esheet);
}
for (i = 0; i < ewb->sheets->len; i++)
excel_sheet_free (g_ptr_array_index (ewb->sheets, i));
g_ptr_array_free (ewb->sheets, TRUE);
g_hash_table_destroy (ewb->names);
......
......@@ -45,7 +45,7 @@ typedef struct {
guint16 col_xf [SHEET_MAX_COLS];
GnmStyle *col_style [SHEET_MAX_COLS];
GnmStyleList *validations;
GSList *blips;
GSList *blips, *textboxes;
unsigned cur_obj, num_objs, num_blips;
} ExcelWriteSheet;
......
......@@ -35,7 +35,6 @@
#include <expr.h>
#include <parse-util.h>
#include <sheet-object-widget.h>
#include <sheet-object-graphic.h>
#include <gsf/gsf-utils.h>
#include <stdio.h>
......@@ -65,6 +64,8 @@ ms_obj_attr_new_flag (MSObjAttrID id)
{
MSObjAttr *res = g_new (MSObjAttr, 1);
g_return_val_if_fail ((id & MS_OBJ_ATTR_MASK) == 0, NULL);
/* be anal about constness */
*((MSObjAttrID *)&(res->id)) = id;
res->v.v_ptr = NULL;
......@@ -528,46 +529,45 @@ ms_obj_read_pre_biff8_obj (BiffQuery *q, MSContainer *c, MSObj *obj)
case 0: /* group */
break;
case 1: /* line */
tmp = GSF_LE_GET_GUINT8 (q->data+40);
if (GSF_LE_GET_GUINT8 (q->data+38) & 0x0F)
g_return_val_if_fail (q->data + 41 <= last, TRUE);
tmp = GSF_LE_GET_GUINT8 (q->data+38) & 0x0F;
if (tmp > 0)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_flag (MS_OBJ_ATTR_ARROW_END));
ms_obj_attr_new_uint (MS_OBJ_ATTR_ARROW_END, tmp));
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_FILL_COLOR,
ms_obj_attr_new_uint (MS_OBJ_ATTR_OUTLINE_COLOR,
0x80000000 | GSF_LE_GET_GUINT8 (q->data+34)));
tmp = GSF_LE_GET_GUINT8 (q->data+35);
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_OUTLINE_STYLE,
((tmp == 0xff) ? 0 : tmp+1)));
tmp = GSF_LE_GET_GUINT8 (q->data+40);
if (tmp == 1 || tmp == 2)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_flag (MS_OBJ_ATTR_FLIP_H));
if (tmp >= 2)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_flag (MS_OBJ_ATTR_FLIP_V));
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 42);
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name,
(obj->excel_type == 1) ? 42 : 44);
break;
case 2: /* rectangle */
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 44);
break;
case 3: /* oval */
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 44);
break;
case 4: /* arc */
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 44);
break;
case 5: /* chart */
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 62);
break;
case 6: /* textbox */
/* 70 name len, name, fmla (respect cbMacro) */
g_return_val_if_fail (q->data + 52 <= last, TRUE);
if (GSF_LE_GET_GUINT8 (q->data+36) > 0)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_FILL_COLOR,
0x80000000 | GSF_LE_GET_GUINT8 (q->data+35)));
else
g_return_val_if_fail (q->data + 36 <= last, TRUE);
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_FILL_BACKGROUND,
0x80000000 | GSF_LE_GET_GUINT8 (q->data+34)));
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_FILL_COLOR,
0x80000000 | GSF_LE_GET_GUINT8 (q->data+35)));
if (GSF_LE_GET_GUINT8 (q->data+36) == 0)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_flag (MS_OBJ_ATTR_UNFILLED));
tmp = GSF_LE_GET_GUINT8 (q->data+39);
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_OUTLINE_STYLE,
......@@ -577,22 +577,30 @@ ms_obj_read_pre_biff8_obj (BiffQuery *q, MSContainer *c, MSObj *obj)
0x80000000 | GSF_LE_GET_GUINT8 (q->data+38)));
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_uint (MS_OBJ_ATTR_OUTLINE_WIDTH,
GSF_LE_GET_GUINT8 (q->data+40)));
len = GSF_LE_GET_GUINT16 (q->data + 44);
txo_len = GSF_LE_GET_GUINT16 (q->data + 48);
if_empty = GSF_LE_GET_GUINT16 (q->data + 50);
GSF_LE_GET_GUINT8 (q->data+40) * 256));
if (obj->excel_type == 6) {
g_return_val_if_fail (q->data + 52 <= last, TRUE);
len = GSF_LE_GET_GUINT16 (q->data + 44);
txo_len = GSF_LE_GET_GUINT16 (q->data + 48);
if_empty = GSF_LE_GET_GUINT16 (q->data + 50);
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 70);
if (data == NULL ||
read_pre_biff8_read_str (q, c, obj,
MS_OBJ_ATTR_TEXT, &data, len, txo_len))
return TRUE;
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 70);
if (data == NULL ||
read_pre_biff8_read_str (q, c, obj,
MS_OBJ_ATTR_TEXT, &data, len, txo_len))
return TRUE;
if (txo_len == 0)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_markup (MS_OBJ_ATTR_MARKUP,
ms_container_get_markup (c, if_empty)));
} else
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 44);
break;
if (txo_len == 0)
ms_obj_attr_bag_insert (obj->attrs,
ms_obj_attr_new_markup (MS_OBJ_ATTR_MARKUP,
ms_container_get_markup (c, if_empty)));
case 5: /* chart */
data = read_pre_biff8_read_name_and_fmla (q, c, obj, has_name, 62);
break;
case 7: /* button */
......
......@@ -22,10 +22,7 @@ typedef enum {
MS_OBJ_ATTR_FLIP_H,
MS_OBJ_ATTR_FLIP_V,
MS_OBJ_ATTR_UNFILLED,
/* will be enums when we support multiple arrow shapes */
MS_OBJ_ATTR_ARROW_START,
MS_OBJ_ATTR_ARROW_END,
MS_OBJ_ATTR_OUTLINE_HIDE, /* true of style == 0 hides a line */
/* Integers & Enums */
MS_OBJ_ATTR_IS_INT_MASK = 0x1000,
......@@ -51,6 +48,8 @@ typedef enum {
MS_OBJ_ATTR_BLIP_CROP_BOTTOM,
MS_OBJ_ATTR_BLIP_CROP_LEFT,
MS_OBJ_ATTR_BLIP_CROP_RIGHT,
MS_OBJ_ATTR_ARROW_START,
MS_OBJ_ATTR_ARROW_END,
/* Ptrs */
MS_OBJ_ATTR_IS_PTR_MASK = 0x2000,
......
2004-09-24 Jody Goldberg <jody@gnome.org>
* POTFILES.in : Adjust to the file changes and sort the file names
2004-09-26 David Lodge <dave@cirt.net>
* ang.po: Added Olde Englisc translation for James Johnson.
* ang.po: Added Olde Englisc translation for James Johnson.
2004-09-26 David Lodge <dave@cirt.net>
* en_GB.po: Updated British translation.
* en_GB.po: Updated British translation.
2004-09-26 Jan Morn <jan.moren@lucs.lu.se>
* sv.po: Updated Swedish translation.
......
......@@ -102,55 +102,54 @@ plugins/xml_sax/xml-sax-read.c
schemas/gnumeric-dialogs.schemas.in
schemas/gnumeric-general.schemas.in
schemas/gnumeric-plugins.schemas.in
src/GNOME_Gnumeric-gtk.xml
src/bonobo-io.c
src/cell.c
src/clipboard.c
src/cmd-edit.c
src/command-context-stderr.c
src/command-context.c
src/command-context-stderr.c
src/commands.c
src/consolidate.c
src/cut-n-paste-code/goffice/graph/go-data.c
src/cut-n-paste-code/goffice/graph/gog-axis-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-axis.c
src/cut-n-paste-code/goffice/graph/gog-axis-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-chart.c
src/cut-n-paste-code/goffice/graph/gog-control-foocanvas.c
src/cut-n-paste-code/goffice/graph/gog-data-allocator.c
src/cut-n-paste-code/goffice/graph/gog-error-bar-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-error-bar.c
src/cut-n-paste-code/goffice/graph/gog-error-bar-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-graph.c
src/cut-n-paste-code/goffice/graph/gog-guru.c
src/cut-n-paste-code/goffice/graph/gog-guru.glade
src/cut-n-paste-code/goffice/graph/gog-label.c
src/cut-n-paste-code/goffice/graph/gog-legend.c
src/cut-n-paste-code/goffice/graph/gog-object.c
src/cut-n-paste-code/goffice/graph/gog-plot-engine.c
src/cut-n-paste-code/goffice/graph/gog-plot.c
src/cut-n-paste-code/goffice/graph/gog-renderer-pixbuf.c
src/cut-n-paste-code/goffice/graph/gog-plot-engine.c
src/cut-n-paste-code/goffice/graph/gog-renderer.c
src/cut-n-paste-code/goffice/graph/gog-renderer-pixbuf.c
src/cut-n-paste-code/goffice/graph/gog-series.c
src/cut-n-paste-code/goffice/graph/gog-style-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-style.c
src/cut-n-paste-code/goffice/graph/gog-styled-object.c
src/cut-n-paste-code/goffice/graph/gog-style-prefs.glade
src/cut-n-paste-code/goffice/graph/gog-theme.c
src/cut-n-paste-code/goffice/graph/gog-view.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-1.5d.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-barcol.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-barcol-prefs.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-barcol-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-barcol.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-line.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/plugin.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie.c
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie-prefs.c
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie-series.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie.c
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-ring-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/plugin.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_radar/gog-radar-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_radar/gog-radar.c
src/cut-n-paste-code/goffice/graph/plugins/plot_radar/gog-radar-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_radar/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_radar/plugin.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_xy/gog-bubble-prefs.glade
......@@ -158,8 +157,8 @@ src/cut-n-paste-code/goffice/graph/plugins/plot_xy/gog-xy.c
src/cut-n-paste-code/goffice/graph/plugins/plot_xy/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_xy/plugin.xml.in
src/cut-n-paste-code/goffice/gui-utils/go-color-palette.c
src/cut-n-paste-code/goffice/gui-utils/go-dock-item-grip.c
src/cut-n-paste-code/goffice/gui-utils/go-dock-item.c
src/cut-n-paste-code/goffice/gui-utils/go-dock-item-grip.c
src/cut-n-paste-code/goffice/utils/go-marker.c
src/cut-n-paste-code/goffice/utils/go-pattern.c
src/dates.c
......@@ -175,13 +174,13 @@ src/dialogs/autosave.glade
src/dialogs/cell-comment.glade
src/dialogs/cell-format.glade
src/dialogs/cell-sort.glade
src/dialogs/col-width.glade
src/dialogs/colrow.glade
src/dialogs/col-width.glade
src/dialogs/consolidate.glade
src/dialogs/correlation.glade
src/dialogs/covariance.glade
src/dialogs/dao-gui-utils.c
src/dialogs/dao.glade
src/dialogs/dao-gui-utils.c
src/dialogs/delete-cells.glade
src/dialogs/descriptive-stats.glade
src/dialogs/dialog-about.c
......@@ -197,6 +196,7 @@ src/dialogs/dialog-cell-sort.c
src/dialogs/dialog-col-width.c
src/dialogs/dialog-consolidate.c
src/dialogs/dialog-define-names.c
src/dialogs/dialog-so-styled.c
src/dialogs/dialog-delete-cells.c
src/dialogs/dialog-fill-series.c
src/dialogs/dialog-formula-guru.c
......@@ -215,22 +215,22 @@ src/dialogs/dialog-printer-setup