diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-14 16:26:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-16 18:04:37 +0200 |
commit | 704297ed099e1732db360669abe2443d24f6c252 (patch) | |
tree | ea71f7fd8fb203ef65dd15c6cf4eb5dfb2a2fece /include | |
parent | 737343cbe43cd7010d12cf7aba4a2042798aeb70 (diff) |
tdf#135550 make XComboBox Item status changed event work again
Change-Id: I323a114d3b71a74267ee7a89c5fb29821611e57e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100751
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/editbrowsebox.hxx | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 9e851acf9a3f..a4a4ee182ee0 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -563,6 +563,11 @@ namespace svt //= ComboBoxControl class SVT_DLLPUBLIC ComboBoxControl final : public ControlBase { + private: + std::unique_ptr<weld::ComboBox> m_xWidget; + Link<LinkParamNone*,void> m_aModify1Hdl; + Link<LinkParamNone*,void> m_aModify2Hdl; + friend class ComboBoxCellController; public: @@ -575,10 +580,28 @@ 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); + } }; //= ComboBoxCellController @@ -595,7 +618,7 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const override; private: - DECL_LINK(ModifyHdl, weld::ComboBox&, void); + DECL_LINK(ModifyHdl, LinkParamNone*, void); }; //= ListBoxControl |