Commit c0c7ad30 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Coding style fixes; Indentation fixes



Coding style fixes;  Indentation fixes

Miguel
parent c46a2f59
......@@ -125,7 +125,6 @@
* src/workbook.c (open_cmd): If the file-open dialog was
cancelled, it will return NULL. Take this into account.
>>>>>>> 1.256
1999-01-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/workbook.c (workbook_setup_status_area): We do not use the
......
......@@ -125,7 +125,6 @@
* src/workbook.c (open_cmd): If the file-open dialog was
cancelled, it will return NULL. Take this into account.
>>>>>>> 1.256
1999-01-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/workbook.c (workbook_setup_status_area): We do not use the
......
......@@ -125,7 +125,6 @@
* src/workbook.c (open_cmd): If the file-open dialog was
cancelled, it will return NULL. Take this into account.
>>>>>>> 1.256
1999-01-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/workbook.c (workbook_setup_status_area): We do not use the
......
......@@ -125,7 +125,6 @@
* src/workbook.c (open_cmd): If the file-open dialog was
cancelled, it will return NULL. Take this into account.
>>>>>>> 1.256
1999-01-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/workbook.c (workbook_setup_status_area): We do not use the
......
......@@ -417,23 +417,27 @@ cell_set_pattern (Cell *cell, int pattern)
cell_queue_redraw (cell);
}
/*
/**
* cell_set_border:
* @cell: the cell
* @border_type: an array containing the borders for the cell
* @border_color: an array of StyleColors with the
* NB. don't unref the StyleColor *s you pass.
*/
void
cell_set_border (Cell *cell, StyleBorderType border_type[4],
StyleColor *border_color[4])
cell_set_border (Cell *cell,
StyleBorderType border_type[4],
StyleColor *border_color[4])
{
g_return_if_fail (cell != NULL);
cell_modified (cell);
if (cell->style->valid_flags & STYLE_BORDER)
style_border_unref (cell->style->border) ;
style_border_unref (cell->style->border);
cell->style->valid_flags |= STYLE_BORDER;
cell->style->border = style_border_new (border_type,
border_color) ;
cell->style->border = style_border_new (border_type, border_color);
cell_queue_redraw (cell);
}
......
......@@ -116,8 +116,9 @@ void cell_set_foreground (Cell *cell, gushort red,
void cell_set_background (Cell *cell, gushort red,
gushort green, gushort blue);
void cell_set_pattern (Cell *cell, int pattern);
void cell_set_border (Cell *cell, StyleBorderType border_type[4],
StyleColor *border_color[4]);
void cell_set_border (Cell *cell,
StyleBorderType border_type [4],
StyleColor *border_color [4]);
void cell_set_alignment (Cell *cell, int halign, int valign,
int orientation, int auto_return);
void cell_set_halign (Cell *cell, StyleHAlignFlags halign);
......
......@@ -173,26 +173,24 @@ style_font_unref (StyleFont *sf)
}
StyleBorder *
style_border_new (StyleBorderType border_type[4],
StyleColor *border_color[4])
style_border_new (StyleBorderType border_type [4],
StyleColor *border_color [4])
{
StyleBorder key, *border;
int lp ;
memcpy (&key.type, border_type, sizeof(key.type)) ;
for (lp=0;lp<4;lp++)
{
if (border_color[lp])
key.color[lp] = border_color[lp] ;
for (lp = 0; lp < 4; lp++){
if (border_color [lp])
key.color [lp] = border_color [lp] ;
else
key.color[lp] = NULL ;
key.color [lp] = NULL ;
}
border = (StyleBorder *) g_hash_table_lookup (style_border_hash,
&key);
if (!border)
{
if (!border){
border = g_new0 (StyleBorder, 1);
*border = key;
g_hash_table_insert (style_border_hash, border, border);
......@@ -228,8 +226,9 @@ style_border_unref (StyleBorder *sb)
StyleBorder *
style_border_new_plain (void)
{
StyleBorderType style[4] = { BORDER_NONE, BORDER_NONE, BORDER_NONE, BORDER_NONE } ;
StyleColor *color[4] = { NULL, NULL, NULL, NULL } ;
StyleBorderType style [4] = { BORDER_NONE, BORDER_NONE, BORDER_NONE, BORDER_NONE } ;
StyleColor *color [4] = { NULL, NULL, NULL, NULL } ;
return style_border_new (style, color) ;
}
......@@ -411,12 +410,12 @@ border_equal (gconstpointer v, gconstpointer v2)
StyleBorder *k2 = (StyleBorder *) v2;
int lp ;
for (lp=0;lp<4;lp++)
for (lp = 0; lp < 4; lp++)
{
if (k1->type[lp] != k2->type[lp])
if (k1->type [lp] != k2->type [lp])
return 0 ;
if (k1->type[lp] != BORDER_NONE &&
k1->color[lp] != k2->color[lp])
if (k1->type [lp] != BORDER_NONE &&
k1->color [lp] != k2->color [lp])
return 0;
}
......@@ -428,8 +427,8 @@ border_hash (gconstpointer v)
{
StyleBorder *k = (StyleBorder *) v;
return (k->type[STYLE_LEFT] << 12) | (k->type[STYLE_RIGHT] << 8) |
(k->type[STYLE_TOP] << 4) | (k->type[STYLE_BOTTOM]) ;
return (k->type [STYLE_LEFT] << 12) | (k->type [STYLE_RIGHT] << 8) |
(k->type [STYLE_TOP] << 4) | (k->type [STYLE_BOTTOM]) ;
}
......
......@@ -286,7 +286,9 @@ cb_sheet_check_dirty (gpointer key, gpointer value, gpointer user_data)
NULL);
if (sheet->workbook->filename)
s = g_strdup_printf (_("Workbook %s has unsaved changes, save them?"), g_basename (sheet->workbook->filename));
s = g_strdup_printf (
_("Workbook %s has unsaved changes, save them?"),
g_basename (sheet->workbook->filename));
else
s = g_strdup (_("Workbook has unsaved changes, save them?"));
......
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