summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-14 14:41:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-14 17:27:37 +0200
commit937f800cdb644b22b4c7bd18b35a8940bcede7ce (patch)
treec69f7de9436d4c72718e063ba7607332fa9aa2ab /include
parent7bb20ab2e84cf4d84d24bfcd8103946e92f2ae06 (diff)
tdf#135550 make XListBox Item status changed event work again
Change-Id: I9a5fe6a097c5d06e3ac3ab6c4c77cbe082d1a17d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/editbrowsebox.hxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 725cc081d044..9e851acf9a3f 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -601,6 +601,11 @@ namespace svt
//= ListBoxControl
class SVT_DLLPUBLIC ListBoxControl final : public ControlBase
{
+ private:
+ std::unique_ptr<weld::ComboBox> m_xWidget;
+ Link<LinkParamNone*,void> m_aModify1Hdl;
+ Link<LinkParamNone*,void> m_aModify2Hdl;
+
friend class ListBoxCellController;
public:
@@ -608,9 +613,27 @@ namespace svt
weld::ComboBox& get_widget() { return *m_xWidget; }
+ // sets a link to call when the selection is changed by the user
+ void SetModifyHdl(const Link<LinkParamNone*,void>& rHdl)
+ {
+ m_aModify1Hdl = rHdl;
+ }
+
+ // sets an additional link to call when the selection is changed by the user
+ void SetAuxModifyHdl(const Link<LinkParamNone*,void>& rLink)
+ {
+ m_aModify2Hdl = rLink;
+ }
+
virtual void dispose() override;
private:
- std::unique_ptr<weld::ComboBox> m_xWidget;
+ DECL_LINK(SelectHdl, weld::ComboBox&, void);
+
+ void CallModifyHdls()
+ {
+ m_aModify1Hdl.Call(nullptr);
+ m_aModify2Hdl.Call(nullptr);
+ }
};
//= ListBoxCellController
@@ -627,7 +650,7 @@ namespace svt
protected:
virtual bool MoveAllowed(const KeyEvent& rEvt) const override;
private:
- DECL_LINK(ListBoxSelectHdl, weld::ComboBox&, void);
+ DECL_LINK(ListBoxSelectHdl, LinkParamNone*, void);
};
class SVT_DLLPUBLIC FormattedControlBase : public EditControlBase