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
cb095a82
Commit
cb095a82
authored
May 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Implement Select().
parent
6ccfde32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
richole.c
dlls/riched20/richole.c
+10
-4
richole.c
dlls/riched20/tests/richole.c
+45
-0
No files found.
dlls/riched20/richole.c
View file @
cb095a82
...
...
@@ -1825,11 +1825,14 @@ static HRESULT WINAPI ITextRange_fnIsEqual(ITextRange *me, ITextRange *range, LO
static
HRESULT
WINAPI
ITextRange_fnSelect
(
ITextRange
*
me
)
{
ITextRangeImpl
*
This
=
impl_from_ITextRange
(
me
);
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented %p
\n
"
,
This
);
return
E_NOTIMPL
;
ME_SetSelection
(
This
->
reOle
->
editor
,
This
->
start
,
This
->
end
);
return
S_OK
;
}
static
HRESULT
WINAPI
ITextRange_fnStartOf
(
ITextRange
*
me
,
LONG
Unit
,
LONG
Extend
,
...
...
@@ -4240,11 +4243,14 @@ static HRESULT WINAPI ITextSelection_fnIsEqual(ITextSelection *me, ITextRange *r
static
HRESULT
WINAPI
ITextSelection_fnSelect
(
ITextSelection
*
me
)
{
ITextSelectionImpl
*
This
=
impl_from_ITextSelection
(
me
);
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented
\n
"
);
return
E_NOTIMPL
;
/* nothing to do */
return
S_OK
;
}
static
HRESULT
WINAPI
ITextSelection_fnStartOf
(
ITextSelection
*
me
,
LONG
Unit
,
LONG
Extend
,
...
...
dlls/riched20/tests/richole.c
View file @
cb095a82
...
...
@@ -2746,6 +2746,50 @@ static void test_ITextRange_IsEqual(void)
ITextSelection_Release
(
selection
);
}
static
void
test_Select
(
void
)
{
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextSelection
*
selection
;
ITextRange
*
range
;
LONG
value
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
&
selection
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text1
);
SendMessageA
(
hwnd
,
EM_SETSEL
,
1
,
2
);
hr
=
ITextDocument_Range
(
doc
,
0
,
4
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_Select
(
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
value
=
1
;
hr
=
ITextSelection_GetStart
(
selection
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
0
,
"got %d
\n
"
,
value
);
hr
=
ITextRange_Select
(
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextSelection_Select
(
selection
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
hr
=
ITextRange_Select
(
range
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextSelection_Select
(
selection
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
ITextRange_Release
(
range
);
ITextSelection_Release
(
selection
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -2775,4 +2819,5 @@ START_TEST(richole)
test_SetText
();
test_InRange
();
test_ITextRange_IsEqual
();
test_Select
();
}
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