mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
comctl32/listview: Convert item text once when looking for insertion point.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d3d8d4f37a
commit
8ef79b023a
1 changed files with 7 additions and 1 deletions
|
@ -7824,18 +7824,24 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
|||
HDPA hItem;
|
||||
ITEM_INFO *item_s;
|
||||
INT i = 0, cmpv;
|
||||
WCHAR *textW;
|
||||
|
||||
textW = textdupTtoW(lpLVItem->pszText, isW);
|
||||
|
||||
while (i < infoPtr->nItemCount)
|
||||
{
|
||||
hItem = DPA_GetPtr( infoPtr->hdpaItems, i);
|
||||
item_s = DPA_GetPtr(hItem, 0);
|
||||
|
||||
cmpv = textcmpWT(item_s->hdr.pszText, lpLVItem->pszText, isW);
|
||||
cmpv = textcmpWT(item_s->hdr.pszText, textW, TRUE);
|
||||
if (infoPtr->dwStyle & LVS_SORTDESCENDING) cmpv *= -1;
|
||||
|
||||
if (cmpv >= 0) break;
|
||||
i++;
|
||||
}
|
||||
|
||||
textfreeT(textW, isW);
|
||||
|
||||
nItem = i;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue