Kaydet (Commit) db8b4d8c authored tarafından Caolán McNamara's avatar Caolán McNamara

sync get_selected_id with get_active_id

Change-Id: I983cc45d13e02a020f608b8e9abfd2f12f7b10f5
Reviewed-on: https://gerrit.libreoffice.org/68741Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9d152d29
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment