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

fix double click handling to not start a drag when the editor is gone



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

	* src/gnumeric-pane.c (cb_control_point_event) : fix double click
	  handling to not start a drag when the editor is gone

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

	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288157
	* src/colrow.c (colrow_set_sizes) : we need to rerender variable width
	  content when resizing all cols at the same time, just like we do for
	  smaller sections

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

	http://bugzilla.gnome.org/show_bug.cgi?id=161782
	* templates/autoformat/Makefile.am : applied patch to use non
	  bash-specific variable substitution.

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

	http://bugzilla.gnome.org/show_bug.cgi?id=163409
	* ms-excel-write.c (excel_write_COLINFO) : handle ci == NULL
	  so that we can export empty cols with formats.  If the format is the
	  same as the sheet default don't bother to export.
	(excel_write_colinfos) : we may need to export empty cols.
parent 0b998004
2005-01-14 Jody Goldberg <jody@gnome.org>
* src/gnumeric-pane.c (cb_control_point_event) : fix double click
handling to not start a drag when the editor is gone
2005-01-13 Jody Goldberg <jody@gnome.org>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288157
* src/colrow.c (colrow_set_sizes) : we need to rerender variable width
content when resizing all cols at the same time, just like we do for
smaller sections
2005-01-13 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=161782
* templates/autoformat/Makefile.am : applied patch to use non
bash-specific variable substitution.
2005-01-13 Morten Welinder <terra@gnome.org>
* src/style.c (style_font_new_simple): Don't ref and unref the
......
......@@ -35,6 +35,11 @@ Jody:
* Fix sizes of Bitstream Vera for xls export [#163406]
* Mouse events while editing with other vertical alignments [#163198]
* Fix zoom for rich text with explicit size [#163223]
* XLS export for empty cols with non-default formats [#163409]
* Redo var width content when resizing all cols at once [debian #288157]
Matthias Drochner:
* Use non bash specific substitution for autformat templates [#161782]
Morten:
* Improve accuracy of pgamma and thus pchisq, ppois, qgamma,
......
2005-01-14 Jody Goldberg <jody@gnome.org>
* src/gnumeric-pane.c (cb_control_point_event) : fix double click
handling to not start a drag when the editor is gone
2005-01-13 Jody Goldberg <jody@gnome.org>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288157
* src/colrow.c (colrow_set_sizes) : we need to rerender variable width
content when resizing all cols at the same time, just like we do for
smaller sections
2005-01-13 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=161782
* templates/autoformat/Makefile.am : applied patch to use non
bash-specific variable substitution.
2005-01-13 Morten Welinder <terra@gnome.org>
* src/style.c (style_font_new_simple): Don't ref and unref the
......
2005-01-13 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=163409
* ms-excel-write.c (excel_write_COLINFO) : handle ci == NULL
so that we can export empty cols with formats. If the format is the
same as the sheet default don't bother to export.
(excel_write_colinfos) : we may need to export empty cols.
2005-01-10 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=163406
......
......@@ -2940,46 +2940,52 @@ excel_write_DEFCOLWIDTH (BiffPut *bp, ExcelWriteSheet *esheet)
* excel_write_COLINFO
* @bp: BIFF buffer
* @esheet:
* @ci : the descriptor of the first col
* @last_index : the index of the last contiguous identical col
* @ci : the descriptor of the first col (possibly NULL)
* @first_col : the index of the last contiguous identical col
* @last_col : the index of the last contiguous identical col
* @xf_index : the style index to the entire col (< 0 for none)
*
* Write column info for a run of identical columns
**/
static void
excel_write_COLINFO (BiffPut *bp, ExcelWriteSheet *esheet,
ColRowInfo const *ci, int last_index, guint16 xf_index)
excel_write_COLINFO (BiffPut *bp, ExcelWriteSheet *esheet, ColRowInfo const *ci,
int first_col, int last_col, guint16 xf_index)
{
guint8 *data;
guint16 charwidths, options = 0;
float width, scale;
XL_font_width const *spec = xl_find_fontspec (esheet, &scale);
XL_font_width const *spec;
if (NULL != ci) {
width = ci->size_pts; /* pts to avoid problems when zooming */
if (!ci->visible)
options = 1;
options |= (MIN (ci->outline_level, 0x7) << 8);
if (ci->is_collapsed)
options |= 0x1000;
} else {
if (xf_index == esheet->ewb->xf.default_style_index)
return; /* there is no point exporting this */
width = esheet->gnum_sheet->cols.default_style.size_pts;
}
width = ci->size_pts; /* pts to avoid problems when zooming */
width /= scale * 72. / 96; /* pixels at 96dpi */
/* center the measurement on the known default size */
spec = xl_find_fontspec (esheet, &scale);
charwidths = (guint16)((width - 8. * spec->defcol_unit) * spec->colinfo_step +
spec->colinfo_baseline + .5);
if (!ci->visible)
options = 1;
options |= (MIN (ci->outline_level, 0x7) << 8);
if (ci->is_collapsed)
options |= 0x1000;
d (1, {
fprintf (stderr, "Column Formatting %s!%s of width "
"%hu/256 characters (%f pts)\n",
esheet->gnum_sheet->name_quoted,
cols_name (ci->pos, last_index), charwidths,
ci->size_pts);
"%hu/256 characters\n",
esheet->gnum_sheet->name_quoted,
cols_name (first_col, last_col), charwidths);
fprintf (stderr, "Options %hd, default style %hd\n", options, xf_index);
});
/* NOTE : Docs are wrong, length is 12 not 11 */
data = ms_biff_put_len_next (bp, BIFF_COLINFO, 12);
GSF_LE_SET_GUINT16 (data + 0, ci->pos); /* 1st col formatted */
GSF_LE_SET_GUINT16 (data + 2, last_index); /* last col formatted */
GSF_LE_SET_GUINT16 (data + 0, first_col); /* 1st col formatted */
GSF_LE_SET_GUINT16 (data + 2, last_col); /* last col formatted */
GSF_LE_SET_GUINT16 (data + 4, charwidths);
GSF_LE_SET_GUINT16 (data + 6, xf_index);
GSF_LE_SET_GUINT16 (data + 8, options);
......@@ -2990,24 +2996,25 @@ excel_write_COLINFO (BiffPut *bp, ExcelWriteSheet *esheet,
static void
excel_write_colinfos (BiffPut *bp, ExcelWriteSheet *esheet)
{
ColRowInfo const *ci, *first = NULL;
int i;
ColRowInfo const *ci, *info;
int first_col = 0, i;
guint16 new_xf, xf = 0;
for (i = 0; i < esheet->max_col; i++) {
if (esheet->max_col <= 0)
return;
info = sheet_col_get (esheet->gnum_sheet, 0);
xf = esheet->col_xf [0];
for (i = 1; i < esheet->max_col; i++) {
ci = sheet_col_get (esheet->gnum_sheet, i);
new_xf = esheet->col_xf [i];
if (first == NULL) {
first = ci;
xf = new_xf;
} else if (xf != new_xf || !colrow_equal (first, ci)) {
excel_write_COLINFO (bp, esheet, first, i-1, xf);
first = ci;
xf = new_xf;
if (xf != new_xf || !colrow_equal (info, ci)) {
excel_write_COLINFO (bp, esheet, info, first_col, i-1, xf);
info = ci;
xf = new_xf;
first_col = i;
}
}
if (first != NULL)
excel_write_COLINFO (bp, esheet, first, i-1, xf);
excel_write_COLINFO (bp, esheet, info, first_col, i-1, xf);
}
static char const *
......
......@@ -60,6 +60,7 @@ struct _ExcelWriteState {
struct {
TwoWayTable *two_way_table;
GnmStyle *default_style;
int default_style_index;
GHashTable *value_fmt_styles;
} xf;
struct {
......
......@@ -95,11 +95,13 @@ colrow_is_empty (ColRowInfo const *cri)
* @b : ColRowInfo #2
*
* Returns true if the infos are equivalent.
*/
**/
gboolean
colrow_equal (ColRowInfo const *a, ColRowInfo const *b)
{
if (a == NULL || b == NULL)
if (a == NULL)
return b == NULL;
if (b == NULL)
return FALSE;
return a->size_pts == b->size_pts &&
......@@ -467,6 +469,12 @@ colrow_set_sizes (Sheet *sheet, gboolean is_cols,
&cb_set_colrow_size, &closure);
}
/* force a re-render of cells with expanding formats */
if (is_cols)
sheet_foreach_cell_in_range (sheet, CELL_ITER_IGNORE_BLANK,
0, 0, SHEET_MAX_COLS-1, SHEET_MAX_ROWS-1,
(CellIterFunc) &cb_clear_variable_width_content, NULL);
/* Result is a magic 'default' record + >= 1 normal */
return g_slist_prepend (res, g_slist_append (NULL, rles));
}
......
......@@ -812,7 +812,8 @@ cb_control_point_event (FooCanvasItem *ctrl_pt, GdkEvent *event, GnmPane *pane)
case GDK_2BUTTON_PRESS:
if (pane->drag.button == 1)
sheet_object_get_editor (so, SHEET_CONTROL (scg));
break;
else
break;
case GDK_BUTTON_RELEASE:
if (pane->drag.button != (int)event->button.button)
......
......@@ -41,13 +41,13 @@ install-data-local:
< $(srcdir)/$$cat.category.in \
> $$dir/.category ; \
for f in $(srcdir)/autoformat.$$cat.*.xml.in ; do \
echo " $${f/.*autoformat.$$cat./}" ; \
echo " $${f#$(srcdir)/autoformat.$$cat.}" ; \
sed \
-e 's/ _author *=/ author=/' \
-e 's/ _name *=/ name=/' \
-e 's/ _description *=/ description=/' \
< $$f \
> $$dir/`basename $${f/.xml.in/.xml}` ; \
> $$dir/`basename $${f%.in}` ; \
done \
done
......
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