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
d178e7ba
Commit
d178e7ba
authored
May 28, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Added GetStoryType().
parent
b4959154
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
6 deletions
+79
-6
riched_tom.idl
dlls/riched20/riched_tom.idl
+2
-0
richole.c
dlls/riched20/richole.c
+18
-6
richole.c
dlls/riched20/tests/richole.c
+57
-0
tom.idl
include/tom.idl
+2
-0
No files found.
dlls/riched20/riched_tom.idl
View file @
d178e7ba
...
...
@@ -147,6 +147,8 @@ typedef enum tagTomConstants
tomMatchWord
=
2
,
tomMatchCase
=
4
,
tomMatchPattern
=
8
,
/*
ITextRange
story
type
values
*/
tomUnknownStory
=
0
,
tomMainTextStory
=
1
,
tomFootnotesStory
=
2
,
...
...
dlls/riched20/richole.c
View file @
d178e7ba
...
...
@@ -1683,14 +1683,20 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ITextRange_fnGetStoryType
(
ITextRange
*
me
,
LONG
*
pV
alue
)
static
HRESULT
WINAPI
ITextRange_fnGetStoryType
(
ITextRange
*
me
,
LONG
*
v
alue
)
{
ITextRangeImpl
*
This
=
impl_from_ITextRange
(
me
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
value
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented %p
\n
"
,
This
);
return
E_NOTIMPL
;
if
(
!
value
)
return
E_INVALIDARG
;
*
value
=
tomUnknownStory
;
return
S_OK
;
}
static
HRESULT
range_Collapse
(
LONG
bStart
,
LONG
*
start
,
LONG
*
end
)
...
...
@@ -4125,14 +4131,20 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG *
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ITextSelection_fnGetStoryType
(
ITextSelection
*
me
,
LONG
*
pV
alue
)
static
HRESULT
WINAPI
ITextSelection_fnGetStoryType
(
ITextSelection
*
me
,
LONG
*
v
alue
)
{
ITextSelectionImpl
*
This
=
impl_from_ITextSelection
(
me
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
value
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented
\n
"
);
return
E_NOTIMPL
;
if
(
!
value
)
return
E_INVALIDARG
;
*
value
=
tomUnknownStory
;
return
S_OK
;
}
static
HRESULT
WINAPI
ITextSelection_fnCollapse
(
ITextSelection
*
me
,
LONG
bStart
)
...
...
dlls/riched20/tests/richole.c
View file @
d178e7ba
...
...
@@ -2867,6 +2867,62 @@ static void test_Select(void)
ITextSelection_Release
(
selection
);
}
static
void
test_GetStoryType
(
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_GetStoryType
(
range
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
value
=
tomTextFrameStory
;
hr
=
ITextRange_GetStoryType
(
range
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
tomUnknownStory
,
"got %d
\n
"
,
value
);
hr
=
ITextSelection_GetStoryType
(
selection
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
value
=
tomTextFrameStory
;
hr
=
ITextSelection_GetStoryType
(
selection
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
tomUnknownStory
,
"got %d
\n
"
,
value
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
hr
=
ITextRange_GetStoryType
(
range
,
NULL
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
value
=
123
;
hr
=
ITextRange_GetStoryType
(
range
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
123
,
"got %d
\n
"
,
value
);
hr
=
ITextSelection_GetStoryType
(
selection
,
NULL
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
value
=
123
;
hr
=
ITextSelection_GetStoryType
(
selection
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
ok
(
value
==
123
,
"got %d
\n
"
,
value
);
ITextRange_Release
(
range
);
ITextSelection_Release
(
selection
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -2897,4 +2953,5 @@ START_TEST(richole)
test_InRange
();
test_ITextRange_IsEqual
();
test_Select
();
test_GetStoryType
();
}
include/tom.idl
View file @
d178e7ba
...
...
@@ -134,6 +134,8 @@ typedef enum tagTomConstants
tomMatchWord
=
2
,
tomMatchCase
=
4
,
tomMatchPattern
=
8
,
/*
ITextRange
story
type
values
*/
tomUnknownStory
=
0
,
tomMainTextStory
=
1
,
tomFootnotesStory
=
2
,
...
...
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