Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-19 Thread Lubos Lunak
On Saturday 17 of December 2011, Noel Grandin wrote: Hi So I've been working on this patch to move mpNotes from ScBaseCell to ScTable, and I got it mostly working. But I was struggling with leaks and getting the lifecycle of the notes to exactly match the lifecycle of the ScBaseCell object.

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-18 Thread Noel Grandin
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

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-18 Thread Markus Mohrhard
Hello Noel, 2011/12/18 Noel Grandin noelgran...@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.

[Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-17 Thread Noel Grandin
Hi So I've been working on this patch to move mpNotes from ScBaseCell to ScTable, and I got it mostly working. But I was struggling with leaks and getting the lifecycle of the notes to exactly match the lifecycle of the ScBaseCell object. So then I had a weird idea - how about if I tied the

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-17 Thread Markus Mohrhard
Hello Noel, So I've been working on this patch to move mpNotes from ScBaseCell to ScTable, and I got it mostly working. But I was struggling with leaks and getting the lifecycle of the notes to exactly match the lifecycle of the ScBaseCell object. I think that we should go another way.

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-17 Thread Noel Grandin
Hi Yeah, that is what I tried the first time. But it turns out to be incredibly hard to keep the lifecycle of the ScBaseCell objects and the lifecycle of the ScPostIt objects tied together, because ScBaseCell and it's child classes get allocated and deallocated in lots of different places, not

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-17 Thread Michael Meeks
Hi Noel, On Sat, 2011-12-17 at 23:01 +0200, Noel Grandin wrote: Yeah, that is what I tried the first time. :-) But it turns out to be incredibly hard to keep the lifecycle of the ScBaseCell objects and the lifecycle of the ScPostIt objects tied together, because ScBaseCell and it's

Re: [Libreoffice] [PATCH] removing mpNotes field from ScBaseCell

2011-12-17 Thread Markus Mohrhard
Hello Noel, 2011/12/17 Noel Grandin noelgran...@gmail.com: Hi Yeah, that is what I tried the first time. But it turns out to be incredibly hard to keep the lifecycle of the ScBaseCell objects and the lifecycle of the ScPostIt objects tied together, because ScBaseCell and it's child classes