summaryrefslogtreecommitdiff
path: root/cui/source/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-05 10:57:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-05 20:33:28 +0200
commit68db2d42c1518fdb777faeff891155f350da538c (patch)
tree5a07696b7e09451541ae1215a96863ac14aadfc9 /cui/source/inc
parent638f2642769cc73ad6dfa75d33145f03fa408d7f (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 'cui/source/inc')
-rw-r--r--cui/source/inc/cfg.hxx2
-rw-r--r--cui/source/inc/cfgutil.hxx10
-rw-r--r--cui/source/inc/scriptdlg.hxx1
3 files changed, 8 insertions, 5 deletions
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index f413495a17ff..7b9fe841620a 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -347,7 +347,7 @@ public:
void insert(int pos, const OUString& rId)
{
m_xControl->insert(nullptr, pos, nullptr, &rId,
- nullptr, nullptr, nullptr, false, nullptr);
+ nullptr, nullptr, false, nullptr);
}
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 944ab68e871f..b3b7d091b61a 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -117,21 +117,22 @@ public:
void thaw() { m_xTreeView->thaw(); }
void append(const OUString& rId, const OUString& rStr, const weld::TreeIter* pParent = nullptr)
{
- m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, nullptr);
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, false, nullptr);
}
std::unique_ptr<weld::TreeIter> tree_append(const OUString& rId, const OUString& rStr, const weld::TreeIter* pParent = nullptr)
{
std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
- m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, xIter.get());
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, false, xIter.get());
return xIter;
}
void append(const OUString& rId, const OUString& rStr, const OUString& rImage, const weld::TreeIter* pParent = nullptr)
{
- m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, &rImage, false, nullptr);
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, rImage);
}
void append(const OUString& rId, const OUString& rStr, const css::uno::Reference<css::graphic::XGraphic>& rImage, const weld::TreeIter* pParent = nullptr)
{
- m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->insert(pParent, -1, &rStr, &rId, nullptr, nullptr, false, m_xScratchIter.get());
m_xTreeView->set_image(*m_xScratchIter, rImage, -1);
}
void remove(int nPos) { m_xTreeView->remove(nPos); }
@@ -194,6 +195,7 @@ class CuiConfigGroupListBox
css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription;
SfxStylesInfo_Impl* m_pStylesInfo;
std::unique_ptr<weld::TreeView> m_xTreeView;
+ std::unique_ptr<weld::TreeIter> m_xScratchIter;
static OUString GetImage(
const css::uno::Reference< css::script::browse::XBrowseNode >& node,
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 7ae0f333563e..dc2e771b9187 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -94,6 +94,7 @@ protected:
const OUString m_sProdMacros;
std::unique_ptr<weld::TreeView> m_xScriptsBox;
+ std::unique_ptr<weld::TreeIter> m_xScratchIter;
std::unique_ptr<weld::Button> m_xRunButton;
std::unique_ptr<weld::Button> m_xCloseButton;
std::unique_ptr<weld::Button> m_xCreateButton;