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
aba1e680
Commit
aba1e680
authored
May 17, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Added ITextFont stub.
parent
9cffed78
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
richole.c
dlls/riched20/richole.c
+0
-0
richole.c
dlls/riched20/tests/richole.c
+60
-0
No files found.
dlls/riched20/richole.c
View file @
aba1e680
This diff is collapsed.
Click to expand it.
dlls/riched20/tests/richole.c
View file @
aba1e680
...
...
@@ -35,6 +35,15 @@
static
HMODULE
hmoduleRichEdit
;
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
static
void
_expect_ref
(
IUnknown
*
obj
,
ULONG
ref
,
int
line
)
{
ULONG
rc
;
IUnknown_AddRef
(
obj
);
rc
=
IUnknown_Release
(
obj
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"expected refcount %d, got %d
\n
"
,
ref
,
rc
);
}
static
HWND
new_window
(
LPCSTR
lpClassName
,
DWORD
dwStyle
,
HWND
parent
)
{
HWND
hwnd
=
CreateWindowA
(
lpClassName
,
NULL
,
...
...
@@ -1081,6 +1090,56 @@ static void test_IOleInPlaceSite_GetWindow(void)
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
}
static
void
test_GetFont
(
void
)
{
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextRange
*
range
=
NULL
;
ITextFont
*
font
,
*
font2
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text1
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
hr
=
ITextDocument_Range
(
doc
,
0
,
4
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
1
);
hr
=
ITextRange_GetFont
(
range
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_GetFont
(
range
,
&
font
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
2
);
EXPECT_REF
(
font
,
1
);
hr
=
ITextRange_GetFont
(
range
,
&
font2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font
!=
font2
,
"got %p, %p
\n
"
,
font
,
font2
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
3
);
EXPECT_REF
(
font
,
1
);
EXPECT_REF
(
font2
,
1
);
ITextFont_Release
(
font
);
ITextFont_Release
(
font2
);
ITextRange_Release
(
range
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -1102,4 +1161,5 @@ START_TEST(richole)
test_IOleClientSite_QueryInterface
();
test_IOleWindow_GetWindow
();
test_IOleInPlaceSite_GetWindow
();
test_GetFont
();
}
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