From f8156f7e81145cbf1c287058039ae70585cf64e7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 21 Apr 2020 12:11:10 +0100 Subject: seems a poor idea to increment a vector iter by COMBOBOX_APPEND MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit which is SAL_MAX_INT32, in the (presumably never happens) fallback case Change-Id: If425c6ce1bd9937ba2b26f6c68231640a2f13273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92626 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- framework/source/uielement/togglebuttontoolbarcontroller.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index ca2d4312c443..0f0e341d1448 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -22,7 +22,6 @@ #include #include #include -#include using namespace ::com::sun::star; using namespace ::com::sun::star::awt; @@ -184,8 +183,8 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con } else if ( rControlCommand.Command == "InsertEntry" ) { - sal_Int32 nPos( COMBOBOX_APPEND ); - sal_Int32 nSize = sal_Int32( m_aDropdownMenuList.size() ); + sal_Int32 nPos(0); + sal_Int32 nSize = sal_Int32( m_aDropdownMenuList.size() ); OUString aText; for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ ) { -- cgit v1.2.3