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

Use shift/ctrl space for select col/row/all even though this is just for

2006-04-05  Jody Goldberg <jody@gnome.org>

	* src/wbcg-actions.c : Use shift/ctrl space for select col/row/all
	  even though this is just for show.  The accels are handled
	  in gnumeric-canvas.
	* src/gnumeric-canvas.c (gnm_canvas_key_press) : re-organize to
	  clarify when to handle things.
	(gnm_canvas_colrow_key_press) : new.

2006-04-05  Jody Goldberg <jody@gnome.org>

	* src/wbcg-actions.c (cb_help_docs) : Use 'yelp help:gnumeric'
	* gnumeric.desktop.in (DocPath) : add an entry so that things show up
	  in yelp (at least for suse 10.1)

2006-04-01  Jody Goldberg <jody@gnome.org>

	http://bugzilla.gnome.org/show_bug.cgi?id=336212
	* src/func.c (function_iterate_argument_values) : This is ugly but it
	  seems to do the right thing.  We can not just assume that args to
	  vararg functions should be evaluated as non-scalars.  It is more
	  subtle.  Simple range_refs (direct or via a name) are non-scalar,
	  but general expressions that use a range (A1:A10=3) evaluate
	  depending on the top level mode, and honor implicit
	  intersecion/iteration.

	* src/position.h : Replace the cols/rows elemnts of GnmEvalPos with a
	  GnmExprArrayCorner pointer.  This allows us to differentiate normal
	  evaluation and singleton arrays.  As a side benefit it uses less
	  memory no 32bit architecture which is important as long as we still
	  use recusion for the recalc queue.

	* src/position.c (eval_pos_init) : adjust to GnmEvalPos change.
	(eval_pos_init_pos) : ditto.
	(eval_pos_init_dep) : ditto.
	(eval_pos_init_cell) : ditto.
	(eval_pos_init_sheet) : ditto.
	* src/expr.c (gnm_expr_eval) : ditto.
	* src/func-builtin.c (gnumeric_table_link) : ditto.
	(gnumeric_table) : ditto.
	* src/dependent.c (link_expr_dep) : ditto.
	* plugins/fn-lookup/functions.c (gnumeric_row) : ditto.
	(gnumeric_col) : ditto.

2006-04-01  Jody Goldberg <jody@gnome.org>

	* src/xml-sax-write.c : Add include to suppress warning.
parent 80e13711
......@@ -11,6 +11,14 @@ Release Critical
http://bugzilla.gnome.org/show_bug.cgi?id=322096
- mis-export of array expr
Worries
-------
: provide undo for dropped objects from sheet_objects_clear
: undo of pasting copy/cut of objects
: undo of cell range cut over clipboard
: Select graph, Copy, and paste to Emacs: used to crash, but now it
just g_barfs and pastes empty string.
http://bugzilla.gnome.org/show_bug.cgi?id=317662
* Double borders in rtl
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286131
......@@ -61,17 +69,6 @@ Pending Patches
---------------
http://bugzilla.gnome.org/show_bug.cgi?id=310354
- autopackage patches {rob}
- Meta Data
: Patches for metadata dialog {etrunko}
: Patches to use GsfDocMetaData {jody}
Worries
-------
: provide undo for dropped objects from sheet_objects_clear
: undo of pasting copy/cut of objects
: undo of cell range cut over clipboard
: Select graph, Copy, and paste to Emacs: used to crash, but now it
just g_barfs and pastes empty string.
-------------------------------------------------------------------------------
Blocked Patches
......@@ -84,16 +81,8 @@ Blocked Patches
Architecture Changes
--------------------
- R1C1 (DONE)
- repeat (http://bugzilla.gnome.org/show_bug.cgi?id=143244) (DONE)
- ssconvert for non-gnome (DONE)
- Merge wb_control_init_state and wb_control_set_view
- accelerators
: Looks like ctrl-~ is General not number
: Can not replicate ctrl-! as accounting with 2k or xp, check 2003
: Make ctrl-space and shift-space work for range selection
1) things to move into libgoffice
1.1) plugin-manager dialog
1.2) doc meta data
......@@ -655,13 +644,6 @@ Short Term Goals
not just the end of the selected region
21.28) filter changes should dirty things
22) Add dirty flags to workbook too, adding a sheet should
make workbook dirty not the new sheet.
27) audit all of the export plugins to handle utf8
27.1) latex exporter (DONE 20030611 AJG)
27.2) html exporter (DONE 20050709 JKH)
29) gconf.
29.1) Check for errors (DONE)
29.2) update on remote changes
......@@ -720,17 +702,6 @@ Short Term Goals
33.3) Draw borders sheared.
33.4) Draw background sheared when border present.
34) Sheet life cycle {Morten}
34.1) Make sheet a proper gobject (DONE)
34.2) Butcher many control methods that watch properties. (DONE)
34.3) Make undo/redo use object properties. (DONE)
34.4) Disengage detach and destroy (DONE)
34.5) Base sheet removal undo on just keeping a ref (DONE)
34.6) Track changes to names during sheet detach for undo. (DONE)
34.7) Track changes to cells during sheet detach for undo. (DONE)
34.8) Track changes to 3d deps during sheet detach for undo. (DONE)
34.9) Rework sheet reorganize dialog to new scheme. (DONE)
35) Accessibility
We can use
http://bugzilla.gnome.org/attachment.cgi?id=47315&action=view
......@@ -766,34 +737,34 @@ auto-fill
---------
- does not resize row/col
- The autocalc label should use a more readable format and should not get
clipped.
- The autocalc label should use a more readable format and should not get
clipped.
- Names
: references in names do not get changed with cut/paste or ins/del row/col.
How to handle relative references in names ?? here.
: Dialog
* We should start with the expr entry set to either the current cell,
or by selecting the first named expression in scope that contains the
current cell.
: Check scoping changes. (DONE)
: Handle pasting an expression with an un-qualified sheet local name into
another sheet
- Names
: references in names do not get changed with cut/paste or ins/del row/col.
How to handle relative references in names ?? here.
: Dialog
* We should start with the expr entry set to either the current cell,
or by selecting the first named expression in scope that contains the
current cell.
: Check scoping changes. (DONE)
: Handle pasting an expression with an un-qualified sheet local name into
another sheet
- clean up the range_list codes to differentiate a list of ranges from a list
of cellranges.
- clean up the range_list codes to differentiate a list of ranges from a list
of cellranges.
- The max row/col canvas scroll size is still hard coded.
- The max row/col canvas scroll size is still hard coded.
- Entering text of the form scheme://blah or a@b.c should insert hyperlinks
- let's add simple commands like inc/dec font size and things like that.
- Entering text of the form scheme://blah or a@b.c should insert hyperlinks
- let's add simple commands like inc/dec font size and things like that.
- Auto resize needs to handle empty cells.
- Auto resize needs to handle empty cells.
- Styles
: improve uniform_get to handle full sheet more quickly.
: Borders
* use new border code for cell format dialog (possibly preview-grid)
- Styles
: improve uniform_get to handle full sheet more quickly.
: Borders
* use new border code for cell format dialog (possibly preview-grid)
Dialogs
-------
......@@ -813,6 +784,6 @@ Import/Export
Clipboard
---------
- Fall back to string import when incoming html and OpenOffice doesn't
contain tables. (DONE)
- May be not export html as table when just one cell is selected.
- Fall back to string import when incoming html and OpenOffice doesn't
contain tables. (DONE)
- May be not export html as table when just one cell is selected.
2006-04-05 Jody Goldberg <jody@gnome.org>
* src/wbcg-actions.c : Use shift/ctrl space for select col/row/all
even though this is just for show. The accels are handled
in gnumeric-canvas.
* src/gnumeric-canvas.c (gnm_canvas_key_press) : re-organize to
clarify when to handle things.
(gnm_canvas_colrow_key_press) : new.
2006-04-05 Jody Goldberg <jody@gnome.org>
* src/wbcg-actions.c (cb_help_docs) : Use 'yelp help:gnumeric'
* gnumeric.desktop.in (DocPath) : add an entry so that things show up
in yelp (at least for suse 10.1)
2006-04-01 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=336212
* src/func.c (function_iterate_argument_values) : This is ugly but it
seems to do the right thing. We can not just assume that args to
vararg functions should be evaluated as non-scalars. It is more
subtle. Simple range_refs (direct or via a name) are non-scalar,
but general expressions that use a range (A1:A10=3) evaluate
depending on the top level mode, and honor implicit
intersecion/iteration.
* src/position.h : Replace the cols/rows elemnts of GnmEvalPos with a
GnmExprArrayCorner pointer. This allows us to differentiate normal
evaluation and singleton arrays. As a side benefit it uses less
memory no 32bit architecture which is important as long as we still
use recusion for the recalc queue.
* src/position.c (eval_pos_init) : adjust to GnmEvalPos change.
(eval_pos_init_pos) : ditto.
(eval_pos_init_dep) : ditto.
(eval_pos_init_cell) : ditto.
(eval_pos_init_sheet) : ditto.
* src/expr.c (gnm_expr_eval) : ditto.
* src/func-builtin.c (gnumeric_table_link) : ditto.
(gnumeric_table) : ditto.
* src/dependent.c (link_expr_dep) : ditto.
* plugins/fn-lookup/functions.c (gnumeric_row) : ditto.
(gnumeric_col) : ditto.
2006-04-01 Jody Goldberg <jody@gnome.org>
* src/xml-sax-write.c : Add include to suppress warning.
2006-04-05 Morten Welinder <terra@gnome.org>
* src/search.c (gnm_search_replace_cell): Only force strings to
......
......@@ -22,6 +22,10 @@ Jody:
* Dup sheet props when duping a sheet.
* Adding an autofilter dirties the sheet.
* Move Workbook::uri and ::dirty into GODoc
* Handle inconsistency with XL's model of vararg eval. [#336212]
* Export underlines to html.
* handle ctrl/shift space during rangeselection.
* Fix path to docs.
Klokan Pridal:
* Implement xml saving/loading of "protected" attribute. [#334257]
......
2006-04-05 Jody Goldberg <jody@gnome.org>
* src/wbcg-actions.c : Use shift/ctrl space for select col/row/all
even though this is just for show. The accels are handled
in gnumeric-canvas.
* src/gnumeric-canvas.c (gnm_canvas_key_press) : re-organize to
clarify when to handle things.
(gnm_canvas_colrow_key_press) : new.
2006-04-05 Jody Goldberg <jody@gnome.org>
* src/wbcg-actions.c (cb_help_docs) : Use 'yelp help:gnumeric'
* gnumeric.desktop.in (DocPath) : add an entry so that things show up
in yelp (at least for suse 10.1)
2006-04-01 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=336212
* src/func.c (function_iterate_argument_values) : This is ugly but it
seems to do the right thing. We can not just assume that args to
vararg functions should be evaluated as non-scalars. It is more
subtle. Simple range_refs (direct or via a name) are non-scalar,
but general expressions that use a range (A1:A10=3) evaluate
depending on the top level mode, and honor implicit
intersecion/iteration.
* src/position.h : Replace the cols/rows elemnts of GnmEvalPos with a
GnmExprArrayCorner pointer. This allows us to differentiate normal
evaluation and singleton arrays. As a side benefit it uses less
memory no 32bit architecture which is important as long as we still
use recusion for the recalc queue.
* src/position.c (eval_pos_init) : adjust to GnmEvalPos change.
(eval_pos_init_pos) : ditto.
(eval_pos_init_dep) : ditto.
(eval_pos_init_cell) : ditto.
(eval_pos_init_sheet) : ditto.
* src/expr.c (gnm_expr_eval) : ditto.
* src/func-builtin.c (gnumeric_table_link) : ditto.
(gnumeric_table) : ditto.
* src/dependent.c (link_expr_dep) : ditto.
* plugins/fn-lookup/functions.c (gnumeric_row) : ditto.
(gnumeric_col) : ditto.
2006-04-01 Jody Goldberg <jody@gnome.org>
* src/xml-sax-write.c : Add include to suppress warning.
2006-04-05 Morten Welinder <terra@gnome.org>
* src/search.c (gnm_search_replace_cell): Only force strings to
......
......@@ -13,4 +13,5 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=Gnumeric
X-GNOME-Bugzilla-Version=BUGZILLAVERSION
X-GNOME-Bugzilla-Component=
DocPath=gnumeric
MimeType=application/x-gnumeric;application/vnd.ms-excel;application/excel;application/msexcel;application/x-excel;application/x-ms-excel;application/x-msexcel;application/x-xls;application/xls;application/x-dos_ms_excel;zz-application/zz-winassoc-xls;application/csv;application/tab-separated-values;text/comma-separated-values;text/csv;text/spreadsheet;text/tab-separated-values;text/x-comma-separated-values;application/vnd.lotus-1-2-3;application/x-123;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/x-applix-spreadsheet;application/x-mps;application/x-oleo;application/x-planperfect;application/x-quattropro;application/x-sc;application/x-sylk;application/x-xbase;
......@@ -952,8 +952,11 @@ gnumeric_column (FunctionEvalInfo *ei, GnmValue const * const *args)
if (ref == NULL) {
col = ei->pos->eval.col + 1; /* user visible counts from 0 */
width = ei->pos->cols;
height= ei->pos->rows;
if (ei->pos->array != NULL) {
width = ei->pos->array->cols;
height= ei->pos->array->rows;
} else
return value_new_int (col);
} else if (ref->type == VALUE_CELLRANGE) {
Sheet *tmp;
GnmRange r;
......@@ -1130,8 +1133,11 @@ gnumeric_row (FunctionEvalInfo *ei, GnmValue const * const *args)
if (ref == NULL) {
row = ei->pos->eval.row + 1; /* user visible counts from 0 */
width = ei->pos->cols;
height= ei->pos->rows;
if (ei->pos->array != NULL) {
width = ei->pos->array->cols;
height= ei->pos->array->rows;
} else
return value_new_int (row);
} else if (ref->type == VALUE_CELLRANGE) {
Sheet *tmp;
GnmRange r;
......
......@@ -6,7 +6,7 @@ SUBDIRS = tools cut-n-paste-code
lib_LTLIBRARIES = libspreadsheet.la
bin_PROGRAMS =
bin_PROGRAMS = harness
check_PROGRAMS =
if WITH_GTK
......@@ -342,6 +342,11 @@ test_pango_LDFLAGS = -export-dynamic
test_pango_SOURCES = \
test-pango.c
# Some wrapper code to serve as a stub program for testing
harness_LDADD = $(gnumeric_LDADD)
harness_LDFLAGS = -export-dynamic
harness_SOURCES = test-harness.c
# Rules for the marshalers code:
GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=gnm_
......@@ -362,12 +367,12 @@ gnumeric-paths.h: Makefile
echo '#ifndef GNUMERIC_PATHS_H'; \
echo '#define GNUMERIC_PATHS_H'; \
echo ''; \
echo '#define GNUMERIC_PREFIX "$(prefix)"'; \
echo '#define GNUMERIC_SYSCONFDIR "$(sysconfdir)"'; \
echo '#define GNUMERIC_DATADIR "$(gnumeric_datadir)"'; \
echo '#define GNUMERIC_LIBDIR "$(gnumeric_libdir)"'; \
echo '#define GNUMERIC_ICONDIR "$(gnumeric_icondir)"'; \
echo '#define GNUMERIC_LOCALEDIR "$(gnumeric_localedir)"'; \
echo '#define GNUMERIC_PREFIX "$(prefix)"'; \
echo '#define GNUMERIC_SYSCONFDIR "$(sysconfdir)"'; \
echo '#define GNUMERIC_DATADIR "$(gnumeric_datadir)"'; \
echo '#define GNUMERIC_LIBDIR "$(gnumeric_libdir)"'; \
echo '#define GNUMERIC_ICONDIR "$(gnumeric_icondir)"'; \
echo '#define GNUMERIC_LOCALEDIR "$(gnumeric_localedir)"'; \
echo ''; \
echo '#endif /* GNUMERIC_PATHS_H */'; \
) >$@
......
......@@ -2,7 +2,7 @@
/*
* dependent.c: Manage calculation dependencies between objects
*
* Copyright (C) 2000-2005
* Copyright (C) 2000-2006
* Jody Goldberg (jody@gnome.org)
* Morten Welinder (terra@gnome.org)
*
......@@ -778,8 +778,7 @@ link_expr_dep (GnmEvalPos *ep, GnmExpr const *tree)
case GNM_EXPR_OP_ARRAY_CORNER: {
GnmEvalPos pos = *ep;
pos.cols = tree->array_corner.cols;
pos.rows = tree->array_corner.rows;
pos.array = &tree->array_corner;
/* Corner cell depends on the contents of the expr */
return link_expr_dep (&pos, tree->array_corner.expr);
}
......
......@@ -1313,8 +1313,7 @@ gnm_expr_eval (GnmExpr const *expr, GnmEvalPos const *pos,
case GNM_EXPR_OP_ARRAY_CORNER: {
GnmEvalPos range_pos = *pos;
range_pos.cols = expr->array_corner.cols;
range_pos.rows = expr->array_corner.rows;
range_pos.array = &expr->array_corner;
/* Release old value if necessary */
a = expr->array_corner.value;
......
......@@ -142,16 +142,18 @@ gnumeric_table_link (FunctionEvalInfo *ei)
rr.b.col_relative = rr.b.row_relative = FALSE;
rr.a.sheet = rr.b.sheet = dep->sheet;
g_return_val_if_fail (ei->pos->array != NULL, DEPENDENT_IGNORE_ARGS);
g_return_val_if_fail (ei->pos->eval.col > 0, DEPENDENT_IGNORE_ARGS);
rr.a.col = rr.b.col = ei->pos->eval.col - 1;
rr.a.row = ei->pos->eval.row;
rr.b.row = rr.a.row + ei->pos->rows - 1;
rr.b.row = rr.a.row + ei->pos->array->rows - 1;
dependent_add_dynamic_dep (dep, &rr);
g_return_val_if_fail (ei->pos->eval.row > 0, DEPENDENT_IGNORE_ARGS);
rr.a.row = rr.b.row = ei->pos->eval.row - 1;
rr.a.col = ei->pos->eval.col;
rr.b.col = rr.a.col + ei->pos->cols - 1;
rr.b.col = rr.a.col + ei->pos->array->cols - 1;
dependent_add_dynamic_dep (dep, &rr);
return DEPENDENT_IGNORE_ARGS;
......@@ -201,8 +203,8 @@ gnumeric_table (FunctionEvalInfo *ei, int argc, const GnmExprConstPtr *argv)
} else
in[2] = NULL;
res = value_new_array (ei->pos->cols, ei->pos->rows);
for (x = ei->pos->cols ; x-- > 0 ; ) {
res = value_new_array (ei->pos->array->cols, ei->pos->array->rows);
for (x = ei->pos->array->cols ; x-- > 0 ; ) {
x_iter = sheet_cell_get (ei->pos->sheet,
x + ei->pos->eval.col, ei->pos->eval.row-1);
if (NULL == x_iter)
......@@ -212,7 +214,7 @@ gnumeric_table (FunctionEvalInfo *ei, int argc, const GnmExprConstPtr *argv)
in[0]->value = value_dup (x_iter->value);
dependent_queue_recalc (&in[0]->base);
}
for (y = ei->pos->rows ; y-- > 0 ; ) {
for (y = ei->pos->array->rows ; y-- > 0 ; ) {
y_iter = sheet_cell_get (ei->pos->sheet,
ei->pos->eval.col-1, y + ei->pos->eval.row);
if (NULL == y_iter)
......
......@@ -88,7 +88,7 @@ func_def_cmp (gconstpointer a, gconstpointer b)
}
static char const *
check_name_match (char const *name, char const *description, char const*tag)
check_name_match (char const *name, char const *description, char const *tag)
{
unsigned tag_len = strlen (tag);
char const *tmp;
......@@ -175,7 +175,7 @@ cb_dump_usage (gpointer key, Symbol *sym, FILE *out)
}
static char *
split_at_colon (const char *s, char **rest)
split_at_colon (char const *s, char **rest)
{
char *dup = g_strdup (s);
char *colon = strchr (dup, ':');
......@@ -535,7 +535,7 @@ extract_arg_types (GnmFunc *def)
static GnmValue *
error_function_no_full_info (FunctionEvalInfo *ei,
int argc,
const GnmExprConstPtr *argv)
GnmExprConstPtr const *argv)
{
return value_new_error (ei->pos, _("Function implementation not available."));
}
......@@ -709,7 +709,7 @@ gnm_func_add (GnmFuncGroup *fn_group,
static GnmValue *
unknownFunctionHandler (FunctionEvalInfo *ei,
int argc,
const GnmExprConstPtr *argv)
GnmExprConstPtr const *argv)
{
return value_new_error_NAME (ei->pos);
}
......@@ -795,7 +795,7 @@ gnm_func_add_placeholder (Workbook *scope,
/* See type GnmParseFunctionHandler */
GnmExpr const *
gnm_func_placeholder_factory (const char *name,
gnm_func_placeholder_factory (char const *name,
GnmExprList *args,
G_GNUC_UNUSED GnmExprConventions const *convs)
{
......@@ -964,8 +964,7 @@ function_def_get_arg_type_string (GnmFunc const *fn_def,
* Return value: the name of the argument (must be freed)
**/
char*
function_def_get_arg_name (GnmFunc const *fn_def,
int arg_idx)
function_def_get_arg_name (GnmFunc const *fn_def, int arg_idx)
{
char **names, **o_names;
char *name;
......@@ -1025,7 +1024,7 @@ free_values (GnmValue **values, int top)
**/
GnmValue *
function_call_with_exprs (FunctionEvalInfo *ei,
int argc, const GnmExprConstPtr *argv,
int argc, GnmExprConstPtr const *argv,
GnmExprEvalFlags flags)
{
GnmFunc const *fn_def;
......@@ -1058,7 +1057,7 @@ function_call_with_exprs (FunctionEvalInfo *ei,
char arg_type = fn_def->fn.args.arg_types[i];
/* expr is always non-null, missing args are encoded as
* const = empty */
const GnmExpr *expr = argv[i];
GnmExpr const *expr = argv[i];
if (arg_type == 'A' || arg_type == 'r') {
if (GNM_EXPR_GET_OPER (expr) == GNM_EXPR_OP_CELLREF) {
......@@ -1448,7 +1447,7 @@ function_iterate_argument_values (GnmEvalPos const *ep,
FunctionIterateCB callback,
void *callback_closure,
int argc,
const GnmExprConstPtr *argv,
GnmExprConstPtr const *argv,
gboolean strict,
CellIterFlags iter_flags)
{
......@@ -1456,7 +1455,7 @@ function_iterate_argument_values (GnmEvalPos const *ep,
int a;
for (a = 0; result == NULL && a < argc; a++) {
const GnmExpr *expr = argv[a];
GnmExpr const *expr = argv[a];
GnmValue *val;
if (iter_flags & CELL_ITER_IGNORE_SUBTOTAL &&
......@@ -1491,7 +1490,7 @@ function_iterate_argument_values (GnmEvalPos const *ep,
* will do implicit intersection in non-array mode */
if (GNM_EXPR_GET_OPER (expr) == GNM_EXPR_OP_CONSTANT)
val = value_dup (expr->constant.value);
else if (ep->cols > 1 || ep->rows > 1)
else if (ep->array != NULL)
val = gnm_expr_eval (expr, ep,
GNM_EXPR_EVAL_PERMIT_EMPTY | GNM_EXPR_EVAL_PERMIT_NON_SCALAR);
else
......
This diff is collapsed.
......@@ -39,7 +39,6 @@ struct _GnmCanvas {
/* IM */
guint reseting_im :1; /* quick hack to keep gtk_im_context_reset from starting an edit */
guint mask_state;
guint preedit_length;
GtkIMContext *im_context;
PangoAttrList *preedit_attrs;
......
......@@ -1080,7 +1080,8 @@ cb_control_point_event (FooCanvasItem *ctrl_pt, GdkEvent *event, GnmPane *pane)
gnm_simple_canvas_ungrab (ctrl_pt, event->button.time);
gnm_canvas_slide_stop (gcanvas);
control_point_set_cursor (scg, ctrl_pt);
if (pane->drag.had_motion)
if (idx == 8) { /* fake event generated by the dnd code */
} else if (pane->drag.had_motion)
scg_objects_drag_commit (scg, idx,
pane->drag.created_objects);
else if (pane->drag.created_objects && idx == 7) {
......
......@@ -761,6 +761,17 @@ gnm_style_is_element_set (GnmStyle const *style, GnmStyleElement elem)
return elem_is_set (style, elem);
}
/**
* gnm_style_is_complete :
* @style : #GnmStyle
*
* Returns TRUE if all elements are set.
**/
gboolean
gnm_style_is_complete (GnmStyle const *style)
{
}
void
gnm_style_unset_element (GnmStyle *style, GnmStyleElement elem)
{
......@@ -813,6 +824,17 @@ gnm_style_set_font_color (GnmStyle *style, GnmColor *col)
style->color.font = col;
gnm_style_pango_clear (style);
}
/**
* gnm_style_set_back_color :
* @style : #GnmStyle
* @col : #GnmColor
*
* Assigns @col as the background of @style.
*
* NOTE : the background colour is only visibile if
* GnmStyle::pattern > 0
**/
void
gnm_style_set_back_color (GnmStyle *style, GnmColor *col)
{
......
......@@ -79,9 +79,10 @@ gboolean gnm_style_equal_header (GnmStyle const *a, GnmStyle const *b,
guint gnm_style_hash (gconstpointer style);
guint gnm_style_hash_XL (gconstpointer style);
gboolean gnm_style_is_element_set (GnmStyle const *style, GnmStyleElement elem);
unsigned int gnm_style_find_conflicts (GnmStyle *accum, GnmStyle const *overlay,
unsigned int conflicts);
gboolean gnm_style_is_complete (GnmStyle const *style);
gboolean gnm_style_is_element_set (GnmStyle const *style, GnmStyleElement elem);
void gnm_style_unset_element (GnmStyle *style, GnmStyleElement elem);
void gnm_style_set_font_color (GnmStyle *style, GnmColor *col);
void gnm_style_set_back_color (GnmStyle *style, GnmColor *col);
......
......@@ -39,9 +39,9 @@ eval_pos_init (GnmEvalPos *ep, Sheet *sheet, int col, int row)
ep->eval.col = col;
ep->eval.row = row;
ep->cols = ep->rows = 1;
ep->sheet = sheet;
ep->dep = NULL;
ep->array = NULL;
return ep;
}
......@@ -54,9 +54,9 @@ eval_pos_init_pos (GnmEvalPos *ep, Sheet *sheet, GnmCellPos const *pos)
g_return_val_if_fail (pos != NULL, NULL);
ep->eval = *pos;
ep->cols = ep->rows = 1;
ep->sheet = sheet;
ep->dep = NULL;
ep->array = NULL;
return ep;
}
......@@ -71,9 +71,9 @@ eval_pos_init_dep (GnmEvalPos *ep, GnmDependent const *dep)
ep->eval = DEP_TO_CELL (dep)->pos;
else
ep->eval.col = ep->eval.row = 0;
ep->cols = ep->rows = 1;
ep->sheet = dep->sheet;
ep->dep = (GnmDependent *)dep;
ep->dep = (GnmDependent *)dep;
ep->array = NULL;
return ep;
}
......@@ -85,9 +85,9 @@ eval_pos_init_cell (GnmEvalPos *ep, GnmCell const *cell)
g_return_val_if_fail (cell != NULL, NULL);
ep->eval = cell->pos;
ep->cols = ep->rows = 1;
ep->sheet = cell->base.sheet;
ep->dep = (GnmDependent *)CELL_TO_DEP (cell);
ep->array = NULL;
return ep;
}
......@@ -99,9 +99,9 @@ eval_pos_init_sheet (GnmEvalPos *ep, Sheet *sheet)
g_return_val_if_fail (IS_SHEET (sheet), NULL);
ep->eval.col = ep->eval.row = 0;
ep->cols = ep->rows = 1;
ep->sheet = sheet;
ep->dep = NULL;
ep->dep = NULL;
ep->array = NULL;
return ep;
}
......
......@@ -4,10 +4,10 @@
#include "gnumeric.h"
struct _GnmEvalPos {
GnmCellPos eval;
int cols, rows; /* for arrays */
Sheet *sheet;
GnmDependent *dep; /* optionally NULL */
GnmCellPos eval;
Sheet *sheet;
GnmDependent *dep; /* optionally NULL */
GnmExprArrayCorner const *array; /* non-NULL if top level is array */
};
struct _GnmParsePos {
......
......@@ -6,7 +6,7 @@
* Miguel de Icaza (miguel@gnu.org)
* Jody Goldberg (jody@gnome.org)
*
* (C) 1999-2001 Jody Goldberg
* (C) 1999-2006 Jody Goldberg
*/
#include <gnumeric-config.h>
#include <glib/gi18n.h>
......@@ -990,8 +990,7 @@ selection_apply (SheetView *sv, SelectionApplyFunc const func,
}
}
typedef struct
{
typedef struct {
GString *str;
gboolean include_sheet_name_prefix;
} selection_to_string_closure;
......
......@@ -518,9 +518,9 @@ scg_colrow_select (SheetControlGUI *scg, gboolean is_cols,
SheetView *sv = sc_view (sc);
gboolean const rangesel = wbcg_rangesel_possible (scg->wbcg);
if (!rangesel)
if (!wbcg_edit_finish (scg->wbcg, WBC_EDIT_ACCEPT, NULL))
return FALSE;
if (!rangesel &&
!wbcg_edit_finish (scg->wbcg, WBC_EDIT_ACCEPT, NULL))
return FALSE;
if (modifiers & GDK_SHIFT_MASK) {
if (rangesel) {
......@@ -3329,9 +3329,7 @@ void
scg_drag_data_received (SheetControlGUI *scg, GtkWidget *source_widget,
double x, double y, GtkSelectionData *selection_data)
{
gchar *target_type;
target_type = gdk_atom_name (selection_data->target);
gchar *target_type = gdk_atom_name (selection_data->target);
if (!strcmp (target_type, "text/uri-list")) {
scg_drag_receive_uri_list (scg, x, y,
......
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#include <gnumeric-config.h>
#include <glib/gi18n.h>
#include "gnumeric.h"
#include "libgnumeric.h"
#include "gnumeric-paths.h"
#include "gnm-plugin.h"
#include "cell.h"
#include "command-context.h"
#include "command-context-stderr.h"
#include "value.h"
#include "workbook-view.h"
#include "workbook.h"
#include "sheet.h"
#include "sheet-style.h"
#include "style.h"
#include "style-color.h"
#include <goffice/app/file.h>
#include <goffice/app/io-context.h>
#include <goffice/app/go-cmd-context.h>
#include <goffice/utils/go-file.h>
#include <gsf/gsf-utils.h>
#include <string.h>
#ifdef G_OS_WIN32
#define EXT_OPT(a,b,c,d,e,f,g) {a, b, c, d, NULL, f, g}
#else
#define EXT_OPT(a,b,c,d,e,f,g) {a, b, c, d, e, f, g}
#endif
static GOptionEntry
test_options[] = {
EXT_OPT ("lib-dir", 'L', 0, G_OPTION_ARG_STRING, &gnumeric_lib_dir,
N_("Set the root library directory"), NULL),
EXT_OPT ("data-dir", 'D', 0, G_OPTION_ARG_STRING, &gnumeric_data_dir,
N_("Adjust the root data directory"), NULL),
{ NULL }
};
int
main (int argc, char const *argv [])
{
ErrorInfo *plugin_errs;
int res = 0;
GOCmdContext *cc;
GError *error = NULL;
GOptionContext *ctx;
gchar const **args = go_shell_argv_to_glib_encoding (argc, argv);
gnm_pre_parse_init (args[0]);
#ifdef G_OS_WIN32
test_options[1].arg = &gnumeric_lib_dir;
test_options[2].arg = &gnumeric_data_dir;
#endif
ctx = g_option_context_new ("");
g_option_context_add_main_entries (ctx, test_options, GETTEXT_PACKAGE);
g_option_context_parse (ctx, &argc, (gchar ***) &args, &error);
gnm_common_init (FALSE);
cc = cmd_context_stderr_new ();
gnm_plugins_init (GO_CMD_CONTEXT (cc));