Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ab81945d
Commit
ab81945d
authored
Jul 16, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Use case-insensitive compare in LVM_FINDITEM.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f6802b7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
Makefile.in
dlls/comctl32/Makefile.in
+1
-1
listview.c
dlls/comctl32/listview.c
+7
-3
listview.c
dlls/comctl32/tests/listview.c
+13
-0
No files found.
dlls/comctl32/Makefile.in
View file @
ab81945d
EXTRADEFS
=
-D_COMCTL32_
EXTRADEFS
=
-D_COMCTL32_
MODULE
=
comctl32.dll
MODULE
=
comctl32.dll
IMPORTLIB
=
comctl32
IMPORTLIB
=
comctl32
IMPORTS
=
uuid user32 gdi32 advapi32 usp10 imm32
IMPORTS
=
uuid user32 gdi32 advapi32 usp10 imm32
kernelbase
DELAYIMPORTS
=
winmm uxtheme
DELAYIMPORTS
=
winmm uxtheme
EXTRADLLFLAGS
=
-mno-cygwin
EXTRADLLFLAGS
=
-mno-cygwin
...
...
dlls/comctl32/listview.c
View file @
ab81945d
...
@@ -140,6 +140,7 @@
...
@@ -140,6 +140,7 @@
#include "commctrl.h"
#include "commctrl.h"
#include "comctl32.h"
#include "comctl32.h"
#include "uxtheme.h"
#include "uxtheme.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -6313,6 +6314,7 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
...
@@ -6313,6 +6314,7 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
INT
nItem
=
nStart
+
1
,
nLast
=
infoPtr
->
nItemCount
,
nNearestItem
=
-
1
;
INT
nItem
=
nStart
+
1
,
nLast
=
infoPtr
->
nItemCount
,
nNearestItem
=
-
1
;
ULONG
xdist
,
ydist
,
dist
,
mindist
=
0x7fffffff
;
ULONG
xdist
,
ydist
,
dist
,
mindist
=
0x7fffffff
;
POINT
Position
,
Destination
;
POINT
Position
,
Destination
;
int
search_len
=
0
;
LVITEMW
lvItem
;
LVITEMW
lvItem
;
/* Search in virtual listviews should be done by application, not by
/* Search in virtual listviews should be done by application, not by
...
@@ -6378,6 +6380,9 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
...
@@ -6378,6 +6380,9 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
nItem
=
bNearest
?
-
1
:
nStart
+
1
;
nItem
=
bNearest
?
-
1
:
nStart
+
1
;
if
(
lpFindInfo
->
flags
&
(
LVFI_PARTIAL
|
LVFI_SUBSTRING
))
search_len
=
lstrlenW
(
lpFindInfo
->
psz
);
again:
again:
for
(;
nItem
<
nLast
;
nItem
++
)
for
(;
nItem
<
nLast
;
nItem
++
)
{
{
...
@@ -6398,12 +6403,11 @@ again:
...
@@ -6398,12 +6403,11 @@ again:
{
{
if
(
lpFindInfo
->
flags
&
(
LVFI_PARTIAL
|
LVFI_SUBSTRING
))
if
(
lpFindInfo
->
flags
&
(
LVFI_PARTIAL
|
LVFI_SUBSTRING
))
{
{
WCHAR
*
p
=
wcsstr
(
lvItem
.
pszText
,
lpFindInfo
->
psz
);
if
(
StrCmpNIW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
,
search_len
))
continue
;
if
(
!
p
||
p
!=
lvItem
.
pszText
)
continue
;
}
}
else
else
{
{
if
(
lstrcmpW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
)
!=
0
)
continue
;
if
(
StrCmpIW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
)
)
continue
;
}
}
}
}
...
...
dlls/comctl32/tests/listview.c
View file @
ab81945d
...
@@ -5366,6 +5366,19 @@ static void test_finditem(void)
...
@@ -5366,6 +5366,19 @@ static void test_finditem(void)
r
=
SendMessageA
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
r
=
SendMessageA
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
0
,
r
);
expect
(
0
,
r
);
/* Case sensitivity. */
strcpy
(
f
,
"Foo"
);
fi
.
flags
=
LVFI_STRING
;
fi
.
psz
=
f
;
r
=
SendMessageA
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
ok
(
!
r
,
"Unexpected item index %d.
\n
"
,
r
);
strcpy
(
f
,
"F"
);
fi
.
flags
=
LVFI_SUBSTRING
;
fi
.
psz
=
f
;
r
=
SendMessageA
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
ok
(
!
r
,
"Unexpected item index %d.
\n
"
,
r
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment