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
615615b0
Commit
615615b0
authored
Jun 24, 2003
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OleCreateFontIndirect(NULL,...) uses the OLE StdFont.
Added testcase for OleCreateFontIndirect(NULL). Added VT_NULL -> VT_BOOL variant converter.
parent
dc4b0c76
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
16 deletions
+77
-16
olefont.c
dlls/oleaut32/olefont.c
+17
-16
.cvsignore
dlls/oleaut32/tests/.cvsignore
+1
-0
Makefile.in
dlls/oleaut32/tests/Makefile.in
+1
-0
olefont.c
dlls/oleaut32/tests/olefont.c
+57
-0
variant.c
dlls/oleaut32/variant.c
+1
-0
No files found.
dlls/oleaut32/olefont.c
View file @
615615b0
...
@@ -306,8 +306,22 @@ HRESULT WINAPI OleCreateFontIndirect(
...
@@ -306,8 +306,22 @@ HRESULT WINAPI OleCreateFontIndirect(
*
ppvObj
=
0
;
*
ppvObj
=
0
;
if
(
lpFontDesc
==
0
)
if
(
!
lpFontDesc
)
{
return
NO_ERROR
;
/* MSDN Oct 2001 */
FONTDESC
fd
;
WCHAR
fname
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
fd
.
cbSizeofstruct
=
sizeof
(
fd
);
fd
.
lpstrName
=
fname
;
fd
.
cySize
.
s
.
Lo
=
80000
;
fd
.
cySize
.
s
.
Hi
=
0
;
fd
.
sWeight
=
0
;
fd
.
sCharset
=
0
;
fd
.
fItalic
=
0
;
fd
.
fUnderline
=
0
;
fd
.
fStrikethrough
=
0
;
lpFontDesc
=
&
fd
;
}
/*
/*
* Try to construct a new instance of the class.
* Try to construct a new instance of the class.
...
@@ -1964,20 +1978,7 @@ static ULONG WINAPI SFCF_Release(LPCLASSFACTORY iface) {
...
@@ -1964,20 +1978,7 @@ static ULONG WINAPI SFCF_Release(LPCLASSFACTORY iface) {
static
HRESULT
WINAPI
SFCF_CreateInstance
(
static
HRESULT
WINAPI
SFCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
)
{
FONTDESC
fd
;
return
OleCreateFontIndirect
(
NULL
,
riid
,
ppobj
);
WCHAR
fname
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
fd
.
cbSizeofstruct
=
sizeof
(
fd
);
fd
.
lpstrName
=
fname
;
fd
.
cySize
.
s
.
Lo
=
80000
;
fd
.
cySize
.
s
.
Hi
=
0
;
fd
.
sWeight
=
0
;
fd
.
sCharset
=
0
;
fd
.
fItalic
=
0
;
fd
.
fUnderline
=
0
;
fd
.
fStrikethrough
=
0
;
return
OleCreateFontIndirect
(
&
fd
,
riid
,
ppobj
);
}
}
...
...
dlls/oleaut32/tests/.cvsignore
View file @
615615b0
Makefile
Makefile
oleaut32_test.exe.spec.c
oleaut32_test.exe.spec.c
olefont.ok
safearray.ok
safearray.ok
testlist.c
testlist.c
vartest.ok
vartest.ok
dlls/oleaut32/tests/Makefile.in
View file @
615615b0
...
@@ -7,6 +7,7 @@ IMPORTS = oleaut32
...
@@ -7,6 +7,7 @@ IMPORTS = oleaut32
EXTRALIBS
=
$(LIBUUID)
EXTRALIBS
=
$(LIBUUID)
CTESTS
=
\
CTESTS
=
\
olefont.c
\
safearray.c
\
safearray.c
\
vartest.c
vartest.c
...
...
dlls/oleaut32/tests/olefont.c
0 → 100644
View file @
615615b0
/*
* OLEFONT test program
*
* Copyright 2003 Marcus Meissner
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <time.h>
#include <wine/test.h>
#include <winbase.h>
#include <winuser.h>
#include <wingdi.h>
#include <winnls.h>
#include <winerror.h>
#include <winnt.h>
#include <wtypes.h>
#include <olectl.h>
START_TEST
(
olefont
)
{
LPVOID
pvObj
=
NULL
;
HRESULT
hres
;
IFont
*
font
=
NULL
;
hres
=
OleCreateFontIndirect
(
NULL
,
&
IID_IFont
,
&
pvObj
);
font
=
pvObj
;
ok
(
hres
==
S_OK
,
"OCFI (NULL,..) does not return 0, but 0x%08lx"
,
hres
);
ok
(
font
!=
NULL
,
"OCFI (NULL,..) does return NULL, insytead of !NULL"
);
pvObj
=
NULL
;
hres
=
IFont_QueryInterface
(
font
,
&
IID_IFont
,
&
pvObj
);
ok
(
hres
==
S_OK
,
"IFont_QI does not return S_OK, but 0x%08lx"
,
hres
);
ok
(
pvObj
!=
NULL
,
"IFont_QI does return NULL, instead of a ptr"
);
}
dlls/oleaut32/variant.c
View file @
615615b0
...
@@ -1539,6 +1539,7 @@ static HRESULT Coerce( VARIANTARG* pd, LCID lcid, ULONG dwFlags, VARIANTARG* ps,
...
@@ -1539,6 +1539,7 @@ static HRESULT Coerce( VARIANTARG* pd, LCID lcid, ULONG dwFlags, VARIANTARG* ps,
case
(
VT_BOOL
):
case
(
VT_BOOL
):
switch
(
vtFrom
)
switch
(
vtFrom
)
{
{
case
(
VT_NULL
):
case
(
VT_EMPTY
):
case
(
VT_EMPTY
):
res
=
S_OK
;
res
=
S_OK
;
V_UNION
(
pd
,
boolVal
)
=
VARIANT_FALSE
;
V_UNION
(
pd
,
boolVal
)
=
VARIANT_FALSE
;
...
...
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