[Libreoffice-commits] core.git: include/vcl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 5 16:34:05 UTC 2019
include/vcl/weld.hxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit db8b4d8c58e808f645a5d854b73c8a8132e2d898
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 5 12:14:20 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 5 17:33:40 2019 +0100
sync get_selected_id with get_active_id
Change-Id: I983cc45d13e02a020f608b8e9abfd2f12f7b10f5
Reviewed-on: https://gerrit.libreoffice.org/68741
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 6000bb53032c..5511879ed188 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -608,7 +608,11 @@ public:
//by id
virtual OUString get_id(int pos) const = 0;
virtual int find_id(const OUString& rId) const = 0;
- OUString get_selected_id() const { return get_id(get_selected_index()); }
+ OUString get_selected_id() const
+ {
+ int pos = get_selected_index();
+ return pos == -1 ? OUString() : get_id(pos);
+ }
void select_id(const OUString& rId) { select(find_id(rId)); }
//via iter
More information about the Libreoffice-commits
mailing list