summaryrefslogtreecommitdiffstats
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-27 19:30:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-27 21:38:35 +0200
commita83963b463df5c8737fba43d9fff7e1236d2670b (patch)
tree848721e7d3bab0f26e6226b1f5c267845fff3e67 /basctl
parentlok: handle missing callback. (diff)
downloadcore-a83963b463df5c8737fba43d9fff7e1236d2670b.tar.gz
core-a83963b463df5c8737fba43d9fff7e1236d2670b.zip
Resolves: tdf#124984 organize basic macro new added module doesn't show up
Change-Id: I422131ab203eba62ed5cf6fb2e19e23325b43f6e Reviewed-on: https://gerrit.libreoffice.org/71433 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastype2.cxx5
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
-rw-r--r--basctl/source/inc/bastype2.hxx4
3 files changed, 8 insertions, 5 deletions
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 2ed3e6d81804..2141278861b2 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -1351,10 +1351,11 @@ void SbTreeListBox::AddEntry(
const OUString& rImage,
const weld::TreeIter* pParent,
bool bChildrenOnDemand,
- std::unique_ptr<Entry>&& rUserData)
+ std::unique_ptr<Entry>&& rUserData,
+ weld::TreeIter* pRet)
{
OUString sId(OUString::number(reinterpret_cast<sal_uInt64>(rUserData.release())));
- m_xControl->insert(pParent, -1, &rText, &sId, nullptr, nullptr, &rImage, bChildrenOnDemand, nullptr);
+ m_xControl->insert(pParent, -1, &rText, &sId, nullptr, nullptr, &rImage, bChildrenOnDemand, pRet);
}
void SbTreeListBox::SetEntryBitmaps(const weld::TreeIter& rIter, const OUString& rImage)
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 4e96d7e16450..dda0bbf1581d 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -1116,8 +1116,8 @@ SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument,
bool bEntry = rBasicBox.FindEntry(aModName, OBJ_TYPE_MODULE, *xEntry);
if (!bEntry)
{
- rBasicBox.AddEntry(aModName, RID_BMP_MODULE, xEntry.get(), false,
- std::make_unique<Entry>(OBJ_TYPE_MODULE));
+ rBasicBox.AddEntry(aModName, RID_BMP_MODULE, xSubRootEntry.get(), false,
+ std::make_unique<Entry>(OBJ_TYPE_MODULE), xEntry.get());
}
rBasicBox.set_cursor(*xEntry);
rBasicBox.select(*xEntry);
diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx
index 881bddb4fa09..9777ba7ce26b 100644
--- a/basctl/source/inc/bastype2.hxx
+++ b/basctl/source/inc/bastype2.hxx
@@ -300,7 +300,9 @@ public:
static ItemType ConvertType (EntryType eType);
bool IsValidEntry(weld::TreeIter& rEntry);
void AddEntry(const OUString& rText, const OUString& rImage,
- const weld::TreeIter* pIter, bool bChildrenOnDemand, std::unique_ptr<Entry>&& rUserData);
+ const weld::TreeIter* pParent, bool bChildrenOnDemand,
+ std::unique_ptr<Entry>&& rUserData,
+ weld::TreeIter* pRet = nullptr);
void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
std::unique_ptr<weld::TreeIter> make_iterator(const weld::TreeIter* pIter = nullptr) const { return m_xControl->make_iterator(pIter); }