Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Noel,

2011/12/18 Noel Grandin <noelgrandin@gmail.com>:
Hi

The problem with doing the logic in ScTable is that an ScPostIt on an
otherwise empty cell still needs an ScNoteCell object to exist.

No. With this work we want to get rid of ScNoteCell. That is one of
the goals of this work.

And the allocation and free'ing of Sc*Cell objects happens primarily
in ScColumn.

Yes but that is not a problem for our ScNoteCell storage.

And all of the ScDocument/ScTable/ScColumn classes call one another
all over the place, there is no strict hierarchy.

There is one. ScDocument->ScTable->ScColumn. For all calls coming from
outside like ScDocShell, ScDocFunc or ScTabViewShell only ScDocument
is visible and all calls changing the table structure need to go
through ScDocument.


As I said, I have a patch that puts a std::map in ScTable and performs
most of the notes logic in ScColumn.

Putting the nodes logic into ScTable sounds good but I think we should
try to get rid of as many notes logic as possible in ScColumn and
ScBaseCell, ... We should handle notes independant drom cells.


I am prepared to finish debugging that patch and post it if the
community decides that is still the way forward.

But even with putting the notes logic next to the cell logic in
ScColumn, the solution still looks extremely brittle to me.
Moving the notes allocate/free logic from ScColumn to ScTable would
only make it worse.

Why? If you need some help or advice please give some code pointers
otherwise it is extremelly difficult to help with such sentences.


To my mind, a better solution would look something like this:
- create an ScCellManager class
- move the cell data arrays from ScColumn to ScCellManager
- in pieces, move API from Sc*Cell to ScCellManager until nothing else
has direct access to the Sc*Cell classes
- then change the internal representation inside ScCellManager to your
hearts content

We are already on our way to change the storage structure and the
internal representation of cells. This is only one little step we need
to perform before we can make the big change to Ixion.

Markus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.