Commit 71ece7e7 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

relax requirements, blanks and hidden are ok. It might be nice to skip


2003-09-21  Jody Goldberg <jody@gnome.org>

	* src/stf.c (stf_text_to_columns) : relax requirements, blanks and
	  hidden are ok.  It might be nice to skip hidden, or filter blanks
	  but we have no capabilities to paste into 'non-hidden' region.  So
	  it makes sense to ignore hidden for consistency.
	(cb_get_content) : accept blanks.
parent 61859acd
2003-09-21 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_text_to_columns) : relax requirements, blanks and
hidden are ok. It might be nice to skip hidden, or filter blanks
but we have no capabilities to paste into 'non-hidden' region. So
it makes sense to ignore hidden for consistency.
(cb_get_content) : accept blanks.
2003-09-18 Jody Goldberg <jody@gnome.org>
* src/gui-util.c (cb_free_keyed_dialog_context) : remove the
......
......@@ -16,7 +16,8 @@ Jody:
* Fix crash with partial bar/col/line/area/xy series
* Patch warning when quiting with an keyed dialog
* Fix xls export of operand classes
* Minor pacakging bug in corba plugin
* Minor packaging bug in corba plugin
* Accept blank lines in text to cols.
Morten:
* Invalid memory read in marker combo.
......
2003-09-21 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_text_to_columns) : relax requirements, blanks and
hidden are ok. It might be nice to skip hidden, or filter blanks
but we have no capabilities to paste into 'non-hidden' region. So
it makes sense to ignore hidden for consistency.
(cb_get_content) : accept blanks.
2003-09-18 Jody Goldberg <jody@gnome.org>
* src/gui-util.c (cb_free_keyed_dialog_context) : remove the
......
2003-09-21 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_text_to_columns) : relax requirements, blanks and
hidden are ok. It might be nice to skip hidden, or filter blanks
but we have no capabilities to paste into 'non-hidden' region. So
it makes sense to ignore hidden for consistency.
(cb_get_content) : accept blanks.
2003-09-18 Jody Goldberg <jody@gnome.org>
* src/gui-util.c (cb_free_keyed_dialog_context) : remove the
......
2003-09-21 Jody Goldberg <jody@gnome.org>
* ms-formula-read.c (excel_parse_formula) : disable debug spew.
2003-09-21 Jody Goldberg <jody@gnome.org>
* ms-formula-write.c (xl_map_char_to_type) : new util.
......
......@@ -53,7 +53,7 @@ gint ms_excel_escher_debug = 0;
/* Enables debugging mesgs while reading excel functions */
gint ms_excel_formula_debug = 0;
/* Enables debugging mesgs while reading excel charts */
gint ms_excel_chart_debug = 0;
gint ms_excel_chart_debug = 10;
/* Enables debugging mesgs while writing excel workbooks */
gint ms_excel_write_debug = 0;
/* Enables debugging mesgs while reading excel objects */
......
......@@ -777,7 +777,7 @@ excel_parse_formula (MSContainer const *container,
*array_element = FALSE;
#ifndef NO_DEBUG_EXCEL
if (ms_excel_formula_debug > -1) {
if (ms_excel_formula_debug > 1) {
ms_excel_dump_cellname (container->ewb, esheet, fn_col, fn_row);
fprintf (stderr, "\n");
if (ms_excel_formula_debug > 2) {
......@@ -793,7 +793,7 @@ excel_parse_formula (MSContainer const *container,
int ptgbase = ((ptg & 0x40) ? (ptg | 0x20): ptg) & 0x3F;
if (ptg > FORMULA_PTG_MAX)
break;
d (-1, {
d (2, {
fprintf (stderr, "Ptg : 0x%02x", ptg);
if (ptg != ptgbase)
fprintf (stderr, "(0x%02x)", ptgbase);
......
......@@ -106,7 +106,7 @@ gog_control_foocanvas_set_property (GObject *gobject, guint param_id,
static void
gog_control_foocanvas_get_property (GObject *gobject, guint param_id,
GValue *value, GParamSpec *pspec)
GValue *value, GParamSpec *pspec)
{
GogControlFooCanvas *ctrl = GOG_CONTROL_FOOCANVAS (gobject);
......
......@@ -224,21 +224,23 @@ static Value *
cb_get_content (Sheet *sheet, int col, int row,
Cell *cell, GsfOutput *buf)
{
char *tmp;
if (cell_has_expr (cell)) {
ParsePos pp;
tmp = gnm_expr_as_string (cell->base.expression,
parse_pos_init_cell (&pp, cell),
gnm_expr_conventions_default);
} else if (VALUE_FMT (cell->value) != NULL)
tmp = format_value (NULL, cell->value, NULL, -1,
workbook_date_conv (sheet->workbook));
else
tmp = value_get_as_string (cell->value);
gsf_output_write (buf, strlen (tmp), tmp);
if (cell != NULL) {
char *tmp;
if (cell_has_expr (cell)) {
ParsePos pp;
tmp = gnm_expr_as_string (cell->base.expression,
parse_pos_init_cell (&pp, cell),
gnm_expr_conventions_default);
} else if (VALUE_FMT (cell->value) != NULL)
tmp = format_value (NULL, cell->value, NULL, -1,
workbook_date_conv (sheet->workbook));
else
tmp = value_get_as_string (cell->value);
gsf_output_write (buf, strlen (tmp), tmp);
g_free (tmp);
}
gsf_output_write (buf, 1, "\n");
g_free (tmp);
return NULL;
}
......@@ -284,7 +286,7 @@ stf_text_to_columns (WorkbookControl *wbc, CommandContext *cc)
buf = gsf_output_memory_new ();
sheet_foreach_cell_in_range (src_sheet,
CELL_ITER_IGNORE_BLANK | CELL_ITER_IGNORE_HIDDEN,
CELL_ITER_ALL,
src->start.col, src->start.row,
src->end.col, src->end.row,
(CellIterFunc) &cb_get_content, buf);
......@@ -303,15 +305,16 @@ stf_text_to_columns (WorkbookControl *wbc, CommandContext *cc)
data, data_len);
}
if (dialogresult != NULL) {
CellRegion *cr = NULL;
cr = stf_parse_region (dialogresult->parseoptions, dialogresult->text, NULL);
CellRegion *cr = stf_parse_region (dialogresult->parseoptions,
dialogresult->text, NULL);
if (cr != NULL) {
stf_dialog_result_attach_formats_to_cr (dialogresult, cr);
target.end.col = target.start.col + cr->cols - 1;
target.end.row = target.start.row + cr->rows - 1;
}
if (cr == NULL || cmd_text_to_columns (wbc, src, src_sheet,
&target, target_sheet, cr))
if (cr == NULL ||
cmd_text_to_columns (wbc, src, src_sheet,
&target, target_sheet, cr))
gnumeric_error_read (COMMAND_CONTEXT (cc),
_("Error while trying to "
"parse data into sheet"));
......
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