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
be37e951
Commit
be37e951
authored
Aug 02, 2006
by
Benjamin Arai
Committed by
Alexandre Julliard
Aug 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement function olefont:OLEFontImpl_IsEqual.
parent
41641554
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
olefont.c
dlls/oleaut32/olefont.c
+31
-2
olefont.c
dlls/oleaut32/tests/olefont.c
+0
-20
No files found.
dlls/oleaut32/olefont.c
View file @
be37e951
...
...
@@ -1139,8 +1139,37 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
IFont
*
iface
,
IFont
*
pFontOther
)
{
FIXME
(
"(%p, %p), stub!
\n
"
,
iface
,
pFontOther
);
return
E_NOTIMPL
;
OLEFontImpl
*
left
=
(
OLEFontImpl
*
)
iface
;
OLEFontImpl
*
right
=
(
OLEFontImpl
*
)
pFontOther
;
HRESULT
hres
;
INT
left_len
,
right_len
;
if
((
iface
==
NULL
)
||
(
pFontOther
==
NULL
))
return
E_POINTER
;
else
if
(
left
->
description
.
cySize
.
s
.
Lo
!=
right
->
description
.
cySize
.
s
.
Lo
)
return
S_FALSE
;
else
if
(
left
->
description
.
cySize
.
s
.
Hi
!=
right
->
description
.
cySize
.
s
.
Hi
)
return
S_FALSE
;
else
if
(
left
->
description
.
sWeight
!=
right
->
description
.
sWeight
)
return
S_FALSE
;
else
if
(
left
->
description
.
sCharset
!=
right
->
description
.
sCharset
)
return
S_FALSE
;
else
if
(
left
->
description
.
fItalic
!=
right
->
description
.
fItalic
)
return
S_FALSE
;
else
if
(
left
->
description
.
fUnderline
!=
right
->
description
.
fUnderline
)
return
S_FALSE
;
else
if
(
left
->
description
.
fStrikethrough
!=
right
->
description
.
fStrikethrough
)
return
S_FALSE
;
/* Check from string */
left_len
=
strlenW
(
left
->
description
.
lpstrName
);
right_len
=
strlenW
(
right
->
description
.
lpstrName
);
hres
=
CompareStringW
(
0
,
0
,
left
->
description
.
lpstrName
,
left_len
,
right
->
description
.
lpstrName
,
right_len
);
if
(
hres
!=
CSTR_EQUAL
)
return
S_FALSE
;
return
S_OK
;
}
/************************************************************************
...
...
dlls/oleaut32/tests/olefont.c
View file @
be37e951
...
...
@@ -503,27 +503,21 @@ static void test_IsEqual()
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
ifnt2
=
pvObj2
;
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_OK
,
"IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08lx
\n
"
,
hres
);
}
IFont_Release
(
ifnt2
);
/* Check for bad pointer */
hres
=
IFont_IsEqual
(
ifnt
,
NULL
);
todo_wine
{
ok
(
hres
==
E_POINTER
,
"IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08lx
\n
"
,
hres
);
}
/* Test strName */
fd
.
lpstrName
=
(
WCHAR
*
)
arial_font
;
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
lpstrName
=
(
WCHAR
*
)
system_font
;
IFont_Release
(
ifnt2
);
...
...
@@ -532,10 +526,8 @@ static void test_IsEqual()
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
ifnt2
=
pvObj2
;
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
S
(
fd
.
cySize
).
Lo
=
100
;
IFont_Release
(
ifnt2
);
...
...
@@ -544,10 +536,8 @@ static void test_IsEqual()
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
ifnt2
=
pvObj2
;
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
S
(
fd
.
cySize
).
Hi
=
100
;
IFont_Release
(
ifnt2
);
...
...
@@ -556,10 +546,8 @@ static void test_IsEqual()
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
ifnt2
=
pvObj2
;
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
sWeight
=
0
;
IFont_Release
(
ifnt2
);
...
...
@@ -567,10 +555,8 @@ static void test_IsEqual()
fd
.
sCharset
=
1
;
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
sCharset
=
0
;
IFont_Release
(
ifnt2
);
...
...
@@ -578,10 +564,8 @@ static void test_IsEqual()
fd
.
fItalic
=
1
;
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
fItalic
=
0
;
IFont_Release
(
ifnt2
);
...
...
@@ -589,10 +573,8 @@ static void test_IsEqual()
fd
.
fUnderline
=
1
;
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
fUnderline
=
0
;
IFont_Release
(
ifnt2
);
...
...
@@ -600,10 +582,8 @@ static void test_IsEqual()
fd
.
fStrikethrough
=
1
;
pOleCreateFontIndirect
(
&
fd
,
&
IID_IFont
,
&
pvObj2
);
hres
=
IFont_IsEqual
(
ifnt
,
ifnt2
);
todo_wine
{
ok
(
hres
==
S_FALSE
,
"IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08lx
\n
"
,
hres
);
}
fd
.
fStrikethrough
=
0
;
IFont_Release
(
ifnt2
);
...
...
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