[Libreoffice-commits] core.git: framework/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 23 07:38:33 UTC 2020
framework/source/uielement/comboboxtoolbarcontroller.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 0e75f025419f878dc772391cea8d55765bceb9fc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 22 15:24:59 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 23 09:37:54 2020 +0200
fix assert in empty complextoolbarcontrols combobox sdk example addon
Change-Id: Icf73bb97aa98430c9380e500574b93f248749c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92704
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index fedb1b75d9a7..e4be0c413c63 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -318,7 +318,11 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control
{
OUString aText;
if ( rControlCommand.Arguments[i].Value >>= aText )
- m_pComboBox->RemoveEntry( aText );
+ {
+ auto nPos = m_pComboBox->GetEntryPos(aText);
+ if (nPos != COMBOBOX_ENTRY_NOTFOUND)
+ m_pComboBox->RemoveEntryAt(nPos);
+ }
break;
}
}
More information about the Libreoffice-commits
mailing list