Commit eb1b5e70 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

don't shrink. sheet sized ranges. (sheet_style_compute): add precondition

2000-05-04  Michael Meeks  <michael@helixcode.com>

	* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
	sheet sized ranges. (sheet_style_compute): add precondition for
	Norberts.

	* src/workbook.c (workbook_new_with_sheets): kill ' ' in
	sheet names.

	* corba-test/test-gnumeric-corba.c (do_test): ditto.
parent 786d336b
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* src/sheet-style.c (sheet_style_delete_colrow): don't shrink.
sheet sized ranges. (sheet_style_compute): add precondition for
Norberts.
* src/workbook.c (workbook_new_with_sheets): kill ' ' in
sheet names.
* corba-test/test-gnumeric-corba.c (do_test): ditto.
2000-05-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c : Fix typo that was calling undo for redo toolbar.
......
......@@ -262,6 +262,9 @@ Office 2000 and 'explorer' compatibility.
* Import names even if they arn't referenced.
* The big SST re-write.
* Excel Export
* Detect large style ranges and correctly set the default row/col/sheet styles.
* Html export
* Export style information for blank cells.
......
......@@ -34,7 +34,7 @@ do_test (GNOME_Gnumeric_Workbook workbook)
#if 0
printf ("2. Trying to create an existing sheet name: ");
GNOME_Gnumeric_Workbook_sheet_new (workbook, "My Sheet 0", &ev);
GNOME_Gnumeric_Workbook_sheet_new (workbook, "My Sheet0", &ev);
if (ev._major != CORBA_USER_EXCEPTION){
printf ("Failed\n");
exit (1);
......@@ -44,7 +44,7 @@ do_test (GNOME_Gnumeric_Workbook workbook)
printf ("3. Looking up `Sheet 0':");
sheet0 = GNOME_Gnumeric_Workbook_sheet_lookup (workbook, "Sheet 0", &ev);
sheet0 = GNOME_Gnumeric_Workbook_sheet_lookup (workbook, "Sheet0", &ev);
if (sheet0){
printf ("Failed\n");
exit (1);
......
2000-05-04 Michael Meeks <michael@helixcode.com>
* html.c (html_read): fix ' ' in Sheet index.
2000-04-20 Jody Goldberg <jgoldberg@home.com>
* html.c (html_write_cell_str) : Use cell_is_blank.
......
......@@ -406,7 +406,7 @@ html_read (CommandContext *context, Workbook *wb, const char *filename)
num = 0;
while (fgets (buf, LINESIZE, fp) != NULL) {
if (strstr (buf, "<TABLE")) {
sprintf (name, _("Sheet %d"), num++);
sprintf (name, _("Sheet%d"), num++);
sheet = sheet_new (wb, name);
workbook_attach_sheet (wb, sheet);
row = -1;
......
......@@ -406,7 +406,7 @@ html_read (CommandContext *context, Workbook *wb, const char *filename)
num = 0;
while (fgets (buf, LINESIZE, fp) != NULL) {
if (strstr (buf, "<TABLE")) {
sprintf (name, _("Sheet %d"), num++);
sprintf (name, _("Sheet%d"), num++);
sheet = sheet_new (wb, name);
workbook_attach_sheet (wb, sheet);
row = -1;
......
......@@ -635,7 +635,7 @@ calc_grown_range (SheetStyleData *sd, int col, int row)
*
*/
MStyle *
sheet_style_compute (Sheet const *sheet, int col, int row)
sheet_style_compute (const Sheet *sheet, int col, int row)
{
MStyle *mstyle;
SheetStyleData *sd;
......@@ -645,6 +645,8 @@ sheet_style_compute (Sheet const *sheet, int col, int row)
sd = sheet->style_data;
g_return_val_if_fail (sd != NULL, NULL);
if ((mstyle = sheet_style_cache_lookup (sd, col, row))) {
mstyle_ref (mstyle);
......@@ -842,7 +844,9 @@ sheet_style_delete_colrow (Sheet *sheet, int pos, int count,
else if (sr->range.start.col >= del_range.start.col)
sr->range.start.col = pos;
if (sr->range.end.col > del_range.end.col)
if (sr->range.end.col >= SHEET_MAX_COLS - 1)
;
else if (sr->range.end.col > del_range.end.col)
sr->range.end.col -= count;
else if (sr->range.end.col >= del_range.start.col)
sr->range.end.col = pos - 1;
......@@ -857,7 +861,9 @@ sheet_style_delete_colrow (Sheet *sheet, int pos, int count,
else if (sr->range.start.row >= del_range.start.row)
sr->range.start.row = pos;
if (sr->range.end.row > del_range.end.row)
if (sr->range.end.row >= SHEET_MAX_ROWS - 1)
;
else if (sr->range.end.row > del_range.end.row)
sr->range.end.row -= count;
else if (sr->range.end.row >= del_range.start.row)
sr->range.end.row = pos - 1;
......@@ -1740,7 +1746,7 @@ sheet_selection_get_unique_style (Sheet *sheet, MStyleBorder **borders)
* range.
**/
void
sheet_style_get_extent (Range *r, Sheet const *sheet)
sheet_style_get_extent (Range *r, const Sheet *sheet)
{
GList *l;
SheetStyleData *sd;
......
......@@ -108,7 +108,8 @@ file_open_cmd (GtkWidget *widget, Workbook *wb)
if (new_wb != NULL) {
gtk_widget_show (new_wb->toplevel);
/* If the current workbook is empty and untouched remove it
/*
* If the current workbook is empty and untouched remove it
* in favour of the new book
*/
if (workbook_is_pristine (wb))
......@@ -3051,7 +3052,7 @@ workbook_detach_sheet (Workbook *wb, Sheet *sheet, gboolean force)
*/
g_hash_table_remove (wb->sheets, sheet->name_unquoted);
for (i = 0; i < sheets; i++){
for (i = 0; i < sheets; i++) {
Sheet *this_sheet;
GtkWidget *w;
......@@ -3059,7 +3060,7 @@ workbook_detach_sheet (Workbook *wb, Sheet *sheet, gboolean force)
this_sheet = gtk_object_get_data (GTK_OBJECT (w), "sheet");
if (this_sheet == sheet){
if (this_sheet == sheet) {
gtk_notebook_remove_page (notebook, i);
break;
}
......@@ -3154,7 +3155,7 @@ workbook_new_with_sheets (int sheet_count)
for (i = 1; i <= sheet_count; i++){
Sheet *sheet;
char *name = g_strdup_printf (_("Sheet %d"), i);
char *name = g_strdup_printf (_("Sheet%d"), i);
sheet = sheet_new (wb, name);
workbook_attach_sheet (wb, sheet);
......
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