Commit 62a7d274 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

for single combos we can not exclude HIDDEN elements.

2006-12-07  Jody Goldberg <jody@gnome.org>

	* gnm-filter-combo-foo-view.c (fcombo_fill_model) : for single combos
	  we can not exclude HIDDEN elements.

2006-12-07  Jody Goldberg <jody@gnome.org>

	* src/xml-io-version.h : time to modernize a bit.  tack on some new
	  versions.

	* src/xml-sax-read.c : gnumeric_1_0_dtd Use GSF_XML_NO_CONTENT and
	  friends.
	(xml_sax_version) : new.
	(xml_sax_filter_condition) : The DOM filter has been swapping Value
	  and ValueType.  The SAX exported copied the code.  The importer
	  needs to use the incorrect layout to handle existing files.
	* src/xml-sax-write.c (xml_write_filter_expr) : warn about the the
	  swapping of Value and ValueType.
	* gnumeric.xsd : comment on the swapping.
parent 8d3c5bb0
......@@ -719,6 +719,9 @@ Short Term Goals
21.46.2) export
21.47) Find Leak (DONE)
21.48) Duplication for sheet copy (DONE)
21.49) http://bugzilla.gnome.org/show_bug.cgi?id=322389
21.50) http://bugzilla.gnome.org/show_bug.cgi?id=346002
22.51) Clipboard
22) Validate from List
22.1) Implement (DONE)
......
2006-12-07 Jody Goldberg <jody@gnome.org>
* src/xml-io-version.h : time to modernize a bit. tack on some new
versions.
* src/xml-sax-read.c : gnumeric_1_0_dtd Use GSF_XML_NO_CONTENT and
friends.
(xml_sax_version) : new.
(xml_sax_filter_condition) : The DOM filter has been swapping Value
and ValueType. The SAX exported copied the code. The importer
needs to use the incorrect layout to handle existing files.
* src/xml-sax-write.c (xml_write_filter_expr) : warn about the the
swapping of Value and ValueType.
* gnumeric.xsd : comment on the swapping.
2006-12-07 Christian Neumair <chris@gnome-de.org>
* src/widgets/gnumeric-expr-entry.c (cb_icon_clicked):
......
Gnumeric 1.7.6
Jody:
* Fix sax import of autofilters. [#383400]
* Fix autofilter lists with only 1 combo. [#383400]
Morten:
* Fix title problem. [#382643]
* Fix sax loading of comments.
......@@ -25,7 +29,7 @@ Jody:
- set initial selection for validate from list
- Home/End jumps to top bottom.
- Fix in RTL mode.
- List items unfiltered by other active conditions in combo.
- List items unfiltered by other active conditions. [#114307]
* Fix .gnumeric import of col/row groupings. [#380015]
* SAX import for autofilters
* Fix XSD schema
......
......@@ -826,12 +826,15 @@
<xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="Type" type="gnm:FilterFieldType" use="required"/>
<!-- WARNING WARNING WARNING
Value and ValueType have their senses
reversed due to an old typo -->
<!-- Only valid for Type=expr -->
<xsd:attribute name="ValueType0" type="gnm:ValueType" use="optional"/>
<xsd:attribute name="Value0" type="xsd:string" use="optional"/>
<xsd:attribute name="Value0" type="gnm:ValueType" use="optional"/>
<xsd:attribute name="ValueType0" type="xsd:string" use="optional"/>
<xsd:attribute name="Op0" type="gnm:FilterFieldOp" use="optional"/>
<xsd:attribute name="ValueType1" type="gnm:ValueType" use="optional"/>
<xsd:attribute name="Value1" type="xsd:string" use="optional"/>
<xsd:attribute name="Value1" type="gnm:ValueType" use="optional"/>
<xsd:attribute name="ValueType1" type="xsd:string" use="optional"/>
<xsd:attribute name="Op1" type="gnm:FilterFieldOp" use="optional"/>
<!-- Only valid for Type=bucket -->
......
2006-12-07 Jody Goldberg <jody@gnome.org>
* gnm-filter-combo-foo-view.c (fcombo_fill_model) : for single combos
we can not exclude HIDDEN elements.
2006-12-04 Jody Goldberg <jody@gnome.org>
* Release 1.7.5
......
......@@ -245,13 +245,15 @@ cb_ccombo_button_release (GtkWidget *popup, GdkEventButton *event,
return FALSE;
}
#if 0
static void
cb_focus_changed (GtkWindow *toplevel)
cb_focus_changed (GtkWindow *toplevel,
G_GNUC_UNUSED GParamSpec *pspec,
SheetObjectView *sov)
{
#if 0
g_warning (gtk_window_has_toplevel_focus (toplevel) ? "focus" : "no focus");
#endif
}
#endif
static void
cb_ccombo_button_pressed (G_GNUC_UNUSED GtkButton *button,
......@@ -292,9 +294,11 @@ gnm_cell_combo_foo_view_popdown (SheetObjectView *sov)
gtk_tree_view_append_column (GTK_TREE_VIEW (list), column);
gtk_widget_size_request (GTK_WIDGET (list), &req);
g_object_set_data (G_OBJECT (list), SOV_ID, sov);
g_signal_connect (G_OBJECT (wbcg_toplevel (scg_wbcg (scg))),
#if 0
id = g_signal_connect (G_OBJECT (wbcg_toplevel (scg_wbcg (scg))),
"notify::has-toplevel-focus",
G_CALLBACK (cb_focus_changed), list);
G_CALLBACK (cb_focus_changed), sov);
#endif
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
......
......@@ -191,17 +191,20 @@ fcombo_fill_model (SheetObject *so, GtkTreePath **clip, GtkTreePath **select)
/* We do not want to show items that are filtered by _other_ fields.
* The cleanest way to do that is to create a temporary sheet, apply
* all of the other conditions to it and use that as the source of visibility. */
if (filter->fields->len > 1)
if (filter->fields->len > 1) {
filtered_sheet = sheet_new (uc.src_sheet->workbook, "_DummyFilterPopulate");
else
g_object_ref (filtered_sheet = filter->sheet);
for (i = 0 ; i < filter->fields->len ; i++)
if (i != field_num)
gnm_filter_combo_apply (g_ptr_array_index (filter->fields, i), filtered_sheet);
sheet_foreach_cell_in_range (filtered_sheet, CELL_ITER_IGNORE_HIDDEN,
r.start.col, r.start.row, r.end.col, r.end.row,
(CellIterFunc)&cb_collect_content, &uc);
g_object_unref (filtered_sheet);
for (i = 0 ; i < filter->fields->len ; i++)
if (i != field_num)
gnm_filter_combo_apply (g_ptr_array_index (filter->fields, i),
filtered_sheet);
sheet_foreach_cell_in_range (filtered_sheet, CELL_ITER_IGNORE_HIDDEN,
r.start.col, r.start.row, r.end.col, r.end.row,
(CellIterFunc)&cb_collect_content, &uc);
g_object_unref (filtered_sheet);
} else
sheet_foreach_cell_in_range (filter->sheet, CELL_ITER_ALL,
r.start.col, r.start.row, r.end.col, r.end.row,
(CellIterFunc)&cb_collect_content, &uc);
g_hash_table_foreach (uc.hash, (GHFunc)cb_hash_domain, sorted);
qsort (&g_ptr_array_index (sorted, 0),
......
......@@ -14,10 +14,12 @@ typedef enum
GNM_XML_V7, /* >= 0.66 */
GNM_XML_V8, /* >= 0.71 */
GNM_XML_V9, /* >= 0.73 add print scaling */
GNM_XML_V10, /* >= 1.03 remove useless Content node in cells */
GNM_XML_V10, /* >= 1.0.3 remove useless Content node in cells */
GNM_XML_V11, /* >= 1.7.0 jump to sax exporter */
GNM_XML_V12, /* >= 1.7.3 Fix swapping of Value and ValueType in sax exporter */
/* NOTE : Keep this up to date (and in sync with the schema) */
GNM_XML_LATEST = GNM_XML_V10
GNM_XML_LATEST = GNM_XML_V12
} GnumericXMLVersion;
#endif /* GNUMERIC_XML_IO_VERSION_H */
......@@ -1335,6 +1335,11 @@ xml_read_sheet_layout (XmlParseContext *ctxt, xmlNodePtr tree)
}
static char const *filter_cond_name[] = { "eq", "gt", "lt", "gte", "lte", "ne" };
/*
* WARNING WARNING WARING
* Value and ValueType are _reversed !!!
*/
static struct { char const *op, *valtype, *val; } filter_expr_attrs[] = {
{ "Op0", "Value0", "ValueType0" },
{ "Op1", "Value1", "ValueType1" }
......
This diff is collapsed.
......@@ -798,6 +798,10 @@ xml_write_filter_expr (GnmOutputXML *state,
GnmFilterCondition const *cond, unsigned i)
{
static char const *filter_cond_name[] = { "eq", "gt", "lt", "gte", "lte", "ne" };
/*
* WARNING WARNING WARING
* Value and ValueType are _reversed !!!
*/
static struct { char const *op, *valtype, *val; } filter_expr_attrs[] = {
{ "Op0", "Value0", "ValueType0" },
{ "Op1", "Value1", "ValueType1" }
......
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