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

make the probable openers available from the import menu to simplify the

2001-12-27  Jody Goldberg <jody@gnome.org>

	* plugins/*/plugins.xml.in : make the probable openers available from
	  the import menu to simplify the user experience until we can revisit
	  the distinction between import and open.

	* src/value-sheet.c (value_area_get_width) : rip out the clipping.
	(value_area_get_height) : rip out the clipping.  This slows graphs
	  but fixes countblank, cols, and rows.

	* src/sheet-object-widget.c (sheet_widget_checkbox_construct_with_range) :
	  remove attempt to assign the corner of the current selection.
	(sheet_widget_checkbox_clone) : be safer when dealing with checkboxes
	  without expressions.
	(sheet_widget_checkbox_get_ref) : ditto.

	* src/sheet-object.c (sheet_object_clone_sheet) : more protection.

	* src/commands.c (cmd_area_set_text_redo) : the content list was in
	  reversed compared to the range list.
	(cmd_paste_cut) : don't register a cmd for a paste that does nothing.

	* src/gnumeric-canvas.c (gnm_canvas_realize) : formating.
parent 0852a416
2001-12-27 Jody Goldberg <jody@gnome.org>
* plugins/*/plugins.xml.in : make the probable openers available from
the import menu to simplify the user experience until we can revisit
the distinction between import and open.
* src/value-sheet.c (value_area_get_width) : rip out the clipping.
(value_area_get_height) : rip out the clipping. This slows graphs
but fixes countblank, cols, and rows.
* src/sheet-object-widget.c (sheet_widget_checkbox_construct_with_range) :
remove attempt to assign the corner of the current selection.
(sheet_widget_checkbox_clone) : be safer when dealing with checkboxes
without expressions.
(sheet_widget_checkbox_get_ref) : ditto.
* src/sheet-object.c (sheet_object_clone_sheet) : more protection.
* src/commands.c (cmd_area_set_text_redo) : the content list was in
reversed compared to the range list.
(cmd_paste_cut) : don't register a cmd for a paste that does nothing.
* src/gnumeric-canvas.c (gnm_canvas_realize) : formating.
2001-12-26 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=66842
......
......@@ -6,7 +6,11 @@ Andreas:
* Fix roff importer (#66457)
Jody:
* double check that nearest range is not on another sheet.
* Double check that nearest range is not on another sheet.
* Fix undo for range fills with overlapping ranges.
* Do not register commands for pasting a cut onto itself.
* Fix cloning checkboxes.
* Make all openers available on the import menu, just in case.
--------------------------------------------------------------------------
Gnumeric 0.99.1
......
2001-12-27 Jody Goldberg <jody@gnome.org>
* plugins/*/plugins.xml.in : make the probable openers available from
the import menu to simplify the user experience until we can revisit
the distinction between import and open.
* src/value-sheet.c (value_area_get_width) : rip out the clipping.
(value_area_get_height) : rip out the clipping. This slows graphs
but fixes countblank, cols, and rows.
* src/sheet-object-widget.c (sheet_widget_checkbox_construct_with_range) :
remove attempt to assign the corner of the current selection.
(sheet_widget_checkbox_clone) : be safer when dealing with checkboxes
without expressions.
(sheet_widget_checkbox_get_ref) : ditto.
* src/sheet-object.c (sheet_object_clone_sheet) : more protection.
* src/commands.c (cmd_area_set_text_redo) : the content list was in
reversed compared to the range list.
(cmd_paste_cut) : don't register a cmd for a paste that does nothing.
* src/gnumeric-canvas.c (gnm_canvas_realize) : formating.
2001-12-26 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=66842
......
2001-12-27 Jody Goldberg <jody@gnome.org>
* plugins/*/plugins.xml.in : make the probable openers available from
the import menu to simplify the user experience until we can revisit
the distinction between import and open.
* src/value-sheet.c (value_area_get_width) : rip out the clipping.
(value_area_get_height) : rip out the clipping. This slows graphs
but fixes countblank, cols, and rows.
* src/sheet-object-widget.c (sheet_widget_checkbox_construct_with_range) :
remove attempt to assign the corner of the current selection.
(sheet_widget_checkbox_clone) : be safer when dealing with checkboxes
without expressions.
(sheet_widget_checkbox_get_ref) : ditto.
* src/sheet-object.c (sheet_object_clone_sheet) : more protection.
* src/commands.c (cmd_area_set_text_redo) : the content list was in
reversed compared to the range list.
(cmd_paste_cut) : don't register a cmd for a paste that does nothing.
* src/gnumeric-canvas.c (gnm_canvas_realize) : formating.
2001-12-26 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=66842
......
2001-12-27 Jody Goldberg <jody@gnome.org>
* plugins/*/plugins.xml.in : make the probable openers available from
the import menu to simplify the user experience until we can revisit
the distinction between import and open.
* src/value-sheet.c (value_area_get_width) : rip out the clipping.
(value_area_get_height) : rip out the clipping. This slows graphs
but fixes countblank, cols, and rows.
* src/sheet-object-widget.c (sheet_widget_checkbox_construct_with_range) :
remove attempt to assign the corner of the current selection.
(sheet_widget_checkbox_clone) : be safer when dealing with checkboxes
without expressions.
(sheet_widget_checkbox_get_ref) : ditto.
* src/sheet-object.c (sheet_object_clone_sheet) : more protection.
* src/commands.c (cmd_area_set_text_redo) : the content list was in
reversed compared to the range list.
(cmd_paste_cut) : don't register a cmd for a paste that does nothing.
* src/gnumeric-canvas.c (gnm_canvas_realize) : formating.
2001-12-26 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=66842
......
......@@ -8,7 +8,8 @@
<attribute name="module_file" value="applix.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="applix" priority="100" probe="TRUE">
<service type="file_opener" id="applix" priority="100" probe="TRUE"
open="TRUE" import="TRUE">
<information>
<_description>Applix (*.as)</_description>
</information>
......
2001-12-27 Jody Goldberg <jody@gnome.org>
* ms-formula-read.c (ms_excel_parse_formula) : enable support for
deleted 3d references.
2001-12-24 Jody Goldberg <jody@gnome.org>
* Release 0.99.1
......
......@@ -1267,6 +1267,13 @@ ms_excel_parse_formula (ExcelSheet const *sheet, guint8 const *mem,
}
break;
#if 0
case FORMULA_PTG_MEM_FUNC:
/* Can I just ignore this ? */
ptg_length = 2 + MS_OLE_GET_GUINT16 (cur);
break;
#endif
case FORMULA_PTG_REF_ERR:
ptg_length = (ver >= MS_BIFF_V8) ? 4 : 3;
parse_list_push_raw (&stack, value_new_error (NULL, gnumeric_err_REF));
......@@ -1398,7 +1405,17 @@ ms_excel_parse_formula (ExcelSheet const *sheet, guint8 const *mem,
if (first) g_free (first);
if (last) g_free (last);
}
break;
case FORMULA_PTG_REF_ERR_3D :
ptg_length = (ver >= MS_BIFF_V8) ? 6 : 17;
parse_list_push_raw (&stack, value_new_error (NULL, gnumeric_err_REF));
break;
case FORMULA_PTG_AREA_ERR_3D :
ptg_length = (ver >= MS_BIFF_V8) ? 10 : 20;
parse_list_push_raw (&stack, value_new_error (NULL, gnumeric_err_REF));
break;
default:
g_warning ("EXCEL : Unhandled PTG 0x%x\n", ptg);
error = TRUE;
......
......@@ -8,7 +8,8 @@
<attribute name="module_file" value="excel.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="excel" priority="100" probe="TRUE">
<service type="file_opener" id="excel" priority="100" probe="TRUE"
open="TRUE" import="TRUE">
<information>
<_description>Microsoft(R) Excel (*.xls)</_description>
</information>
......
......@@ -8,7 +8,7 @@
<attribute name="module_file" value="html.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="html32" priority="100" probe="FALSE">
<service type="file_opener" id="html32" priority="100" probe="FALSE" open="TRUE" import="TRUE">
<information>
<_description>HTML file made by gnumeric</_description>
</information>
......
......@@ -8,7 +8,7 @@
<attribute name="module_file" value="lotus.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="lotus" priority="50" probe="TRUE">
<service type="file_opener" id="lotus" priority="50" probe="TRUE" open="TRUE" import="TRUE">
<information>
<_description>Lotus 123 (*.wk1)</_description>
</information>
......
......@@ -8,7 +8,7 @@
<attribute name="module_file" value="oleo.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="oleo" priority="100" probe="FALSE">
<service type="file_opener" id="oleo" priority="100" probe="FALSE" open="TRUE" import="TRUE">
<information>
<_description>GNU Oleo (*.oleo)</_description>
</information>
......
......@@ -8,7 +8,7 @@
<attribute name="module_file" value="psiconv.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="psiconv" priority="100" probe="TRUE">
<service type="file_opener" id="psiconv" priority="100" probe="TRUE" open="FALSE" import="TRUE">
<information>
<_description>Psion (*.psisheet)</_description>
</information>
......
......@@ -8,7 +8,8 @@
<attribute name="module_file" value="sylk.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="sylk" priority="1" probe="TRUE">
<service type="file_opener" id="sylk" priority="1" probe="TRUE"
open="FALSE" import="TRUE">
<information>
<_description>MultiPlan (SYLK) import</_description>
</information>
......
......@@ -8,7 +8,8 @@
<attribute name="module_file" value="xbase.la:dlname"/>
</loader>
<services>
<service type="file_opener" id="xbase" priority="100" probe="FALSE">
<service type="file_opener" id="xbase" priority="100" probe="FALSE"
open="TRUE" import="TRUE">
<information>
<_description>Xbase (*.dbf) file format</_description>
</information>
......
......@@ -769,6 +769,7 @@ cmd_area_set_text_redo (GnumericCommand *cmd, WorkbookControl *wbc)
/* mark content as dirty */
sheet_flag_status_update_range (me->pos.sheet, r);
}
me->old_content = g_slist_reverse (me->old_content);
/*
* Now that things have been filled in and recalculated we can generate
......@@ -2400,6 +2401,13 @@ cmd_paste_cut (WorkbookControl *wbc, ExprRelocateInfo const *info,
CmdPasteCut *me;
Range r;
g_return_val_if_fail (info != NULL, TRUE);
/* This is vacuous */
if (info->origin_sheet == info->target_sheet &&
info->col_offset == 0 && info->row_offset == 0)
return TRUE;
/* FIXME: Do we want to show the destination range as well ? */
if (descriptor == NULL)
descriptor = g_strdup_printf (_("Moving %s"),
......
......@@ -537,34 +537,29 @@ gnm_canvas_realize (GtkWidget *widget)
GDK_IM_STATUS_NOTHING;
if(widget->style && widget->style->font->type != GDK_FONT_FONTSET)
supported_style &= ~GDK_IM_PREEDIT_POSITION;
supported_style &= ~GDK_IM_PREEDIT_POSITION;
attr->style = style = gdk_im_decide_style (supported_style);
attr->client_window = gcanvas->simple.canvas.layout.bin_window;
switch (style & GDK_IM_PREEDIT_MASK)
{
case GDK_IM_PREEDIT_POSITION:
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET)
{
g_warning ("over-the-spot style requires fontset"); break;
}
gdk_window_get_size (attr->client_window, &width, &height);
height = widget->style->font->ascent +
widget->style->font->descent;
attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
attr->spot_location.x = 0;
attr->spot_location.y = height;
attr->preedit_area.x = 0;
attr->preedit_area.y = 0;
attr->preedit_area.width = width;
attr->preedit_area.height = height;
attr->preedit_fontset = widget->style->font;
break;
}
if ((style & GDK_IM_PREEDIT_MASK) == GDK_IM_PREEDIT_POSITION) {
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) {
g_warning ("over-the-spot style requires fontset");
} else {
gdk_window_get_size (attr->client_window, &width, &height);
height = widget->style->font->ascent +
widget->style->font->descent;
attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
attr->spot_location.x = 0;
attr->spot_location.y = height;
attr->preedit_area.x = 0;
attr->preedit_area.y = 0;
attr->preedit_area.width = width;
attr->preedit_area.height = height;
attr->preedit_fontset = widget->style->font;
}
}
gcanvas->ic = gdk_ic_new (attr, attrmask);
if (gcanvas->ic != NULL) {
......
......@@ -564,9 +564,6 @@ sheet_widget_checkbox_construct_with_range (SheetObjectWidget *sow,
swc->dep.sheet = NULL;
swc->dep.flags = checkbox_get_dep_type ();
if (range == NULL && sheet != NULL)
range = selection_first_range (sheet, NULL, NULL);
if (range != NULL && sheet != NULL) {
CellRef ref;
ref.sheet = sheet;
......@@ -647,8 +644,8 @@ sheet_widget_checkbox_create_widget (SheetObjectWidget *sow, SheetControlGUI *sv
return button;
}
static void
sheet_widget_checkbox_get_ref (SheetWidgetCheckbox *swc, const CellRef **ref)
static CellRef const *
sheet_widget_checkbox_get_ref (SheetWidgetCheckbox const *swc)
{
const ExprTree *tree;
......@@ -659,45 +656,43 @@ sheet_widget_checkbox_get_ref (SheetWidgetCheckbox *swc, const CellRef **ref)
* in the form of : Sheetx!$Col$Row
*/
tree = swc->dep.expression;
*ref = &tree->var.ref;
*ref = (tree != NULL) ? &tree->var.ref : NULL;
}
static SheetObject *
sheet_widget_checkbox_clone (SheetObject const *so, Sheet *new_sheet)
{
SheetObjectWidget *new_sow;
SheetWidgetCheckbox *swc = SHEET_WIDGET_CHECKBOX (so);
const CellRef *ref;
new_sow = sheet_object_widget_clone (so, new_sheet);
sheet_widget_checkbox_get_ref (SHEET_WIDGET_CHECKBOX (so), &ref);
if (ref->sheet == so->sheet) {
Range range;
range.start.col = range.end.col = ref->col;
range.start.row = range.end.row = ref->row;
sheet_widget_checkbox_construct_with_range (new_sow,
new_sheet, &range, swc->label);
} else {
/* When the sheet of the object is different than the sheet of it's
* input, we point the new object to the same input as the source
* checkbox. Chema.
*/
/* I can't clone this objects yet cause i cant test it
* because setting the reference of the checkbox to an object
* outside of the current sheet is crashing. We first need to
* fix the configuration so that it can point to a cell outisde
* the sheet before we can clone. Chema
*/
g_warning ("Cloning for objects that point to an outside of sheet reference "
"not yet implemented\n");
gtk_object_unref (GTK_OBJECT (new_sow));
return NULL;
SheetObjectWidget *new_sow = sheet_object_widget_clone (so, new_sheet);
CellRef const *ref = sheet_widget_checkbox_get_ref (swc);
Range tmp, *r = NULL;
if (ref != NULL) {
if (ref->sheet == so->sheet) {
range.start.col = range.end.col = ref->col;
range.start.row = range.end.row = ref->row;
r = &range;
} else {
/* When the sheet of the object is different than the sheet of it's
* input, we point the new object to the same input as the source
* checkbox. Chema.
*/
/* I can't clone this objects yet cause i cant test it
* because setting the reference of the checkbox to an object
* outside of the current sheet is crashing. We first need to
* fix the configuration so that it can point to a cell outisde
* the sheet before we can clone. Chema
*/
g_warning ("Cloning for objects that point to an outside of sheet reference "
"not yet implemented\n");
gtk_object_unref (GTK_OBJECT (new_sow));
return NULL;
}
}
sheet_widget_checkbox_construct_with_range (new_sow,
new_sheet, r, swc->label);
SHEET_WIDGET_CHECKBOX (new_sow)->value = swc->value;
return SHEET_OBJECT (new_sow);
......
......@@ -881,6 +881,7 @@ sheet_object_clone_sheet (const Sheet *src, Sheet *dst)
GList *list;
GList *new_list = NULL;
g_return_if_fail (IS_SHEET (dst));
g_return_if_fail (dst->sheet_objects == NULL);
list = src->sheet_objects;
......
......@@ -95,7 +95,6 @@ value_area_get_width (EvalPos const *ep, Value const *v)
if (v->type == VALUE_CELLRANGE) {
RangeRef const *r = &v->v_range.cell;
Sheet const *sheeta = eval_sheet (r->a.sheet, ep->sheet);
int ans = r->b.col - r->a.col;
if (r->a.col_relative) {
......@@ -103,20 +102,12 @@ value_area_get_width (EvalPos const *ep, Value const *v)
ans -= ep->eval.col;
} else if (r->b.col_relative)
ans += ep->eval.col;
if (ans < 0)
ans = -ans;
/* FIXME : this is just plain wrong, it is only true for ranges
* starting at 0. However, it has been here so long that I
* don't want to change it until after release. */
/* FIXME: 3D references, will not clip correctly */
if (sheeta && sheeta->cols.max_used < ans) /* Clip */
ans = sheeta->cols.max_used;
return ans + 1;
} else if (v->type == VALUE_ARRAY)
return v->v_array.x;
else
return 1;
return 1;
}
int
......@@ -126,7 +117,6 @@ value_area_get_height (EvalPos const *ep, Value const *v)
if (v->type == VALUE_CELLRANGE) {
RangeRef const *r = &v->v_range.cell;
Sheet const *sheeta = eval_sheet (r->a.sheet, ep->sheet);
int ans = r->b.row - r->a.row;
if (r->a.row_relative) {
......@@ -137,17 +127,10 @@ value_area_get_height (EvalPos const *ep, Value const *v)
if (ans < 0)
ans = -ans;
/* FIXME : this is just plain wrong, it is only true for ranges
* starting at 0. However, it has been here so long that I
* don't want to change it until after release. */
/* FIXME: 3D references, will not clip correctly */
if (sheeta && sheeta->rows.max_used < ans) /* Clip */
ans = sheeta->rows.max_used;
return ans + 1;
} else if (v->type == VALUE_ARRAY)
return v->v_array.y;
else
return 1;
return 1;
}
Value const *
......
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