Commit 4426aa49 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Fix warnings and logix problems with Ins/Del Row/Col.

2000-01-06  Jody Goldberg <jgoldberg@home.com>

	* src/commands.c (cmd_ins_del_row_col_undo) : Fix operator precedence.
	(cmd_ins_del_row_col_redo) : Ditto.

	* src/sheet.c (sheet_save_row_col_sizes) : Be extra careful.

	* src/gnumeric-sheet.c : Add include for commands.h.
parent 2a523d85
2000-01-06 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_ins_del_row_col_undo) : Fix operator precedence.
(cmd_ins_del_row_col_redo) : Ditto.
* src/sheet.c (sheet_save_row_col_sizes) : Be extra careful.
* src/gnumeric-sheet.c : Add include for commands.h.
2000-01-06 Morten Welinder <terra@diku.dk>
* src/parser.y (register_allocation): Return a value, ahem...
......
2000-01-06 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_ins_del_row_col_undo) : Fix operator precedence.
(cmd_ins_del_row_col_redo) : Ditto.
* src/sheet.c (sheet_save_row_col_sizes) : Be extra careful.
* src/gnumeric-sheet.c : Add include for commands.h.
2000-01-06 Morten Welinder <terra@diku.dk>
* src/parser.y (register_allocation): Return a value, ahem...
......
......@@ -430,7 +430,7 @@ cmd_ins_del_row_col_undo (GnumericCommand *cmd, CommandContext *context)
else
sheet_insert_rows (context, me->sheet, me->index, me->count);
} else {
index = (me->is_cols) ? SHEET_MAX_COLS : SHEET_MAX_ROWS - me->count;
index = ((me->is_cols) ? SHEET_MAX_COLS : SHEET_MAX_ROWS) - me->count;
if (me->is_cols)
sheet_delete_cols (context, me->sheet, me->index, me->count);
else
......@@ -454,7 +454,7 @@ cmd_ins_del_row_col_redo (GnumericCommand *cmd, CommandContext *context)
/* TODO : 1) Save the values of the deleted cells */
/* TODO : 2) Save the styles in the cleared range */
if (me->is_insert) {
int const index = (me->is_cols) ? SHEET_MAX_COLS : SHEET_MAX_ROWS -
int const index = ((me->is_cols) ? SHEET_MAX_COLS : SHEET_MAX_ROWS) -
me->count;
me->sizes = sheet_save_row_col_sizes (me->sheet, me->is_cols,
index, me->count);
......
......@@ -21,6 +21,7 @@
#include "application.h"
#include "workbook-view.h"
#include "workbook.h"
#include "commands.h"
#undef DEBUG_POSITIONS
......
......@@ -21,6 +21,7 @@
#include "application.h"
#include "workbook-view.h"
#include "workbook.h"
#include "commands.h"
#undef DEBUG_POSITIONS
......
......@@ -3727,6 +3727,7 @@ sheet_save_row_col_sizes (Sheet *sheet, gboolean const is_cols,
for (i = 0 ; i < count ; ++i) {
ColRowInfo *info = sheet_col_get_info (sheet, index + i);
g_return_val_if_fail (info != NULL, NULL); /* be anal, and leak */
res[i] = info->units;
if (info->hard_size)
res[i] *= -1.;
......
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