Commit 12d54308 authored by Morten Welinder's avatar Morten Welinder

Deal with new gcc warnings.

parent 43ea3369
......@@ -579,44 +579,45 @@ sylk_rtd_f_parse (SylkReader *state, char *str)
break;
case 'S':
for (str++ ; *str && *str != ';' ; str++)
switch (*str) {
case 'I':
if (style == NULL) style = gnm_style_new ();
gnm_style_set_font_italic (style, TRUE);
break;
for (str++ ; *str && *str != ';' ; str++) {
switch (*str) {
case 'I':
if (style == NULL) style = gnm_style_new ();
gnm_style_set_font_italic (style, TRUE);
break;
case 'D':
if (style == NULL) style = gnm_style_new ();
gnm_style_set_font_bold (style, TRUE);
break;
case 'M':
if (sylk_parse_int (str+1, &tmp) &&
1 <= tmp && tmp <= (int)state->fonts->len) {
GnmStyle const *font =
g_ptr_array_index (state->fonts, tmp-1);
case 'D':
if (style == NULL) style = gnm_style_new ();
gnm_style_merge_element (style, font,
MSTYLE_FONT_NAME);
gnm_style_merge_element (style, font,
MSTYLE_FONT_SIZE);
}
str = (char *)" ";
break;
gnm_style_set_font_bold (style, TRUE);
break;
case 'S': /* seems to stipple things */
if (style == NULL) style = gnm_style_new ();
gnm_style_set_pattern (style, 5);
break;
case 'M':
if (sylk_parse_int (str+1, &tmp) &&
1 <= tmp && tmp <= (int)state->fonts->len) {
GnmStyle const *font =
g_ptr_array_index (state->fonts, tmp-1);
if (style == NULL) style = gnm_style_new ();
gnm_style_merge_element (style, font,
MSTYLE_FONT_NAME);
gnm_style_merge_element (style, font,
MSTYLE_FONT_SIZE);
}
str = (char *)" ";
break;
case 'T': style = sylk_set_border (style, MSTYLE_BORDER_TOP); break;
case 'B': style = sylk_set_border (style, MSTYLE_BORDER_BOTTOM); break;
case 'L': style = sylk_set_border (style, MSTYLE_BORDER_LEFT); break;
case 'R': style = sylk_set_border (style, MSTYLE_BORDER_RIGHT); break;
case 'S': /* seems to stipple things */
if (style == NULL) style = gnm_style_new ();
gnm_style_set_pattern (style, 5);
break;
case 'T': style = sylk_set_border (style, MSTYLE_BORDER_TOP); break;
case 'B': style = sylk_set_border (style, MSTYLE_BORDER_BOTTOM); break;
case 'L': style = sylk_set_border (style, MSTYLE_BORDER_LEFT); break;
case 'R': style = sylk_set_border (style, MSTYLE_BORDER_RIGHT); break;
default:
sylk_read_warning (state, "unhandled style S%c.", *str);
default:
sylk_read_warning (state, "unhandled style S%c.", *str);
}
}
break;
......
......@@ -736,9 +736,10 @@ item_bar_draw_region (GocItem const *item, cairo_t *cr,
cairo_move_to (cr, left+3, bottom+size/2);
cairo_line_to (cr, left+size-4, bottom+size/2);
}
} else if (level > 0)
} else if (level > 0) {
cairo_move_to (cr, pos, top+pixels/2);
cairo_line_to (cr, pos+len, top+pixels/2);
}
}
cairo_stroke (cr);
cairo_restore (cr);
......
......@@ -3584,7 +3584,7 @@ toolbar_context_menu (GtkToolbar *tb, WBCGtk *gtk, GdkEvent *event)
static const struct {
char const *text;
GtkPositionType pos;
} const pos_items[] = {
} pos_items[] = {
{ N_("Display toolbar above sheets"), GTK_POS_TOP },
{ N_("Display toolbar to the left of sheets"), GTK_POS_LEFT },
{ N_("Display toolbar to the right of sheets"), GTK_POS_RIGHT }
......
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