Commit b033cbff authored by Arturo Espinosa's avatar Arturo Espinosa

Beginning of a test suite for Gnumeric

parent 8933a113
......@@ -77,7 +77,9 @@ gnumeric_today (FunctionDefinition *fd, Value *argv [], char **error_string)
struct tm *tm = localtime (&t);
v->type = VALUE_INTEGER;
v->v.v_int = calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
v->v.v_int =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) -
calc_days (1900, 1, 1);
return v;
}
......@@ -113,7 +115,7 @@ gnumeric_now (FunctionDefinition *fd, Value *argv [], char **error_string)
v->type = VALUE_FLOAT;
v->v.v_float =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) +
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/DAY_SECONDS) -
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/(double)DAY_SECONDS) -
calc_days (1900, 1, 1);
return v;
......
<?xml version="1.0"?>
<gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/">
<gmr:Geometry Width="776" Height="696"/>
<gmr:Sheets>
<gmr:Sheet>
<gmr:Name>Sheet 0</gmr:Name>
<gmr:MaxCol>2</gmr:MaxCol>
<gmr:MaxRow>11</gmr:MaxRow>
<gmr:Zoom>1.000000</gmr:Zoom>
<gmr:Cols>
<gmr:ColInfo No="0" Unit="175" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="1" Unit="126" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="2" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
</gmr:Cols>
<gmr:Rows>
<gmr:RowInfo No="0" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="1" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="2" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="4" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="5" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="6" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="8" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="9" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:RowInfo No="11" Unit="20" MarginA="1" MarginB="1" HardSize="0"/>
</gmr:Rows>
<gmr:Cells>
<gmr:Cell Col="0" Row="0">Current serial number
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef1">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="0">=now()
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0.000000">
<gmr:Font Unit="14" NAME="FontDef2">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="4">This year is:
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef3">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="11">E9
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef4">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="4">=year(b1)
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef5">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="8">Tomorrow is:
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef6">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="1">Serial number for today:
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef7">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="8">=day(date(year(now()),month(now()),1+day(now())))
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef8">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="1">=today()
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0.000000">
<gmr:Font Unit="14" NAME="FontDef9">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="5">this month is:
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef10">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="5">=month(b1)
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef11">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="9">Next month is:
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef12">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="2">Current time serial:
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef13">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="9">=month(date(year(now()),1+month(now()),day(now())))
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef14">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="2">=B1-B2
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0.000000">
<gmr:Font Unit="14" NAME="FontDef15">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="6">This day is:
<gmr:Style HAlign="4" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef16">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="6">=day(b1)
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="0">
<gmr:Font Unit="14" NAME="FontDef17">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
</gmr:Cells>
</gmr:Sheet>
</gmr:Sheets>
</gmr:Workbook>
<?xml version="1.0"?>
<gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/">
<gmr:Style HAlign="32" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef1">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
<gmr:Geometry Width="1036" Height="819"/>
<gmr:Sheets>
<gmr:Sheet>
<gmr:Name>Sheet 0</gmr:Name>
<gmr:MaxCol>177</gmr:MaxCol>
<gmr:MaxRow>1</gmr:MaxRow>
<gmr:Zoom>1.000000</gmr:Zoom>
<gmr:Cols>
<gmr:ColInfo No="0" Unit="102" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="1" Unit="97" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="2" Unit="102" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="3" Unit="110" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="4" Unit="115" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="5" Unit="107" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="6" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="7" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="8" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="9" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="10" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="11" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="171" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="172" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="173" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="174" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="175" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="176" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
<gmr:ColInfo No="177" Unit="80" MarginA="1" MarginB="1" HardSize="0"/>
</gmr:Cols>
<gmr:Rows>
<gmr:RowInfo No="0" Unit="292" MarginA="1" MarginB="1" HardSize="1"/>
<gmr:RowInfo No="1" Unit="210" MarginA="1" MarginB="1" HardSize="1"/>
</gmr:Rows>
<gmr:Objects>
<gmr:Ellipse Pattern="0" Width="1" Color="black">
<gmr:Points>(518.000000 276.000000)(681.000000 514.000000)</gmr:Points>
</gmr:Ellipse>
<gmr:Arrow Width="1" Color="black">
<gmr:Points>(208.000000 5.000000)(614.000000 292.000000)</gmr:Points>
</gmr:Arrow>
<gmr:Arrow Width="1" Color="black">
<gmr:Points>(315.000000 3.000000)(621.000000 291.000000)</gmr:Points>
</gmr:Arrow>
<gmr:Arrow Width="1" Color="black">
<gmr:Points>(429.000000 9.000000)(627.000000 292.000000)</gmr:Points>
</gmr:Arrow>
<gmr:Arrow Width="1" Color="black">
<gmr:Points>(546.000000 12.000000)(631.000000 293.000000)</gmr:Points>
</gmr:Arrow>
<gmr:Arrow Width="1" Color="black">
<gmr:Points>(647.000000 2.000000)(634.000000 291.000000)</gmr:Points>
</gmr:Arrow>
</gmr:Objects>
<gmr:Cells>
<gmr:Cell Col="0" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="32" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef2">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="11" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="1" VAlign="4" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef3">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="2" VAlign="4" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef4">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="2" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="2" VAlign="1" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef5">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="3" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="2" VAlign="2" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef6">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="0" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="2" VAlign="8" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef7">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="1" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="8" VAlign="8" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef8">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="4" Row="0">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="4" VAlign="4" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef9">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="2" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="4" VAlign="8" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef10">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="3" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="4" VAlign="2" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef11">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="4" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="32" VAlign="2" Fit="0" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef12">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
<gmr:Cell Col="5" Row="1">Hello Gnumeric! This is a test of the various indentation styles of Gnumeric
<gmr:Style HAlign="4" VAlign="1" Fit="1" Orient="1" Shade="0" Format="General">
<gmr:Font Unit="14" NAME="FontDef13">-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*</gmr:Font>
</gmr:Style>
</gmr:Cell>
</gmr:Cells>
</gmr:Sheet>
</gmr:Sheets>
</gmr:Workbook>
This diff is collapsed.
......@@ -692,7 +692,6 @@ calc_text_dimensions (int is_number, Style *style, char *text, int cell_w, int c
} else {
used = len;
}
printf ("Anadiendo %d pixeles\n", font_height);
*h += font_height;
ideal_cut_spot = NULL;
} else
......
......@@ -32,8 +32,8 @@ dialog_insert_cells (Sheet *sheet)
_("Insert"),
_("Shift cells right"), &state[0],
_("Shift cells down"), &state[1],
_("Insert a row"), &state[2],
_("Insert a column"), &state[3],
_("Insert row(s)"), &state[2],
_("Insert column(s)"), &state[3],
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
......
......@@ -32,8 +32,8 @@ dialog_insert_cells (Sheet *sheet)
_("Insert"),
_("Shift cells right"), &state[0],
_("Shift cells down"), &state[1],
_("Insert a row"), &state[2],
_("Insert a column"), &state[3],
_("Insert row(s)"), &state[2],
_("Insert column(s)"), &state[3],
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
......
......@@ -145,7 +145,7 @@ expr_tree_unref (ExprTree *tree)
char *
value_string (Value *value)
{
char buffer [1024];
char buffer [40];
switch (value->type){
case VALUE_STRING:
......@@ -1007,8 +1007,12 @@ do_expr_decode_tree (ExprTree *tree, int col, int row, Operation parent_op)
strcpy (buffer_b, a);
return g_copy_strings (buffer_a, ":", buffer_b, NULL);
} else
return value_string (v);
} else {
if (v->type == VALUE_STRING){
return g_copy_strings ("\"", v->v.str->str, "\"", NULL);
} else
return value_string (v);
}
}
case OP_VAR: {
......
......@@ -77,7 +77,9 @@ gnumeric_today (FunctionDefinition *fd, Value *argv [], char **error_string)
struct tm *tm = localtime (&t);
v->type = VALUE_INTEGER;
v->v.v_int = calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
v->v.v_int =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) -
calc_days (1900, 1, 1);
return v;
}
......@@ -113,7 +115,7 @@ gnumeric_now (FunctionDefinition *fd, Value *argv [], char **error_string)
v->type = VALUE_FLOAT;
v->v.v_float =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) +
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/DAY_SECONDS) -
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/(double)DAY_SECONDS) -
calc_days (1900, 1, 1);
return v;
......
......@@ -1073,8 +1073,12 @@ format_value (StyleFormat *format, Value *value, StyleColor **color)
switch (value->type){
case VALUE_FLOAT:
if (is_general)
entry.format = "0.##";
if (is_general){
if (floor (value->v.v_float) == value->v.v_float)
entry.format = "0";
else
entry.format = "0.##";
}
if (finite (value->v.v_float))
v = format_number (value->v.v_float, &entry);
else
......
......@@ -77,7 +77,9 @@ gnumeric_today (FunctionDefinition *fd, Value *argv [], char **error_string)
struct tm *tm = localtime (&t);
v->type = VALUE_INTEGER;
v->v.v_int = calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
v->v.v_int =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) -
calc_days (1900, 1, 1);
return v;
}
......@@ -113,7 +115,7 @@ gnumeric_now (FunctionDefinition *fd, Value *argv [], char **error_string)
v->type = VALUE_FLOAT;
v->v.v_float =
calc_days (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) +
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/DAY_SECONDS) -
((tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec)/(double)DAY_SECONDS) -
calc_days (1900, 1, 1);
return v;
......
......@@ -254,7 +254,7 @@ gnumeric_sheet_can_move_cursor (GnumericSheet *gsheet)
switch (entry->text [cursor_pos-1]){
case '=': case '-': case '*': case '/': case '^':
case '+': case '&': case '(': case '%': case '!':
case ':':
case ':': case ',':
return TRUE;
}
......
......@@ -254,7 +254,7 @@ gnumeric_sheet_can_move_cursor (GnumericSheet *gsheet)
switch (entry->text [cursor_pos-1]){
case '=': case '-': case '*': case '/': case '^':
case '+': case '&': case '(': case '%': case '!':
case ':':
case ':': case ',':
return TRUE;
}
......
......@@ -2320,8 +2320,10 @@ sheet_shift_row (Sheet *sheet, int col, int row, int count)
if (ci->pos < col)
break;
} else {
if (ci->pos < col)
if (ci->pos < col){
cur_col = cur_col->next;
continue;
}
}
new_column = ci->pos + count;
......@@ -2624,8 +2626,10 @@ sheet_shift_col (Sheet *sheet, int col, int row, int count)
if (cell->row->pos < row)
break;
} else {
if (cell->row->pos < row)
if (cell->row->pos < row){
cur_row = cur_row->next;
continue;
}
}
new_row = cell->row->pos + count;
......
......@@ -293,7 +293,7 @@ static GnomeUIInfo workbook_menu_file [] = {
{ GNOME_APP_UI_ITEM, N_("_Open"), NULL, open_cmd, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN },
{ GNOME_APP_UI_ITEM, N_("_Save"), NULL, save_cmd, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE },
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE, GDK_s, GDK_CONTROL_MASK },
{ GNOME_APP_UI_ITEM, N_("S_ave as..."), NULL, save_as_cmd, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE },
{ GNOME_APP_UI_ITEM, N_("_Plugins..."), NULL, plugins_cmd },
......@@ -340,10 +340,33 @@ static GnomeUIInfo workbook_menu_insert [] = {
GNOMEUIINFO_END
};
#if 0
static GnomeUIInfo workbook_menu_format_column [] = {
{ GNOME_APP_UI_ITEM, N_("_Autoadjust"), NULL, format_column_autoadjust_cmd },
{ GNOME_APP_UI_ITEM, N_("_Width"), NULL, format_column_width_cmd },
GNOMEUIINFO_END
};
static GnomeUIInfo workbook_menu_format_row [] = {
{ GNOME_APP_UI_ITEM, N_("_Autoadjust"), NULL, format_row_autoadjust_cmd },
{ GNOME_APP_UI_ITEM, N_("_Height"), NULL, format_row_height_cmd },
GNOMEUIINFO_END
};
static GnomeUIInfo workbook_menu_format_sheet [] = {
{ GNOME_APP_UI_ITEM, N_("_Change name"), NULL, format_sheet_change_name_cmd },
GNOMEUIINFO_END
};
#endif
static GnomeUIInfo workbook_menu_format [] = {
{ GNOME_APP_UI_ITEM, N_("_Cells.."), NULL, format_cells_cmd, NULL, NULL,
{ GNOME_APP_UI_ITEM, N_("_Cells.."), NULL, format_cells_cmd, NULL, NULL,
0, 0, GDK_1, GDK_CONTROL_MASK },
#if 0
{ GNOME_APP_UI_SUBTREE, N_("C_olumn"), NULL, &workbook_menu_format_column },
{ GNOME_APP_UI_SUBTREE, N_("_Row"), NULL, &workbook_menu_format_row },
{ GNOME_APP_UI_SUBTREE, N_("_Sheet"), NULL, &workbook_menu_format_sheet },
#endif
GNOMEUIINFO_END
};
......
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