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
074e2b4c
Commit
074e2b4c
authored
Oct 21, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not grow the item list to arbritary index: if requested index is
larger than current count, just append. Miscellaneous cleanups.
parent
be0641fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
listview.c
dlls/comctl32/listview.c
+8
-12
No files found.
dlls/comctl32/listview.c
View file @
074e2b4c
...
...
@@ -5647,15 +5647,11 @@ static LRESULT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
NMLISTVIEW
nmlv
;
LISTVIEW_ITEM
*
lpItem
;
BOOL
is_sorted
,
has_changed
;
LVITEMW
item
;
TRACE
(
"(lpLVItem=%s, isW=%d)
\n
"
,
debuglvitem_t
(
lpLVItem
,
isW
),
isW
);
if
(
lStyle
&
LVS_OWNERDATA
)
{
nItem
=
infoPtr
->
nItemCount
;
infoPtr
->
nItemCount
++
;
return
nItem
;
}
if
(
lStyle
&
LVS_OWNERDATA
)
return
infoPtr
->
nItemCount
++
;
/* make sure it's an item, and not a subitem; cannot insert a subitem */
if
(
!
lpLVItem
||
lpLVItem
->
iItem
<
0
||
lpLVItem
->
iSubItem
)
return
-
1
;
...
...
@@ -5674,17 +5670,17 @@ static LRESULT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem,
is_sorted
=
(
lStyle
&
(
LVS_SORTASCENDING
|
LVS_SORTDESCENDING
))
&&
!
(
lStyle
&
LVS_OWNERDRAWFIXED
)
&&
(
LPSTR_TEXTCALLBACKW
!=
lpLVItem
->
pszText
);
nItem
=
is_sorted
?
infoPtr
->
nItemCount
+
1
:
lpLVItem
->
iItem
;
nItem
=
is_sorted
?
infoPtr
->
nItemCount
:
min
(
lpLVItem
->
iItem
,
infoPtr
->
nItemCount
)
;
TRACE
(
" inserting at %d, sorted=%d, count=%d, iItem=%d
\n
"
,
nItem
,
is_sorted
,
infoPtr
->
nItemCount
,
lpLVItem
->
iItem
);
nItem
=
DPA_InsertPtr
(
infoPtr
->
hdpaItems
,
nItem
,
hdpaSubItems
);
TRACE
(
" result of insert is %d
\n
"
,
nItem
);
if
(
nItem
==
-
1
)
goto
fail
;
/* the array may be sparsly populated, we can't just increment the count here */
infoPtr
->
nItemCount
=
infoPtr
->
hdpaItems
->
nItemCount
;
TRACE
(
" item count is %d
\n
"
,
infoPtr
->
nItemCount
);
infoPtr
->
nItemCount
++
;
/* set the item attributes */
if
(
!
set_main_item
(
infoPtr
,
lpLVItem
,
TRUE
,
isW
,
&
has_changed
))
goto
undo
;
item
=
*
lpLVItem
;
item
.
iItem
=
nItem
;
item
.
state
&=
~
LVIS_STATEIMAGEMASK
;
if
(
!
set_main_item
(
infoPtr
,
&
item
,
TRUE
,
isW
,
&
has_changed
))
goto
undo
;
/* if we're sorted, sort the list, and update the index */
if
(
is_sorted
)
...
...
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