svx/source/dialog/srchdlg.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 867f1e5404536fd2f2ffd57fb4510f1eb7ed4561 Author: Stephan Bergmann <sberg...@redhat.com> Date: Sun Mar 12 16:30:48 2017 +0100 ToolBox::GetItemCommand/GetItemWindow take IDs ...not positions in the [0..GetItemCount()) range, so what's probably missing here is to map from positions to IDs. Code was introduced with f25cdaa78d5e7d200fbaf31cce9895bab7c5ee63 "fdo#74132: Do not interrupt search in Writer." Change-Id: I0049b76c91c8ed5a9f4051f170454fb3d49c46f9 Reviewed-on: https://gerrit.libreoffice.org/35101 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index c5a16a3..c990206 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2396,8 +2396,11 @@ static vcl::Window* lcl_GetSearchLabelWindow() xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW); VclPtr< ToolBox > pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow).get() ); for (size_t i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i) - if (pToolBox->GetItemCommand(i) == ".uno:SearchLabel") - return pToolBox->GetItemWindow(i); + { + sal_uInt16 id = pToolBox->GetItemId(i); + if (pToolBox->GetItemCommand(id) == ".uno:SearchLabel") + return pToolBox->GetItemWindow(id); + } return nullptr; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits