96 for (
auto const& it : pSource->
m_Items)
99 std::unique_ptr<SvLBoxItem> pNewItem(pItem->
Clone(pItem));
100 m_Items.push_back(std::move(pNewItem));
114 m_Items.push_back(std::move(pItem));
156 bool operator() (
const std::unique_ptr<SvLBoxItem>& rpItem)
const
158 return rpItem->GetType() ==
meType;
166 explicit FindByPointer(
const SvLBoxItem* p) : mpItem(
p) {}
167 bool operator() (
const std::unique_ptr<SvLBoxItem>& rpItem)
const
169 return rpItem.get() == mpItem;
177 ItemsType::const_iterator it = std::find_if(
m_Items.begin(),
m_Items.end(), FindByType(
eType));
178 return (it ==
m_Items.end()) ? nullptr : (*it).get();
184 return (it ==
m_Items.end()) ? nullptr : (*it).get();
189 ItemsType::const_iterator it = std::find_if(
m_Items.begin(),
m_Items.end(), FindByPointer(pItem));
214 return (
nPos < rList.size()) ? rList[
nPos].get() :
nullptr;
224 return rList[
nPos].get();
231 return (rChildren.empty()) ? nullptr : rChildren.back().get();
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const =0
void InvalidateChildrensListPositions()
SvTreeListEntry * PrevSibling() const
SvTreeListEntry * NextSibling() const
SvTreeListEntries m_Children
void Clone(SvTreeListEntry *pSource)
const SvLBoxItem * GetFirstItem(SvLBoxItemType eType) const
void * GetUserData() const
size_t GetPos(const SvLBoxItem *pItem) const
virtual ~SvTreeListEntry()
bool HasChildrenOnDemand() const
bool HasChildListPos() const
const SvLBoxItem & GetItem(size_t nPos) const
void ReplaceItem(std::unique_ptr< SvLBoxItem > pNewItem, size_t nPos)
static const size_t ITEM_NOT_FOUND
void EnableChildrenOnDemand(bool bEnable=true)
void SetFlags(SvTLEntryFlags nFlags)
SvTreeListEntry * pParent
void AddItem(std::unique_ptr< SvLBoxItem > pItem)
sal_uInt32 GetChildListPos() const
SvTLEntryFlags nEntryFlags
SvTreeListEntry * LastSibling() const
void SetUserData(void *pPtr)
#define DBG_ASSERT(sCon, aError)
std::vector< std::unique_ptr< SvTreeListEntry > > SvTreeListEntries