Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hi Muhammet,

On Friday, 2017-06-16 14:24:50 +0300, Muhammet Kara wrote:

     bool Remove( const SvTreeListEntry* pEntry );
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.

Take a look at the implementation SvTreeList::Remove() in
svtools/source/contnr/treelist.cxx  From a short glance to me it looks
like it also removes all children.

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()).

Why? If there are no children then the already existing Remove()'s
internal call to SvTreeList::GetChildCount() shouldn't be expensive. You
don't need to call HasChildren() in advance, from what I grasped, and
even that wouldn't be expensive.

And I will explain this in its comment. Do you think we
shouldn't have such a method because it can be misused?

I don't see it would be necessary.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: signature.asc
Description: PGP signature


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.