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.
And the allocation and free'ing of Sc*Cell objects happens primarily
in ScColumn.
And all of the ScDocument/ScTable/ScColumn classes call one another
all over the place, there is no strict hierarchy.
As I said, I have a patch that puts a std::map in ScTable and performs
most of the notes logic in ScColumn.
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.
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
Regards, Noel Grandin
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.