Re: the 'locked' property on cells

Floris Kraak wrote:


I've been asked by my employer to look into implementing
read only cells in gnumeric. This functionality seems
to be what the 'locked' property of a cell should be doing
except that isn't fully implemented.
Furthermore, it also seems to depend on having the ability to
'protect' a worksheet which isn't possible using the current user
interface. (at least, in the stable gnumeric version)

Any such major work should be done in the 1.1.x (gnome2) branch. The 1.1.x version allows protecting of a worksheet using the Format->Workbook menu item. Select the protection tab and check the protected checkbox.

You will notice that you can't edit cells directly anymore, although you are free to clobber cells with various tools.

So I have a few questions which basically boil down to: 'How hard
is it to implement' and 'where do I start'. There should be an
user-generated event somewhere going off when a user tries to
access a cell I suppose but where and how do I catch it?

Life would be easy if there were such an event. But there isn't, ie. currently you would need to find any place that potentially changes a cell...

What tools
should I use to change things (do I need glade to add ui stuff? or is
vi sufficient?)

Most of the current dialogs were handcrafted using emacs to write glade files... Glade-2 seems to have various issues that make it simpler (IMHO) to use an editor.

Finally, I'd like to add this stuff to the stable version (or at
least, have a patch that applies against that) but I'm not sure
if that is entirely possible. However, given the fact that 1.0.7
compiles and the CVS version doesn't even have a configure script
let alone satisfied build dependencies I'd still like to try using

Pardon? The cvs version configures ( and compiles just fine. There are significant differences between the 2 versions and doing this in 1.0.7 will be essentially a separate project from 1.1.x.

This leads me to ask what the status is on these features (the
protected worksheet and locked cells) in the development branch - is it ok to start work in the stable tree or would I be colliding with
someone else's work then?

In the development branch cell protection is implemented as far as the direct editing is concerned. It will probably only take me a few hours to fix the analysis tools to watch for locked cells. (In the stable version this would take significantly longer.)

Floris Kraak


Prof. Dr. Andreas J. Guelzow

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]