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
c1ce95dc
Commit
c1ce95dc
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 GetPara() for selection range.
parent
29c47def
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
richole.c
dlls/riched20/richole.c
+7
-2
richole.c
dlls/riched20/tests/richole.c
+36
-2
No files found.
dlls/riched20/richole.c
View file @
c1ce95dc
...
...
@@ -4031,11 +4031,16 @@ static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pF
static
HRESULT
WINAPI
ITextSelection_fnGetPara
(
ITextSelection
*
me
,
ITextPara
**
para
)
{
ITextSelectionImpl
*
This
=
impl_from_ITextSelection
(
me
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
para
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented
\n
"
);
return
E_NOTIMPL
;
if
(
!
para
)
return
E_INVALIDARG
;
return
create_textpara
((
ITextRange
*
)
me
,
para
);
}
static
HRESULT
WINAPI
ITextSelection_fnSetPara
(
ITextSelection
*
me
,
ITextPara
*
pPara
)
...
...
dlls/riched20/tests/richole.c
View file @
c1ce95dc
...
...
@@ -1650,12 +1650,13 @@ static void test_GetPara(void)
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextSelection
*
selection
;
ITextRange
*
range
=
NULL
;
ITextPara
*
para
,
*
para2
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
&
selection
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text1
);
EXPECT_REF
(
reOle
,
3
);
...
...
@@ -1691,8 +1692,41 @@ static void test_GetPara(void)
ITextPara_Release
(
para
);
ITextPara_Release
(
para2
);
ITextRange_Release
(
range
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
selection
,
2
);
hr
=
ITextSelection_GetPara
(
selection
,
&
para
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
selection
,
3
);
EXPECT_REF
(
para
,
1
);
hr
=
ITextSelection_GetPara
(
selection
,
&
para2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
para
!=
para2
,
"got %p, %p
\n
"
,
para
,
para2
);
ITextPara_Release
(
para
);
ITextPara_Release
(
para2
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
hr
=
ITextRange_GetPara
(
range
,
NULL
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_GetPara
(
range
,
&
para
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextSelection_GetPara
(
selection
,
NULL
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextSelection_GetPara
(
selection
,
&
para
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
ITextSelection_Release
(
selection
);
ITextRange_Release
(
range
);
}
static
void
test_dispatch
(
void
)
...
...
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