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
eb9f4603
Commit
eb9f4603
authored
Aug 14, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Calculate icon data if the picture is dirty, or there's no icon data.
parent
cbfc3560
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
27 deletions
+18
-27
olepicture.c
dlls/oleaut32/olepicture.c
+18
-27
No files found.
dlls/oleaut32/olepicture.c
View file @
eb9f4603
...
...
@@ -1826,41 +1826,32 @@ static HRESULT WINAPI OLEPictureImpl_Save(
unsigned
int
iDataSize
;
ULONG
dummy
;
int
iSerializeResult
=
0
;
OLEPictureImpl
*
This
=
impl_from_IPersistStream
(
iface
);
OLEPictureImpl
*
This
=
impl_from_IPersistStream
(
iface
);
TRACE
(
"%p %p %d
\n
"
,
This
,
pStm
,
fClearDirty
);
switch
(
This
->
desc
.
picType
)
{
case
PICTYPE_ICON
:
if
(
This
->
bIsDirty
)
{
if
(
serializeIcon
(
This
->
desc
.
u
.
icon
.
hicon
,
&
pIconData
,
&
iDataSize
))
{
if
(
This
->
loadtime_magic
!=
0xdeadbeef
)
{
DWORD
header
[
2
];
header
[
0
]
=
This
->
loadtime_magic
;
header
[
1
]
=
iDataSize
;
IStream_Write
(
pStm
,
header
,
2
*
sizeof
(
DWORD
),
&
dummy
);
}
IStream_Write
(
pStm
,
pIconData
,
iDataSize
,
&
dummy
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
data
);
This
->
data
=
pIconData
;
This
->
datalen
=
iDataSize
;
hResult
=
S_OK
;
}
else
{
FIXME
(
"(%p,%p,%d), unable to serializeIcon()!
\n
"
,
This
,
pStm
,
fClearDirty
);
if
(
This
->
bIsDirty
||
!
This
->
data
)
{
if
(
!
serializeIcon
(
This
->
desc
.
u
.
icon
.
hicon
,
&
pIconData
,
&
iDataSize
))
{
ERR
(
"(%p,%p,%d), serializeIcon() failed
\n
"
,
This
,
pStm
,
fClearDirty
);
hResult
=
E_FAIL
;
break
;
}
}
else
{
if
(
This
->
loadtime_magic
!=
0xdeadbeef
)
{
DWORD
header
[
2
];
This
->
data
=
pIconData
;
This
->
datalen
=
iDataSize
;
}
if
(
This
->
loadtime_magic
!=
0xdeadbeef
)
{
DWORD
header
[
2
];
header
[
0
]
=
This
->
loadtime_magic
;
header
[
1
]
=
This
->
datalen
;
IStream_Write
(
pStm
,
header
,
2
*
sizeof
(
DWORD
),
&
dummy
);
}
IStream_Write
(
pStm
,
This
->
data
,
This
->
datalen
,
&
dummy
);
hResult
=
S_OK
;
header
[
0
]
=
This
->
loadtime_magic
;
header
[
1
]
=
This
->
datalen
;
IStream_Write
(
pStm
,
header
,
2
*
sizeof
(
DWORD
),
&
dummy
);
}
IStream_Write
(
pStm
,
This
->
data
,
This
->
datalen
,
&
dummy
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
data
);
hResult
=
S_OK
;
break
;
case
PICTYPE_BITMAP
:
if
(
This
->
bIsDirty
)
{
...
...
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