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
b10b3918
Commit
b10b3918
authored
Sep 12, 2014
by
Jactry Zeng
Committed by
Alexandre Julliard
Sep 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Stub for ITextRange interface and implement ITextDocument::Range.
parent
29baed1b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
richole.c
dlls/riched20/richole.c
+0
-0
richole.c
dlls/riched20/tests/richole.c
+34
-1
No files found.
dlls/riched20/richole.c
View file @
b10b3918
This diff is collapsed.
Click to expand it.
dlls/riched20/tests/richole.c
View file @
b10b3918
...
@@ -86,10 +86,11 @@ static void create_interfaces(HWND *w, IRichEditOle **reOle, ITextDocument **txt
...
@@ -86,10 +86,11 @@ static void create_interfaces(HWND *w, IRichEditOle **reOle, ITextDocument **txt
static
void
release_interfaces
(
HWND
*
w
,
IRichEditOle
**
reOle
,
ITextDocument
**
txtDoc
,
static
void
release_interfaces
(
HWND
*
w
,
IRichEditOle
**
reOle
,
ITextDocument
**
txtDoc
,
ITextSelection
**
txtSel
)
ITextSelection
**
txtSel
)
{
{
if
(
txtSel
)
ITextSelection_Release
(
*
txtSel
);
ITextDocument_Release
(
*
txtDoc
);
ITextDocument_Release
(
*
txtDoc
);
IRichEditOle_Release
(
*
reOle
);
IRichEditOle_Release
(
*
reOle
);
DestroyWindow
(
*
w
);
DestroyWindow
(
*
w
);
ITextSelection_Release
(
*
txtSel
);
}
}
static
ULONG
get_refcount
(
IUnknown
*
iface
)
static
ULONG
get_refcount
(
IUnknown
*
iface
)
...
@@ -486,6 +487,37 @@ static void test_ITextSelection_GetText(void)
...
@@ -486,6 +487,37 @@ static void test_ITextSelection_GetText(void)
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
&
txtSel
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
&
txtSel
);
}
}
static
void
test_ITextDocument_Range
(
void
)
{
HWND
w
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
txtDoc
=
NULL
;
ITextRange
*
txtRge
=
NULL
;
ITextRange
*
pointer
=
NULL
;
HRESULT
hres
;
ULONG
refcount
;
create_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
hres
=
ITextDocument_Range
(
txtDoc
,
0
,
0
,
&
txtRge
);
ok
(
hres
==
S_OK
,
"ITextDocument_Range fails 0x%x.
\n
"
,
hres
);
refcount
=
get_refcount
((
IUnknown
*
)
txtRge
);
ok
(
refcount
==
1
,
"get wrong refcount: returned %d expected 1
\n
"
,
refcount
);
pointer
=
txtRge
;
hres
=
ITextDocument_Range
(
txtDoc
,
0
,
0
,
&
txtRge
);
ok
(
hres
==
S_OK
,
"ITextDocument_Range fails 0x%x.
\n
"
,
hres
);
ok
(
pointer
!=
txtRge
,
"A new pointer should be returned
\n
"
);
ITextRange_Release
(
pointer
);
hres
=
ITextDocument_Range
(
txtDoc
,
0
,
0
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"ITextDocument_Range should fail 0x%x.
\n
"
,
hres
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
hres
=
ITextRange_CanEdit
(
txtRge
,
NULL
);
ok
(
hres
==
CO_E_RELEASED
,
"ITextRange after ITextDocument destroyed
\n
"
);
ITextRange_Release
(
txtRge
);
}
START_TEST
(
richole
)
START_TEST
(
richole
)
{
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
@@ -496,4 +528,5 @@ START_TEST(richole)
...
@@ -496,4 +528,5 @@ START_TEST(richole)
test_Interfaces
();
test_Interfaces
();
test_ITextDocument_Open
();
test_ITextDocument_Open
();
test_ITextSelection_GetText
();
test_ITextSelection_GetText
();
test_ITextDocument_Range
();
}
}
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