Commit e3496b8e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

disable stupid cruft until I actually write this function.


2001-01-24  Jody Goldberg <jgoldberg@home.com>

	* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
	  until I actually write this function.

	* src/format-template.c (format_template_recalc_hash) : remove the
	  cruft to apply shifted borders.
parent 5bb3736e
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
until I actually write this function.
* src/format-template.c (format_template_recalc_hash) : remove the
cruft to apply shifted borders.
* src/gnumeric.xml : Define font Underline/Italic as toggles.
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/clipboard.c (clipboard_copy_range) : save the merged regions.
......
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
until I actually write this function.
* src/format-template.c (format_template_recalc_hash) : remove the
cruft to apply shifted borders.
* src/gnumeric.xml : Define font Underline/Italic as toggles.
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/clipboard.c (clipboard_copy_range) : save the merged regions.
......
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
until I actually write this function.
* src/format-template.c (format_template_recalc_hash) : remove the
cruft to apply shifted borders.
* src/gnumeric.xml : Define font Underline/Italic as toggles.
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/clipboard.c (clipboard_copy_range) : save the merged regions.
......
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
until I actually write this function.
* src/format-template.c (format_template_recalc_hash) : remove the
cruft to apply shifted borders.
* src/gnumeric.xml : Define font Underline/Italic as toggles.
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/clipboard.c (clipboard_copy_range) : save the merged regions.
......
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/sheet-style.c (sheet_style_get_uniform) : disable stupid cruft
until I actually write this function.
* src/format-template.c (format_template_recalc_hash) : remove the
cruft to apply shifted borders.
* src/gnumeric.xml : Define font Underline/Italic as toggles.
2001-01-24 Jody Goldberg <jgoldberg@home.com>
* src/clipboard.c (clipboard_copy_range) : save the merged regions.
......
......@@ -1958,7 +1958,8 @@ cb_fmt_dialog_dialog_destroy (GtkObject *unused, FormatState *state)
}
/* Set initial focus */
static void set_initial_focus (FormatState *state)
static void
set_initial_focus (FormatState *state)
{
GtkWidget *focus_widget = NULL, *pagew;
gchar *name;
......
......@@ -1042,77 +1042,6 @@ format_template_recalc_hash (FormatTemplate *ft)
format_template_calculate (ft, s, (PCalcCallback) cb_format_hash_style, ft->table);
/*
* What follows is an ugly workaround
* to set bottom and right borders
* Remove this once border handling is improved.
*/
{
int row, col;
for (row = ft->y1; row <= ft->y2; row++) {
for (col = ft->x1; col <= ft->x2; col++) {
StyleBorder *bottom;
StyleBorder *right;
MStyle *mstyle;
MStyle *mstyle_to_bottom;
MStyle *mstyle_to_right;
mstyle = format_template_get_style (ft, row, col);
if (!mstyle)
continue;
mstyle_to_bottom = format_template_get_style (ft, row + 1, col);
mstyle_to_right = format_template_get_style (ft, row, col + 1);
bottom = mstyle_get_border (mstyle, MSTYLE_BORDER_BOTTOM);
right = mstyle_get_border (mstyle, MSTYLE_BORDER_RIGHT);
if (bottom != NULL && bottom->line_type != STYLE_BORDER_NONE) {
if (!mstyle_to_bottom) {
MStyle *mstyle_default;
mstyle_default = mstyle_new_default ();
mstyle_to_bottom = mstyle_copy (mstyle_default);
mstyle_unref (mstyle_default);
mstyle_set_border (mstyle_to_bottom, MSTYLE_BORDER_TOP,
style_border_ref (bottom));
hash_table_insert (ft->table, row + 1, col, mstyle_to_bottom);
mstyle_unref (mstyle_to_bottom);
} else {
mstyle_set_border (mstyle_to_bottom, MSTYLE_BORDER_TOP,
style_border_ref (bottom));
}
}
if (right != NULL && right->line_type != STYLE_BORDER_NONE) {
if (!mstyle_to_right) {
MStyle *mstyle_default;
mstyle_default = mstyle_new_default ();
mstyle_to_right = mstyle_copy (mstyle_default);
mstyle_unref (mstyle_default);
mstyle_set_border (mstyle_to_right, MSTYLE_BORDER_LEFT,
style_border_ref (right));
hash_table_insert (ft->table, row, col + 1, mstyle_to_right);
mstyle_unref (mstyle_to_right);
} else {
mstyle_set_border (mstyle_to_right, MSTYLE_BORDER_LEFT,
style_border_ref (right));
}
}
}
}
}
g_hash_table_thaw (ft->table);
}
......@@ -1358,7 +1287,7 @@ format_template_set_category (FormatTemplate *ft, FormatTemplateCategory *catego
void
format_template_set_filter (FormatTemplate *ft,
gboolean number, gboolean border,
gboolean font, gboolean patterns,
gboolean font, gboolean patterns,
gboolean alignment)
{
g_return_if_fail (ft != NULL);
......
......@@ -1242,17 +1242,6 @@ sheet_style_get_uniform (Sheet const *sheet, Range const *range,
g_return_if_fail (style != NULL);
g_return_if_fail (borders != NULL);
/* Create the range including a border of 1 cell where possible */
all = *range;
if (all.start.col > 0)
all.start.col--;
if (all.end.col < SHEET_MAX_COLS)
all.end.col++;
if (all.start.row > 0)
all.start.row--;
if (all.end.row < SHEET_MAX_ROWS)
all.end.row++;
/* init style set with a copy of the top left corner of the 1st range */
if (*style == NULL) {
MStyle const *tmp;
......@@ -1270,6 +1259,19 @@ sheet_style_get_uniform (Sheet const *sheet, Range const *range,
TILE_TOP_LEVEL, 0, 0, &all,
cb_filter_style, &closure);
#if 0
/* Create the range including a border of 1 cell where possible */
all = *range;
if (all.start.col > 0)
all.start.col--;
if (all.end.col < SHEET_MAX_COLS)
all.end.col++;
if (all.start.row > 0)
all.start.row--;
if (all.end.row < SHEET_MAX_ROWS)
all.end.row++;
#endif
for (i = STYLE_BORDER_TOP ; i <= STYLE_BORDER_RIGHT ; i++)
borders [i] = style_border_ref (style_border_none ());
......
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