Commit 197f8557 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

add some protection


2005-02-08  Jody Goldberg <jody@gnome.org>

	* src/print-info.c (print_hf_same) : add some protection

2005-02-01  Jody Goldberg <jody@gnome.org>

	* gnumeric.xsd : Add entries for validation and hyperlinks
parent eb0d46c0
2005-02-08 Jody Goldberg <jody@gnome.org>
* src/print-info.c (print_hf_same) : add some protection
2005-02-06 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-object-widget.c: (cb_adjustment_value_changed): avoid
......@@ -63,6 +67,10 @@
* src/graph.c: (gnm_go_data_matrix_get_value): duplicate value before
releasing (#166051)
2005-02-01 Jody Goldberg <jody@gnome.org>
* gnumeric.xsd : Add entries for validation and hyperlinks
2005-02-01 Morten Welinder <terra@gnome.org>
* src/stf-parse.c (stf_parse_csv_is_separator): Handle
......
2005-02-08 Jody Goldberg <jody@gnome.org>
* src/print-info.c (print_hf_same) : add some protection
2005-02-06 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-object-widget.c: (cb_adjustment_value_changed): avoid
......@@ -63,6 +67,10 @@
* src/graph.c: (gnm_go_data_matrix_get_value): duplicate value before
releasing (#166051)
2005-02-01 Jody Goldberg <jody@gnome.org>
* gnumeric.xsd : Add entries for validation and hyperlinks
2005-02-01 Morten Welinder <terra@gnome.org>
* src/stf-parse.c (stf_parse_csv_is_separator): Handle
......
......@@ -300,10 +300,11 @@
<xsd:simpleType name="print_units">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="mm"/>
<xsd:enumeration value="cm"/>
<xsd:enumeration value="in"/>
<xsd:enumeration value="mm"/>
<xsd:enumeration value="points"/>
<xsd:enumeration value="Pt"/>
<xsd:enumeration value="Px"/>
</xsd:restriction>
</xsd:simpleType>
......@@ -345,11 +346,11 @@
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Unit" type="xsd:double" use="required"/>
<xsd:attribute name="Bold" type="xsd:boolean" use="required"/>
<xsd:attribute name="Italic" type="xsd:boolean" use="required"/>
<xsd:attribute name="Underline" type="gmr:underline" use="required"/>
<xsd:attribute name="StrikeThrough" type="xsd:boolean" use="required"/>
<xsd:attribute name="Unit" type="xsd:double" use="required"/>
<xsd:attribute name="Bold" type="xsd:boolean" use="required"/>
<xsd:attribute name="Italic" type="xsd:boolean" use="required"/>
<xsd:attribute name="Underline" type="gmr:underline" use="required"/>
<xsd:attribute name="StrikeThrough" type="xsd:boolean" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
......@@ -366,18 +367,47 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Hyperlink" use="optional">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string" use="required"/>
<xsd:attribute name="target" type="xsd:string" use="optional"/>
<xsd:attribute name="tip" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="Validation" use="optional">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Style" type="xsd:integer" use="required"/>
<xsd:attribute name="Type" type="xsd:integer" use="required"/>
<xsd:attribute name="Operator" type="xsd:integer" use="optional"/>
<xsd:attribute name="AllowBlank" type="xsd:boolean" use="optional"/>
<xsd:attribute name="UseDropdown" type="xsd:boolean" use="optional"/>
<xsd:attribute name="Title" type="xsd:string" use="optional"/>
<xsd:attribute name="Message" type="xsd:string" use="optional"/>
<xsd:attribute name="Expression0" type="xsd:string" use="optional"/>
<xsd:attribute name="Expression1" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="HAlign" type="gmr:horizontal_alignment"/>
<xsd:attribute name="VAlign" type="gmr:vertical_alignment" />
<xsd:attribute name="WrapText" type="xsd:boolean" />
<xsd:attribute name="Orient" type="gmr:style_orientation" />
<xsd:attribute name="ShrinkToFit" type="xsd:boolean" />
<xsd:attribute name="Rotation" type="xsd:integer" />
<xsd:attribute name="Shade" type="gmr:style_shading" />
<xsd:attribute name="Indent" type="xsd:integer" />
<xsd:attribute name="Locked" type="xsd:boolean" />
<xsd:attribute name="Hidden" type="xsd:boolean" />
<xsd:attribute name="Fore" type="gmr:color" />
<xsd:attribute name="Back" type="gmr:color" />
<xsd:attribute name="PatternColor" type="gmr:color" />
<xsd:attribute name="Locked" type="xsd:boolean" />
<xsd:attribute name="Hidden" type="xsd:boolean" />
<!-- the most common value of the Format attribute, by far, is
General. Here are some other values:
#,##0.00
......@@ -459,19 +489,6 @@
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="style_orientation">
<xsd:restriction base="xsd:integer">
<!-- this is a bit map as follows:
1 = HORIZ
2 = VERT_HORIZ_TEXT
4 = VERT_VERT_TEXT
8 = VERT_VERT_TEXT2
-->
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="15"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="style_shading">
<xsd:restriction base="xsd:integer">
<!-- the values are defined as follows:
......
......@@ -373,9 +373,9 @@ xml_write_gnmstyle (GnmOutputXML *state, GnmStyle const *style)
if (mstyle_is_element_set (style, MSTYLE_ALIGN_V))
gsf_xml_out_add_int (state->output, "VAlign", mstyle_get_align_v (style));
if (mstyle_is_element_set (style, MSTYLE_WRAP_TEXT))
gsf_xml_out_add_int (state->output, "WrapText", mstyle_get_wrap_text (style));
gsf_xml_out_add_bool (state->output, "WrapText", mstyle_get_wrap_text (style));
if (mstyle_is_element_set (style, MSTYLE_SHRINK_TO_FIT))
gsf_xml_out_add_int (state->output, "ShrinkToFit", mstyle_get_shrink_to_fit (style));
gsf_xml_out_add_bool (state->output, "ShrinkToFit", mstyle_get_shrink_to_fit (style));
if (mstyle_is_element_set (style, MSTYLE_ROTATION))
gsf_xml_out_add_int (state->output, "Rotation", mstyle_get_rotation (style));
if (mstyle_is_element_set (style, MSTYLE_PATTERN))
......@@ -383,9 +383,9 @@ xml_write_gnmstyle (GnmOutputXML *state, GnmStyle const *style)
if (mstyle_is_element_set (style, MSTYLE_INDENT))
gsf_xml_out_add_int (state->output, "Indent", mstyle_get_indent (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_LOCKED))
gsf_xml_out_add_int (state->output, "Locked", mstyle_get_content_locked (style));
gsf_xml_out_add_bool (state->output, "Locked", mstyle_get_content_locked (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_HIDDEN))
gsf_xml_out_add_int (state->output, "Hidden", mstyle_get_content_hidden (style));
gsf_xml_out_add_bool (state->output, "Hidden", mstyle_get_content_hidden (style));
if (mstyle_is_element_set (style, MSTYLE_COLOR_FORE))
gnm_xml_out_add_color (state->output, "Fore", mstyle_get_color (style, MSTYLE_COLOR_FORE));
if (mstyle_is_element_set (style, MSTYLE_COLOR_BACK))
......
......@@ -148,6 +148,10 @@ src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-barcol-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/gog-line.c
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_barcol/plugin.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_boxes/gog-boxplot.c
src/cut-n-paste-code/goffice/graph/plugins/plot_boxes/gog-boxplot-prefs.glade
src/cut-n-paste-code/goffice/graph/plugins/plot_boxes/plot-types.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_boxes/plugin.xml.in
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie.c
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie-prefs.c
src/cut-n-paste-code/goffice/graph/plugins/plot_pie/gog-pie-prefs.glade
......
......@@ -1190,7 +1190,7 @@ plugin_service_plugin_loader_deactivate (GnmPluginService *service, ErrorInfo **
GNM_INIT_RET_ERROR_INFO (ret_error);
full_id = g_strconcat (
gnm_plugin_get_id (service->plugin), ":", service->id, NULL);
plugins_register_loader (full_id, service);
plugins_unregister_loader (full_id);
g_free (full_id);
service->is_active = FALSE;
}
......
......@@ -57,14 +57,24 @@ print_hf_new (char const *left_side_format,
gboolean
print_hf_same (PrintHF const *a, PrintHF const *b)
{
if (strcmp (b->left_format, a->left_format))
return FALSE;
if (strcmp (b->middle_format, a->middle_format))
return FALSE;
if (strcmp (b->right_format, a->right_format))
return FALSE;
if (a->left_format != b->left_format) {
if (a->left_format == NULL ||
b->left_format == NULL ||
strcmp (b->left_format, a->left_format))
return FALSE;
}
if (a->middle_format != b->middle_format) {
if (a->middle_format == NULL ||
b->middle_format == NULL ||
strcmp (b->middle_format, a->middle_format))
return FALSE;
}
if (a->right_format != b->right_format) {
if (a->right_format == NULL ||
b->right_format == NULL ||
strcmp (b->right_format, a->right_format))
return FALSE;
}
return TRUE;
}
......
......@@ -1595,14 +1595,14 @@ parse_criteria_range (Sheet *sheet, int b_col, int b_row, int e_col, int e_row,
cond = g_new (func_criteria_t, 1);
parse_criteria (cell->value, &cond->fun, &cond->x, NULL, date_conv);
cond->column = (field_ind != NULL) ? field_ind[j - b_col] : j - b_col;
conditions = g_slist_append (conditions, cond);
conditions = g_slist_prepend (conditions, cond);
}
new_criteria->conditions = conditions;
criterias = g_slist_append (criterias, new_criteria);
new_criteria->conditions = g_slist_reverse (conditions);
criterias = g_slist_prepend (criterias, new_criteria);
}
return criterias;
return g_slist_reverse (criterias);
}
/*
......@@ -1650,20 +1650,19 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
int last_col, int last_row,
GSList *criterias, gboolean unique_only)
{
GSList *current, *conditions, *rows;
GSList *current, *conditions, *rows = NULL;
GnmCell *test_cell;
int row, add_flag;
rows = NULL;
int row;
gboolean add_flag;
for (row = first_row; row <= last_row; row++) {
current = criterias;
add_flag = 1;
add_flag = TRUE;
for (current = criterias; current != NULL;
current = current->next) {
database_criteria_t *current_criteria;
add_flag = 1;
add_flag = TRUE;
current_criteria = current->data;
conditions = current_criteria->conditions;
......@@ -1672,14 +1671,13 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
test_cell = sheet_cell_get (sheet,
first_col + cond->column, row);
if (test_cell != NULL)
if (test_cell != NULL) {
cell_eval (test_cell);
if (cell_is_empty (test_cell))
continue;
if (!cond->fun (test_cell->value, cond->x)) {
add_flag = 0;
break;
if (!cell_is_empty (test_cell) &&
!cond->fun (test_cell->value, cond->x)) {
add_flag = FALSE;
break;
}
}
conditions = conditions->next;
}
......
......@@ -700,10 +700,10 @@ xml_write_style (XmlParseContext *ctxt,
if (mstyle_is_element_set (style, MSTYLE_ALIGN_V))
xml_node_set_int (cur, "VAlign", mstyle_get_align_v (style));
if (mstyle_is_element_set (style, MSTYLE_WRAP_TEXT))
xml_node_set_int (cur, "WrapText",
xml_node_set_bool (cur, "WrapText",
mstyle_get_wrap_text (style));
if (mstyle_is_element_set (style, MSTYLE_SHRINK_TO_FIT))
xml_node_set_int (cur, "ShrinkToFit",
xml_node_set_bool (cur, "ShrinkToFit",
mstyle_get_shrink_to_fit (style));
if (mstyle_is_element_set (style, MSTYLE_ROTATION))
xml_node_set_int (cur, "Rotation", mstyle_get_rotation (style));
......@@ -712,10 +712,10 @@ xml_write_style (XmlParseContext *ctxt,
if (mstyle_is_element_set (style, MSTYLE_INDENT))
xml_node_set_int (cur, "Indent", mstyle_get_indent (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_LOCKED))
xml_node_set_int (cur, "Locked",
xml_node_set_bool (cur, "Locked",
mstyle_get_content_locked (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_HIDDEN))
xml_node_set_int (cur, "Hidden",
xml_node_set_bool (cur, "Hidden",
mstyle_get_content_hidden (style));
if (mstyle_is_element_set (style, MSTYLE_COLOR_FORE))
......
......@@ -373,9 +373,9 @@ xml_write_gnmstyle (GnmOutputXML *state, GnmStyle const *style)
if (mstyle_is_element_set (style, MSTYLE_ALIGN_V))
gsf_xml_out_add_int (state->output, "VAlign", mstyle_get_align_v (style));
if (mstyle_is_element_set (style, MSTYLE_WRAP_TEXT))
gsf_xml_out_add_int (state->output, "WrapText", mstyle_get_wrap_text (style));
gsf_xml_out_add_bool (state->output, "WrapText", mstyle_get_wrap_text (style));
if (mstyle_is_element_set (style, MSTYLE_SHRINK_TO_FIT))
gsf_xml_out_add_int (state->output, "ShrinkToFit", mstyle_get_shrink_to_fit (style));
gsf_xml_out_add_bool (state->output, "ShrinkToFit", mstyle_get_shrink_to_fit (style));
if (mstyle_is_element_set (style, MSTYLE_ROTATION))
gsf_xml_out_add_int (state->output, "Rotation", mstyle_get_rotation (style));
if (mstyle_is_element_set (style, MSTYLE_PATTERN))
......@@ -383,9 +383,9 @@ xml_write_gnmstyle (GnmOutputXML *state, GnmStyle const *style)
if (mstyle_is_element_set (style, MSTYLE_INDENT))
gsf_xml_out_add_int (state->output, "Indent", mstyle_get_indent (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_LOCKED))
gsf_xml_out_add_int (state->output, "Locked", mstyle_get_content_locked (style));
gsf_xml_out_add_bool (state->output, "Locked", mstyle_get_content_locked (style));
if (mstyle_is_element_set (style, MSTYLE_CONTENT_HIDDEN))
gsf_xml_out_add_int (state->output, "Hidden", mstyle_get_content_hidden (style));
gsf_xml_out_add_bool (state->output, "Hidden", mstyle_get_content_hidden (style));
if (mstyle_is_element_set (style, MSTYLE_COLOR_FORE))
gnm_xml_out_add_color (state->output, "Fore", mstyle_get_color (style, MSTYLE_COLOR_FORE));
if (mstyle_is_element_set (style, MSTYLE_COLOR_BACK))
......
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