diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-11 13:58:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-11 16:36:44 +0200 |
commit | ba6ab05a2a1ecd557302e238e1890b5e631c28b7 (patch) | |
tree | b1c50c75ce8f65b6c9850ad906d723cf9ee6b279 /basctl/source | |
parent | 99ef50f97b6d8461b8953c2555298c7bbeb3405b (diff) |
tdf#134604 library created in the wrong tree
Change-Id: Iee526422a18aef8ef25289041b26ff1e4a6b39b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100494
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/bastype2.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 23c4d8cc411e..32c190203f8c 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -652,11 +652,12 @@ void SbTreeListBox::AddEntry( m_xControl->freeze(); m_bFreezeOnFirstAddRemove= false; } + std::unique_ptr<weld::TreeIter> xScratch = pRet ? nullptr : m_xControl->make_iterator(); + if (!pRet) + pRet = xScratch.get(); OUString sId(OUString::number(reinterpret_cast<sal_uInt64>(rUserData.release()))); - m_xControl->insert(pParent, -1, &rText, &sId, nullptr, nullptr, bChildrenOnDemand, m_xScratchIter.get()); - m_xControl->set_image(*m_xScratchIter, rImage); - if (pRet) - m_xControl->copy_iterator(*m_xScratchIter, *pRet); + m_xControl->insert(pParent, -1, &rText, &sId, nullptr, nullptr, bChildrenOnDemand, pRet); + m_xControl->set_image(*pRet, rImage); } void SbTreeListBox::SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage) |