Kaydet (Commit) 867f1e54 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
f25cdaa7 "fdo#74132: Do not interrupt search in
Writer."

Change-Id: I0049b76c91c8ed5a9f4051f170454fb3d49c46f9
Reviewed-on: https://gerrit.libreoffice.org/35101Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 4605bd46
......@@ -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;
}
......
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