diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-11 19:53:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-12 16:46:49 +0100 |
commit | 18dd0254a38ca91d0d325aaecc4227724c035d87 (patch) | |
tree | f72d3b271f80b24a8d079812c3c91cc2338c89d6 /include | |
parent | 6dd94a4dd8f0b842cd62ec872ede17c8077be98c (diff) |
cypress: mobile: Font size combobox is broken on core/master.
a) for vcl version, listen to modify and select, instead of just modify so
we can get the artificial select via uiobject that the mobile makes use of.
(and disregard the modify which we know will lead to select so we get just
one event in that case)
b) default to assuming something has been picked "directly" unless we
know otherwise.
ideally the result is that
https://cgit.freedesktop.org/libreoffice/online/commit/?id=08d6c3fdf9bac4ad8318151ab1402690eb950f52
isn't needed
Change-Id: Ibbf33eab88dabd55d0c329aa00c8adaf001a4f50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88476
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/combobox.hxx | 13 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index f2f96dca1b37..aae2ce719624 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -152,8 +152,17 @@ public: void SetNoSelection(); tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; - // determine if Select was called due to something selected from the menu - bool IsModifyByMenu() const; + // determine if Select was called due to typing or cursoring in the + // combobox, as opposed to something selected from the menu or via some + // other route. e.g. the toolbar fontsize combobox wants to immediately + // change size only if something is picked from the combobox menu, other + // changes don't auto-apply until the user presses return + bool IsModifyByKeyboard() const; + + // determine if Edit::Modify was called due to the ComboBox changing the edit area + // itself + bool IsSyntheticModify() const; + /** checks whether a certain point lies within the bounds of a list item and returns the item as well as the character position diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index a98563a9680f..0c9e4af7e893 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -654,12 +654,12 @@ public: to the user selecting a different item from the list or while typing into the entry of a combo box with an entry. - Use changed_by_menu() to discover whether an item was actually selected - from the menu. + Use changed_by_direct_pick() to discover whether an item was actually explicitly + selected, e.g. from the menu. */ void connect_changed(const Link<ComboBox&, void>& rLink) { m_aChangeHdl = rLink; } - virtual bool changed_by_menu() const = 0; + virtual bool changed_by_direct_pick() const = 0; virtual void connect_popup_toggled(const Link<ComboBox&, void>& rLink) { |