[Libreoffice-commits] core.git: basctl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 11 14:37:33 UTC 2020
basctl/source/basicide/bastype2.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit ba6ab05a2a1ecd557302e238e1890b5e631c28b7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 11 13:58:24 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 11 16:36:44 2020 +0200
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 at redhat.com>
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)
More information about the Libreoffice-commits
mailing list