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
bb993e01
Commit
bb993e01
authored
May 21, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
May 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inserting column zero should not modify the main item (spotted by
Robert Shearman).
parent
cd46d71e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
30 deletions
+1
-30
listview.c
dlls/comctl32/listview.c
+1
-30
No files found.
dlls/comctl32/listview.c
View file @
bb993e01
...
...
@@ -6242,25 +6242,10 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
/* now we have to actually adjust the data */
if
(
!
(
infoPtr
->
dwStyle
&
LVS_OWNERDATA
)
&&
infoPtr
->
nItemCount
>
0
)
{
SUBITEM_INFO
*
lpSubItem
,
*
lpMainItem
,
**
lpNewItems
=
0
;
SUBITEM_INFO
*
lpSubItem
;
HDPA
hdpaSubItems
;
INT
nItem
,
i
;
/* preallocate memory, so we can fail gracefully */
if
(
nNewColumn
==
0
)
{
lpNewItems
=
COMCTL32_Alloc
(
sizeof
(
SUBITEM_INFO
*
)
*
infoPtr
->
nItemCount
);
if
(
!
lpNewItems
)
goto
fail
;
for
(
i
=
0
;
i
<
infoPtr
->
nItemCount
;
i
++
)
if
(
!
(
lpNewItems
[
i
]
=
COMCTL32_Alloc
(
sizeof
(
SUBITEM_INFO
))))
break
;
if
(
i
!=
infoPtr
->
nItemCount
)
{
for
(;
i
>=
0
;
i
--
)
COMCTL32_Free
(
lpNewItems
[
i
]);
COMCTL32_Free
(
lpNewItems
);
goto
fail
;
}
}
for
(
nItem
=
0
;
nItem
<
infoPtr
->
nItemCount
;
nItem
++
)
{
hdpaSubItems
=
(
HDPA
)
DPA_GetPtr
(
infoPtr
->
hdpaItems
,
nItem
);
...
...
@@ -6270,21 +6255,7 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
if
(
lpSubItem
->
iSubItem
>=
nNewColumn
)
lpSubItem
->
iSubItem
++
;
}
/* for inserting column 0, we have to special-case the main item */
if
(
nNewColumn
==
0
)
{
lpMainItem
=
(
SUBITEM_INFO
*
)
DPA_GetPtr
(
hdpaSubItems
,
0
);
lpSubItem
=
lpNewItems
[
nItem
];
lpSubItem
->
hdr
=
lpMainItem
->
hdr
;
lpSubItem
->
iSubItem
=
1
;
ZeroMemory
(
&
lpMainItem
->
hdr
,
sizeof
(
lpMainItem
->
hdr
));
lpMainItem
->
iSubItem
=
0
;
DPA_InsertPtr
(
hdpaSubItems
,
1
,
lpSubItem
);
}
}
COMCTL32_Free
(
lpNewItems
);
}
/* make space for the new column */
...
...
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