Commit 10e9a53e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Fix some typos.

2000-03-22  Jody Goldberg <jgoldberg@home.com>

	* src/plugin.c (plugin_load) : Typo.

	* src/workbook.c (recalc_cmd) : Bug7739.
parent 3794a965
......@@ -20,3 +20,5 @@ xltmain.sh
gnumeric.keys
gnumeric.spec
gnumeric.desktop
ID
tags
......@@ -8,6 +8,7 @@ Release Critical
- gnumeric depends on unreleased gnome-print
- text in print-preview is vertically offset (lewing has a patch for gnome-print)
- print-preview is not cleared between pages.
- formated values do not save/load correctly.
Long term breakage
------------------
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
2000-03-22 Jody Goldberg <jgoldberg@home.com>
* src/plugin.c (plugin_load) : Typo.
* src/workbook.c (recalc_cmd) : Bug7739.
2000-03-22 Chema Celorio <chema@celorio.com>
* idl/.cvsignore: Created .cvsignore added Makefiles
......
......@@ -146,7 +146,8 @@ plugin_load (CommandContext *context, const gchar *modfile)
g_strdup_printf (_("Unable to open plugin '%s'\n"
"The plugin did not check it's version.\n"
"It is probably for a different version of Gnumeric than '%s'."),
GNUMERIC_VERSION);
data->file_name,
GNUMERIC_VERSION);
gnumeric_error_plugin_problem (context, mesg);
g_free (mesg);
goto error;
......
......@@ -43,14 +43,24 @@ sheet_view_redraw_all (SheetView *sheet_view)
0, 0, INT_MAX, INT_MAX);
}
/*
* redraw a range and all of the associated spans.
* TODO : this should have TWO cases.
* 1) redraw just the selected region
* This is useful for cursor movement and the like.
* 2) redraw including the spans.
* This is useful for changes to cell contents.
*/
void
sheet_view_redraw_cell_region (SheetView *sheet_view, int start_col, int start_row, int end_col, int end_row)
sheet_view_redraw_cell_region (SheetView *sheet_view,
int start_col, int start_row,
int end_col, int end_row)
{
GnumericSheet *gsheet;
GnomeCanvas *canvas;
Sheet *sheet = sheet_view->sheet;
int first_col, first_row, last_col, last_row;
int col, row, min_col, max_col;
int row, min_col, max_col;
int x, y, w, h;
g_return_if_fail (sheet_view != NULL);
......@@ -76,26 +86,32 @@ sheet_view_redraw_cell_region (SheetView *sheet_view, int start_col, int start_r
min_col = first_col;
max_col = last_col;
/* Find the range of columns that require a redraw */
for (col = first_col; col <= last_col; col++)
for (row = first_row; row <= last_row; row++){
Cell *cell;
/*
* Check the first and last columns for spans
* and extend the region to include the maximum extent.
*/
for (row = first_row; row <= last_row; row++){
ColRowInfo const * const ri = sheet_row_get (sheet, row);
cell = sheet_cell_get (sheet, col, row);
if (ri != NULL) {
CellSpanInfo const * span0 =
row_span_get (ri, first_col);
if (cell){
int col1 = cell->col->pos, col2 = col1;
CellSpanInfo const * span =
row_span_get (cell->row, col1);
if (span0 != NULL) {
min_col = MIN (span0->left, min_col);
max_col = MAX (span0->right, max_col);
}
if (first_col != last_col) {
CellSpanInfo const * span1 =
row_span_get (ri, last_col);
if (span != NULL) {
col1 = span->left;
col2 = span->right;
if (span1 != NULL) {
min_col = MIN (span1->left, min_col);
max_col = MAX (span1->right, max_col);
}
min_col = MIN (col1, min_col);
max_col = MAX (col2, max_col);
}
}
}
/* Only draw those regions that are visible */
min_col = MAX (MIN (first_col, min_col), gsheet->col.first);
......@@ -354,7 +370,7 @@ sheet_view_col_size_changed (ItemBar *item_bar, int col, int width, SheetView *s
if (type == ITEM_BAR_FULL_SELECTION) {
int i = sheet->cols.max_used;
for (;i >= 0 ; --i) {
ColRowInfo *ci = sheet_col_get (sheet, i);
ColRowInfo const * const ci = sheet_col_get (sheet, i);
if (ci == NULL)
continue;
......@@ -419,12 +435,12 @@ sheet_view_row_size_changed (ItemBar *item_bar, int row, int height, SheetView *
if (type == ITEM_BAR_FULL_SELECTION) {
int i;
for (i = sheet->rows.max_used; i >= 0 ; --i) {
ColRowInfo *ri = sheet_row_get (sheet, i);
ColRowInfo const * const ri = sheet_row_get (sheet, i);
if (ri == NULL)
continue;
if (sheet_row_selection_type (sheet, ri->pos) == ITEM_BAR_FULL_SELECTION)
sheet_row_set_size_pixels (sheet, ri->pos, height, TRUE);
sheet_row_set_size_pixels (sheet, ri->pos, height, TRUE);
}
} else
sheet_row_set_size_pixels (sheet, row, height, TRUE);
......
......@@ -43,14 +43,24 @@ sheet_view_redraw_all (SheetView *sheet_view)
0, 0, INT_MAX, INT_MAX);
}
/*
* redraw a range and all of the associated spans.
* TODO : this should have TWO cases.
* 1) redraw just the selected region
* This is useful for cursor movement and the like.
* 2) redraw including the spans.
* This is useful for changes to cell contents.
*/
void
sheet_view_redraw_cell_region (SheetView *sheet_view, int start_col, int start_row, int end_col, int end_row)
sheet_view_redraw_cell_region (SheetView *sheet_view,
int start_col, int start_row,
int end_col, int end_row)
{
GnumericSheet *gsheet;
GnomeCanvas *canvas;
Sheet *sheet = sheet_view->sheet;
int first_col, first_row, last_col, last_row;
int col, row, min_col, max_col;
int row, min_col, max_col;
int x, y, w, h;
g_return_if_fail (sheet_view != NULL);
......@@ -76,26 +86,32 @@ sheet_view_redraw_cell_region (SheetView *sheet_view, int start_col, int start_r
min_col = first_col;
max_col = last_col;
/* Find the range of columns that require a redraw */
for (col = first_col; col <= last_col; col++)
for (row = first_row; row <= last_row; row++){
Cell *cell;
/*
* Check the first and last columns for spans
* and extend the region to include the maximum extent.
*/
for (row = first_row; row <= last_row; row++){
ColRowInfo const * const ri = sheet_row_get (sheet, row);
cell = sheet_cell_get (sheet, col, row);
if (ri != NULL) {
CellSpanInfo const * span0 =
row_span_get (ri, first_col);
if (cell){
int col1 = cell->col->pos, col2 = col1;
CellSpanInfo const * span =
row_span_get (cell->row, col1);
if (span0 != NULL) {
min_col = MIN (span0->left, min_col);
max_col = MAX (span0->right, max_col);
}
if (first_col != last_col) {
CellSpanInfo const * span1 =
row_span_get (ri, last_col);
if (span != NULL) {
col1 = span->left;
col2 = span->right;
if (span1 != NULL) {
min_col = MIN (span1->left, min_col);
max_col = MAX (span1->right, max_col);
}
min_col = MIN (col1, min_col);
max_col = MAX (col2, max_col);
}
}
}
/* Only draw those regions that are visible */
min_col = MAX (MIN (first_col, min_col), gsheet->col.first);
......@@ -354,7 +370,7 @@ sheet_view_col_size_changed (ItemBar *item_bar, int col, int width, SheetView *s
if (type == ITEM_BAR_FULL_SELECTION) {
int i = sheet->cols.max_used;
for (;i >= 0 ; --i) {
ColRowInfo *ci = sheet_col_get (sheet, i);
ColRowInfo const * const ci = sheet_col_get (sheet, i);
if (ci == NULL)
continue;
......@@ -419,12 +435,12 @@ sheet_view_row_size_changed (ItemBar *item_bar, int row, int height, SheetView *
if (type == ITEM_BAR_FULL_SELECTION) {
int i;
for (i = sheet->rows.max_used; i >= 0 ; --i) {
ColRowInfo *ri = sheet_row_get (sheet, i);
ColRowInfo const * const ri = sheet_row_get (sheet, i);
if (ri == NULL)
continue;
if (sheet_row_selection_type (sheet, ri->pos) == ITEM_BAR_FULL_SELECTION)
sheet_row_set_size_pixels (sheet, ri->pos, height, TRUE);
sheet_row_set_size_pixels (sheet, ri->pos, height, TRUE);
}
} else
sheet_row_set_size_pixels (sheet, row, height, TRUE);
......
......@@ -960,6 +960,7 @@ static void
recalc_cmd (GtkWidget *widget, Workbook *wb)
{
workbook_recalc_all (wb);
sheet_load_cell_val (wb->current_sheet);
}
static void
......
......@@ -529,7 +529,7 @@ xml_search_child (xmlNodePtr node, const char *name)
static gboolean
xml_read_range (xmlNodePtr tree, Range *res)
{
return
return
xml_get_value_int (tree, "startCol", &res->start.col) &&
xml_get_value_int (tree, "startRow", &res->start.row) &&
xml_get_value_int (tree, "endCol", &res->end.col) &&
......@@ -1389,7 +1389,7 @@ xml_read_style_region (parse_xml_context_t *ctxt, xmlNodePtr tree)
Range range;
style = xml_read_style_region_ex (ctxt, tree, &range);
if (style)
sheet_style_attach (ctxt->sheet, range, style);
}
......@@ -1598,7 +1598,7 @@ xml_write_cell_and_position (parse_xml_context_t *ctxt, Cell *cell, int col, int
xmlNodePtr cur;
char *text;
char *tstr;
cur = xmlNewDocNode (ctxt->doc, ctxt->ns, "Cell", NULL);
xml_set_value_int (cur, "Col", col);
xml_set_value_int (cur, "Row", row);
......@@ -1654,7 +1654,7 @@ xml_read_cell (parse_xml_context_t *ctxt, xmlNodePtr tree)
}
xml_get_value_int (tree, "Col", &col);
xml_get_value_int (tree, "Row", &row);
ret = sheet_cell_get (ctxt->sheet, col, row);
if (ret == NULL)
ret = sheet_cell_new (ctxt->sheet, col, row);
......@@ -1712,7 +1712,7 @@ xml_read_cell (parse_xml_context_t *ctxt, xmlNodePtr tree)
}
if (content == NULL)
content = xmlNodeGetContent (tree);
if (content != NULL) {
/*
* Handle special case of a non corner element of an array
......@@ -1749,13 +1749,13 @@ xml_read_cell_copy (parse_xml_context_t *ctxt, xmlNodePtr tree)
ret->type = CELL_COPY_TYPE_TEXT_AND_COMMENT;
ret->comment = NULL;
ret->u.text = NULL;
xml_get_value_int (tree, "Col", &ret->col_offset);
xml_get_value_int (tree, "Row", &ret->row_offset);
childs = tree->childs;
while (childs != NULL) {
if (!strcmp (childs->name, "Content"))
ret->u.text = xmlNodeGetContent (childs);
if (!strcmp (childs->name, "Comment")) {
......@@ -1766,7 +1766,7 @@ xml_read_cell_copy (parse_xml_context_t *ctxt, xmlNodePtr tree)
*/
if (ret->comment) {
char *temp = g_strdup (ret->comment);
xmlFree (ret->comment);
ret->comment = temp;
}
......@@ -1828,7 +1828,7 @@ xml_write_styles (parse_xml_context_t *ctxt, GList *l)
}
static void
xml_read_solver (Sheet *sheet, parse_xml_context_t *ctxt, xmlNodePtr tree,
xml_read_solver (Sheet *sheet, parse_xml_context_t *ctxt, xmlNodePtr tree,
SolverParameters *param)
{
SolverConstraint *c;
......@@ -2101,7 +2101,7 @@ xml_write_selection_clipboard (parse_xml_context_t *ctxt, Sheet *sheet)
cur = xmlNewDocNode (ctxt->doc, ctxt->ns, "ClipboardSheetSelection", NULL);
if (cur == NULL)
return NULL;
/*
* Write styles
*/
......@@ -2111,19 +2111,19 @@ xml_write_selection_clipboard (parse_xml_context_t *ctxt, Sheet *sheet)
while (iterator) {
GList *style_region_list;
Range *range = iterator->data;
style_region_list = sheet_get_styles_in_range (sheet, range);
styles = xml_write_styles (ctxt, style_region_list);
if (styles)
xmlAddChild (cur, styles);
sheet_style_list_destroy (style_region_list);
iterator = g_slist_next (iterator);
}
/*
* Write cells
*/
......@@ -2141,7 +2141,7 @@ xml_write_selection_clipboard (parse_xml_context_t *ctxt, Sheet *sheet)
Range *range = iterator->data;
for (row = range->start.row; row <= range->end.row; row++) {
for (col = range->start.col; col <= range->end.col; col++) {
Cell *cell = sheet_cell_get (sheet, col, row);
......@@ -2191,7 +2191,7 @@ xml_read_styles_ex (parse_xml_context_t *ctxt, xmlNodePtr tree, CellRegion *cr)
for (regions = child->childs; regions; regions = regions->next) {
StyleRegion *region = g_new0 (StyleRegion, 1);
region->style = xml_read_style_region_ex (ctxt, regions, &region->range);
cr->styles = g_list_prepend (cr->styles, region);
......@@ -2375,7 +2375,7 @@ xml_read_selection_clipboard (parse_xml_context_t *ctxt, xmlNodePtr tree)
CellRegion *cr;
xmlNodePtr child;
xmlNodePtr cells;
if (strcmp (tree->name, "ClipboardSheetSelection")){
fprintf (stderr,
"xml_sheet_read_selection_clipboard: invalid element type %s, 'ClipboardSheetSelection' expected\n",
......@@ -2404,7 +2404,7 @@ xml_read_selection_clipboard (parse_xml_context_t *ctxt, xmlNodePtr tree)
*/
child = xml_search_child (tree, "Cells");
if (child != NULL){
cells = child->childs;
while (cells != NULL){
CellCopy *cc;
......@@ -2412,15 +2412,15 @@ xml_read_selection_clipboard (parse_xml_context_t *ctxt, xmlNodePtr tree)
cc = xml_read_cell_copy (ctxt, cells);
if (cc) {
if (cc->col_offset > cr->cols)
cr->cols = cc->col_offset;
if (cc->row_offset > cr->rows)
cr->rows = cc->row_offset;
cr->list = g_list_prepend (cr->list, cc);
}
cells = cells->next;
}
}
......@@ -2708,7 +2708,7 @@ gnumeric_xml_write_selection_clipboard (CommandContext *context, Sheet *sheet,
xmlSetDocCompressMode (xml, 9);
xmlDocDumpMemory (xml, buffer, size);
xmlFreeDoc (xml);
return 0;
}
......@@ -2727,7 +2727,7 @@ gnumeric_xml_read_selection_clipboard (CommandContext *context, CellRegion **cr,
g_return_val_if_fail (*cr == NULL, -1);
g_return_val_if_fail (buffer != NULL, -1);
/*
* Load the buffer into an XML tree.
*/
......@@ -2742,12 +2742,12 @@ gnumeric_xml_read_selection_clipboard (CommandContext *context, CellRegion **cr,
(context, _("Invalid xml clipboard data. Tree is empty ?"));
return -1;
}
ctxt.doc = res;
*cr = xml_read_selection_clipboard (&ctxt, res->root);
xmlFreeDoc (res);
return 0;
}
......@@ -2854,8 +2854,3 @@ xml_init (void)
file_format_register_save (".gnumeric", desc, gnumeric_xml_write_workbook);
}
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