It's 3.30.2 release day, upload a tarball and fix that hidden pesky bug that you missed in .1 🦛

Commit a7385c93 authored by Morten Welinder's avatar Morten Welinder

Clipboard: make generated xml deterministic.

I.e., don't let cell ordering depending on GHashTable.
parent 69c0dbe0
2018-06-08 Morten Welinder <terra@gnome.org>
* src/xml-sax-write.c (gnm_cellregion_to_xml): Impose ordering on
cells.
2018-05-22 Morten Welinder <terra@gnome.org>
* Test commit after migration.
......
......@@ -10,8 +10,8 @@ Morten:
* ssconvert improvements.
* Makefile improvements.
* Don't save any configuration when running ssconvert/ssdiff/...
* Fix crash-on-exit.
* Turn GnmFunc into a GObject.
* Make clipboard output deterministic.
--------------------------------------------------------------------------
Gnumeric 1.12.41
......
......@@ -1606,6 +1606,17 @@ cb_xml_write_cell_region_cells (GnmCellCopy *cc,
cc->texpr, cc->val, &state->pp);
}
static int
by_row_col (GnmCellCopy *cc_a, gpointer val_a,
GnmCellCopy *cc_b, gpointer val_b,
gpointer user)
{
int res = cc_a->offset.row - cc_b->offset.row;
if (!res)
res = cc_a->offset.col - cc_b->offset.col;
return res;
}
/**
* gnm_cellregion_to_xml:
* @cr: the content to store.
......@@ -1688,8 +1699,11 @@ gnm_cellregion_to_xml (GnmCellRegion const *cr)
state.cr = cr;
if (cr->cell_content != NULL) {
gsf_xml_out_start_element (state.state.output, GNM "Cells");
g_hash_table_foreach (cr->cell_content,
(GHFunc) cb_xml_write_cell_region_cells, &state);
gnm_hash_table_foreach_ordered
(cr->cell_content,
(GHFunc) cb_xml_write_cell_region_cells,
(GnmHashTableOrder)by_row_col,
&state);
gsf_xml_out_end_element (state.state.output); /* </Cells> */
}
......
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