Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7b7b711
Commit
b7b7b711
authored
Nov 21, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Fix find using partial string logic.
parent
90c4abe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
+41
-5
listview.c
dlls/comctl32/listview.c
+4
-3
listview.c
dlls/comctl32/tests/listview.c
+37
-2
No files found.
dlls/comctl32/listview.c
View file @
b7b7b711
...
...
@@ -5949,12 +5949,13 @@ again:
else
continue
;
}
if
(
lvItem
.
mask
&
LVIF_TEXT
)
{
if
(
lpFindInfo
->
flags
&
LVFI_PARTIAL
)
{
if
(
strstrW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
)
==
NULL
)
continue
;
WCHAR
*
p
=
strstrW
(
lvItem
.
pszText
,
lpFindInfo
->
psz
);
if
(
!
p
||
p
!=
lvItem
.
pszText
)
continue
;
}
else
{
...
...
@@ -5963,7 +5964,7 @@ again:
}
if
(
!
bNearest
)
return
nItem
;
/* This is very inefficient. To do a good job here,
* we need a sorted array of (x,y) item positions */
LISTVIEW_GetItemOrigin
(
infoPtr
,
nItem
,
&
Position
);
...
...
dlls/comctl32/tests/listview.c
View file @
b7b7b711
...
...
@@ -4023,7 +4023,7 @@ static void test_LVS_EX_TRANSPARENTBKGND(void)
DestroyWindow
(
hwnd
);
}
static
void
test_
ApproximateViewR
ect
(
void
)
static
void
test_
approximate_viewr
ect
(
void
)
{
HWND
hwnd
;
DWORD
ret
;
...
...
@@ -4097,6 +4097,40 @@ static void test_ApproximateViewRect(void)
DestroyWindow
(
hwnd
);
}
static
void
test_finditem
(
void
)
{
LVFINDINFOA
fi
;
static
char
f
[
5
];
HWND
hwnd
;
DWORD
r
;
hwnd
=
create_listview_control
(
0
);
insert_item
(
hwnd
,
0
);
memset
(
&
fi
,
0
,
sizeof
(
fi
));
/* full string search, inserted text was "foo" */
strcpy
(
f
,
"foo"
);
fi
.
flags
=
LVFI_STRING
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
0
,
r
);
/* partial string search, inserted text was "foo" */
strcpy
(
f
,
"fo"
);
fi
.
flags
=
LVFI_STRING
|
LVFI_PARTIAL
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
0
,
r
);
/* partial string search, part after start char */
strcpy
(
f
,
"oo"
);
fi
.
flags
=
LVFI_STRING
|
LVFI_PARTIAL
;
fi
.
psz
=
f
;
r
=
SendMessage
(
hwnd
,
LVM_FINDITEMA
,
-
1
,
(
LPARAM
)
&
fi
);
expect
(
-
1
,
r
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -4154,7 +4188,8 @@ START_TEST(listview)
test_indentation
();
test_getitemspacing
();
test_getcolumnwidth
();
test_ApproximateViewRect
();
test_approximate_viewrect
();
test_finditem
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
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