Re: [patch] Sleeping cells, correction
- From: Eric Methorst <arnalon xs4all nl>
- To: Jody Goldberg <jody gnome org>, Floris Kraak <floris snow nl>
- Cc: gnumeric-list gnome org, joost snow nl
- Subject: Re: [patch] Sleeping cells, correction
- Date: Sun, 14 Jul 2002 22:51:43 +0200
b.t.w.... am I supposed to reply to the entire mailing list here?
On Saturday 13 July 2002 05:35, Jody Goldberg wrote:
On Fri, Jul 12, 2002 at 12:41:08PM +0200, Floris Kraak wrote:
It seems I send out the wrong patch for sleeping cells so
I am sending you the correct one now.
hmm, an interesting idea.
Definitely not fodder for 1.0 though.
+ if (cell_is_sleeping (cell) ) {
+ if (cell->base.sheet->workbook->update_sleeping == FALSE) {
minor style nit.
Avoid comparing to literal TRUE/FALSE. It can fail depending on how
the flags are stored.
Usually I would write if ( ! expr), but I saw some other code where explicit
checks were made against the boleans; hence... ;-)
(or did I look at the wrong piece of code as an example? )
+ return TRUE;
+ }
+ }
+ else if (cell->base.sheet->workbook->update_only_sleeping == TRUE) {
+ return TRUE;
+ }
+cell_is_sleeping(Cell const *cell)
+{
+ return mstyle_get_content_sleeping(cell_get_mstyle(cell));
}
ouch this gets expensive. The quad tree makes style lookups fast,
but still not something you want to do 1M times.
Can that be done via something like:
cell->mstyle->is_sleeping
directly? Or is there some other means of doing it quickly?
We did talk it over (as it was initially implemented as a property of cell in
the struct in cell.h, but not only did we run into trouble upon saving anbd
loading the file; it logically belongs with other protection properties in
that tab. As they are part of the cell style, so should this one.
At least, that was our opinion. I personally didn't look at the implications
of using a get_style() function.
The main question in my mind is why/how this would be useful.
The notion of a spreadsheet with _partially_ incorrect values is a
little scary.
It is not a _partially_ incorrect value; but a 'explicitly not calculated'
value. Usage for example: to calculate primary keys and other values and use
those as part of an insert statement (or update) in a database. You certainly
donot want any insert untill you're completely done entering all fields. Not
only would this result in database constraint errors, but it might also be
killing for performance.
I might think of a few other reasons for people to want this feature, but I
think that a feature like this might also require that it would be associated
with some sort of default style (a colour perhaps?) that would make it clear
to the user at a glance that there's something special about the cell(s). A
colour might do the trick.
Else you run the risk of having accidentally checked the sleeping box and not
noticing in any way: bug nuisane if that happens to be your salary total...
Suggestions anyone?
--
Eric Methorst
arnalon xs4all nl
http://arnalon.dhs.org
MUD: telnet arnalon.dhs.org:5000
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]