[Libreoffice] [PATCH] removing mpNotes field from ScBaseCell
Markus Mohrhard
markus.mohrhard at googlemail.com
Sun Dec 18 15:11:06 PST 2011
Hello Noel,
2011/12/18 Noel Grandin <noelgrandin at 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
More information about the LibreOffice
mailing list