Two New Methods for SvTreeListBox

Muhammet Kara muhammet.kara at pardus.org.tr
Fri Jun 16 11:24:50 UTC 2017


Hi Eike,

On 06/16/2017 12:55 PM, Eike Rathke wrote:
> Hi Muhammet,
>
> On Friday, 2017-06-16 12:49:22 +0300, Muhammet Kara wrote:
>
>> RemoveEntry(SvTreeListEntry* pEntry) //Remove with children
> Isn't that what
>
>      bool Remove( const SvTreeListEntry* pEntry );
>
> does?
Seems so. This is the method I mentioned in the previous post. It is a 
member of the SvTreeList class, and can be accessed after calling 
GetModel() on an SvTreeListBox object, and using the returned pointer to 
the related SvTreeList object. This method is called separately for each 
child in the RemoveSelected() method, so I assumed it might leave some 
(all?) children orphan.
>
>> RemoveSingleEntry(SvTreeListEntry* pEntry) //Don't check for children
> You'd likely end up with orphans then.
Yep. It should be called only when you are sure that there is no 
children. I want to use it that way at least (to get rid of extra call 
to HasChildren()). And I will explain this in its comment. Do you think 
we shouldn't have such a method because it can be misused?
>
>    Eike
>
Cheers,
Muhammet


More information about the LibreOffice mailing list