diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-05 10:57:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-05 20:33:28 +0200 |
commit | 68db2d42c1518fdb777faeff891155f350da538c (patch) | |
tree | 5a07696b7e09451541ae1215a96863ac14aadfc9 /extensions/source | |
parent | 638f2642769cc73ad6dfa75d33145f03fa408d7f (diff) |
have just one way to set expander image
Change-Id: Ic07709a864620c6146616c8e0a1417343c0937de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95590
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/selectlabeldialog.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/selectlabeldialog.hxx | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index c78b5d930865..478a7b34ab51 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -405,7 +405,7 @@ namespace dbp // insert the entry preserving it's "relative position" entry data OUString sId(OUString::number(nRelativeIndex)); - rMoveTo.insert(nullptr, nInsertPos, &sMovingEntry, &sId, nullptr, nullptr, nullptr, false, nullptr); + rMoveTo.insert(nullptr, nInsertPos, &sMovingEntry, &sId, nullptr, nullptr, false, nullptr); // remove the entry from its old list if (bMoveRight) diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 3ff66c82ba97..a1ddce7b10b4 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -56,6 +56,7 @@ namespace pcr , m_bHaveAssignableControl(false) , m_xMainDesc(m_xBuilder->weld_label("label")) , m_xControlTree(m_xBuilder->weld_tree_view("control")) + , m_xScratchIter(m_xControlTree->make_iterator()) , m_xNoAssignment(m_xBuilder->weld_check_button("noassignment")) { m_xControlTree->connect_changed(LINK(this, OSelectLabelDialog, OnEntrySelected)); @@ -105,7 +106,8 @@ namespace pcr OUString sRootName(PcrRes(RID_STR_FORMS)); OUString aFormImage(RID_EXTBMP_FORMS); m_xControlTree->insert(nullptr, -1, &sRootName, nullptr, - nullptr, nullptr, &aFormImage, false, nullptr); + nullptr, nullptr, false, m_xScratchIter.get()); + m_xControlTree->set_image(*m_xScratchIter, aFormImage); // build the tree m_xInitialSelection.reset(); @@ -180,7 +182,8 @@ namespace pcr OUString aFormImage(RID_EXTBMP_FORM); m_xControlTree->insert(&rContainerEntry, -1, &sName, nullptr, - nullptr, nullptr, &aFormImage, false, nullptr); + nullptr, nullptr, false, m_xScratchIter.get()); + m_xControlTree->set_image(*m_xScratchIter, aFormImage); auto xIter = m_xControlTree->make_iterator(&rContainerEntry); m_xControlTree->iter_nth_child(*xIter, nChildren); sal_Int32 nContChildren = InsertEntries(xCont, *xIter); @@ -209,7 +212,8 @@ namespace pcr // all requirements met -> insert m_xUserData.emplace_back(new Reference<XPropertySet>(xAsSet)); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(m_xUserData.back().get()))); - m_xControlTree->insert(&rContainerEntry, -1, &sDisplayName, &sId, nullptr, nullptr, &m_aRequiredControlImage, false, nullptr); + m_xControlTree->insert(&rContainerEntry, -1, &sDisplayName, &sId, nullptr, nullptr, false, m_xScratchIter.get()); + m_xControlTree->set_image(*m_xScratchIter, m_aRequiredControlImage); if (m_xInitialLabelControl == xAsSet) { diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx b/extensions/source/propctrlr/selectlabeldialog.hxx index 2d2fd3188302..217ac30209cd 100644 --- a/extensions/source/propctrlr/selectlabeldialog.hxx +++ b/extensions/source/propctrlr/selectlabeldialog.hxx @@ -43,6 +43,7 @@ namespace pcr std::unique_ptr<weld::Label> m_xMainDesc; std::unique_ptr<weld::TreeView> m_xControlTree; + std::unique_ptr<weld::TreeIter> m_xScratchIter; std::unique_ptr<weld::CheckButton> m_xNoAssignment; public: |