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 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice