diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-10-23 12:49:36 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-27 14:54:00 +0200 |
commit | 514b182086d493efd3785e2f3092216c74f43dec (patch) | |
tree | 9af53aded98d5e9dc230e259f454d01c36d0acfa /vcl/jsdialog | |
parent | 255ff09246008f7286d1a723cfdee47f847f5540 (diff) |
jsdialog: send smaller messages for combobox
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib514607ad56b965c33439ad548ec90d516acfcf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158345
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
(cherry picked from commit 9e2da48ec3dbe541ff52f6d69f98afb57afaac3e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158443
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/jsdialog')
-rw-r--r-- | vcl/jsdialog/jsdialogbuilder.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 3dcfcdcbd391..f694a5778fe7 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1653,7 +1653,11 @@ void JSComboBox::set_entry_text_without_notify(const OUString& rText) void JSComboBox::set_entry_text(const OUString& rText) { SalInstanceComboBoxWithEdit::set_entry_text(rText); - sendUpdate(); + + std::unique_ptr<jsdialog::ActionDataMap> pMap = std::make_unique<jsdialog::ActionDataMap>(); + (*pMap)[ACTION_TYPE] = "setText"; + (*pMap)["text"] = rText; + sendAction(std::move(pMap)); } void JSComboBox::set_active(int pos) @@ -1662,7 +1666,11 @@ void JSComboBox::set_active(int pos) return; SalInstanceComboBoxWithEdit::set_active(pos); - sendUpdate(); + + std::unique_ptr<jsdialog::ActionDataMap> pMap = std::make_unique<jsdialog::ActionDataMap>(); + (*pMap)[ACTION_TYPE] = "select"; + (*pMap)["position"] = OUString::number(pos); + sendAction(std::move(pMap)); } void JSComboBox::set_active_id(const OUString& rStr) |