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
8c5b08d8
Commit
8c5b08d8
authored
Feb 26, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Feb 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement GetSizeMax for empty picture.
parent
beececd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
8 deletions
+52
-8
olepicture.c
dlls/oleaut32/olepicture.c
+52
-5
olepicture.c
dlls/oleaut32/tests/olepicture.c
+0
-3
No files found.
dlls/oleaut32/olepicture.c
View file @
8c5b08d8
...
...
@@ -1836,12 +1836,59 @@ static HRESULT WINAPI OLEPictureImpl_Save(
return
hResult
;
}
static
HRESULT
WINAPI
OLEPictureImpl_GetSizeMax
(
IPersistStream
*
iface
,
ULARGE_INTEGER
*
pcbSize
)
static
HRESULT
WINAPI
OLEPictureImpl_GetSizeMax
(
IPersistStream
*
iface
,
ULARGE_INTEGER
*
size
)
{
OLEPictureImpl
*
This
=
impl_from_IPersistStream
(
iface
);
FIXME
(
"(%p,%p),stub!
\n
"
,
This
,
pcbSize
);
return
E_NOTIMPL
;
HRESULT
hr
=
E_NOTIMPL
;
OLEPictureImpl
*
This
=
impl_from_IPersistStream
(
iface
);
unsigned
int
datasize
=
This
->
datalen
;
FIXME
(
"(%p,%p), partial stub!
\n
"
,
This
,
size
);
if
(
!
size
)
return
E_INVALIDARG
;
switch
(
This
->
desc
.
picType
)
{
case
PICTYPE_NONE
:
hr
=
S_OK
;
break
;
case
PICTYPE_ICON
:
FIXME
(
"(%p), PICTYPE_ICON not implemented!
\n
"
,
This
);
break
;
case
PICTYPE_BITMAP
:
if
(
This
->
bIsDirty
||
!
This
->
data
)
{
switch
(
This
->
keepOrigFormat
?
This
->
loadtime_format
:
BITMAP_FORMAT_BMP
)
{
case
BITMAP_FORMAT_BMP
:
FIXME
(
"(%p), PICTYPE_BITMAP (format BMP) not implemented!
\n
"
,
This
);
break
;
case
BITMAP_FORMAT_JPEG
:
FIXME
(
"(%p), PICTYPE_BITMAP (format JPEG) not implemented!
\n
"
,
This
);
break
;
case
BITMAP_FORMAT_GIF
:
FIXME
(
"(%p), PICTYPE_BITMAP (format GIF) not implemented!
\n
"
,
This
);
break
;
case
BITMAP_FORMAT_PNG
:
FIXME
(
"(%p), PICTYPE_BITMAP (format PNG) not implemented!
\n
"
,
This
);
break
;
default:
FIXME
(
"(%p), PICTYPE_BITMAP (format UNKNOWN, using BMP?) not implemented!
\n
"
,
This
);
break
;
}
}
break
;
case
PICTYPE_METAFILE
:
FIXME
(
"(%p), PICTYPE_METAFILE not implemented!
\n
"
,
This
);
break
;
case
PICTYPE_ENHMETAFILE
:
FIXME
(
"(%p), PICTYPE_ENHMETAFILE not implemented!
\n
"
,
This
);
break
;
default:
FIXME
(
"(%p), [unknown type] not implemented!
\n
"
,
This
);
break
;
}
size
->
HighPart
=
0
;
size
->
LowPart
=
datasize
+
8
;
return
hr
;
}
...
...
dlls/oleaut32/tests/olepicture.c
View file @
8c5b08d8
...
...
@@ -1413,13 +1413,10 @@ static void test_load_save_empty_picture(void)
maxsize
.
QuadPart
=
0
;
hr
=
IPersistStream_GetSizeMax
(
src_stream
,
&
maxsize
);
todo_wine
ok
(
hr
==
S_OK
,
"GetSizeMax error %#lx
\n
"
,
hr
);
todo_wine
ok
(
maxsize
.
QuadPart
==
8
,
"expected 8, got %s
\n
"
,
wine_dbgstr_longlong
(
maxsize
.
QuadPart
));
hr
=
IPersistStream_GetSizeMax
(
src_stream
,
NULL
);
todo_wine
ole_expect
(
hr
,
E_INVALIDARG
);
hr
=
IPersistStream_Save
(
src_stream
,
dst_stream
,
TRUE
);
...
...
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