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
20d6bc8a
Commit
20d6bc8a
authored
Jan 20, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Jan 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Implemented ITextServices TxGetText and TxSetText.
parent
e7b68a20
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
11 deletions
+35
-11
Makefile.in
dlls/riched20/Makefile.in
+1
-1
txtsrv.c
dlls/riched20/tests/txtsrv.c
+6
-6
txtsrv.c
dlls/riched20/txtsrv.c
+28
-4
No files found.
dlls/riched20/Makefile.in
View file @
20d6bc8a
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
riched20.dll
IMPORTLIB
=
riched20
IMPORTS
=
uuid ole32 imm32 user32 gdi32 kernel32
IMPORTS
=
uuid ole32
oleaut32
imm32 user32 gdi32 kernel32
C_SRCS
=
\
caret.c
\
...
...
dlls/riched20/tests/txtsrv.c
View file @
20d6bc8a
...
...
@@ -641,7 +641,7 @@ static void test_TxGetText(void)
return
;
hres
=
ITextServices_TxGetText
(
txtserv
,
&
rettext
);
todo_wine
ok
(
hres
==
S_OK
,
"ITextServices_TxGetText failed
\n
"
);
ok
(
hres
==
S_OK
,
"ITextServices_TxGetText failed
\n
"
);
IUnknown_Release
(
txtserv
);
CoTaskMemFree
(
dummyTextHost
);
...
...
@@ -657,14 +657,14 @@ static void test_TxSetText(void)
return
;
hres
=
ITextServices_TxSetText
(
txtserv
,
settext
);
todo_wine
ok
(
hres
==
S_OK
,
"ITextServices_TxSetText failed
\n
"
);
ok
(
hres
==
S_OK
,
"ITextServices_TxSetText failed
\n
"
);
hres
=
ITextServices_TxGetText
(
txtserv
,
&
rettext
);
todo_wine
ok
(
hres
==
S_OK
,
"ITextServices_TxGetText failed
\n
"
);
ok
(
hres
==
S_OK
,
"ITextServices_TxGetText failed
\n
"
);
todo_wine
ok
(
SysStringLen
(
rettext
)
==
4
,
ok
(
SysStringLen
(
rettext
)
==
4
,
"String returned of wrong length
\n
"
);
todo_wine
ok
(
memcmp
(
rettext
,
settext
,
SysStringByteLen
(
rettext
))
==
0
,
ok
(
memcmp
(
rettext
,
settext
,
SysStringByteLen
(
rettext
))
==
0
,
"String returned differs
\n
"
);
IUnknown_Release
(
txtserv
);
...
...
@@ -717,7 +717,7 @@ void test_TxGetNaturalSize() {
xdim
=
0
;
ydim
=
0
;
result
=
ITextServices_TxSetText
(
txtserv
,
oneA
);
todo_wine
ok
(
result
==
S_OK
,
"ITextServices_TxSetText failed
\n
"
);
ok
(
result
==
S_OK
,
"ITextServices_TxSetText failed
\n
"
);
result
=
ITextServices_TxGetNaturalSize
(
txtserv
,
DVASPECT_CONTENT
,
hdcDraw
,
NULL
,
NULL
,
...
...
dlls/riched20/txtsrv.c
View file @
20d6bc8a
...
...
@@ -27,6 +27,7 @@
#include "editor.h"
#include "ole2.h"
#include "oleauto.h"
#include "richole.h"
#include "imm.h"
#include "textserv.h"
...
...
@@ -276,9 +277,23 @@ HRESULT WINAPI fnTextSrv_TxGetText(ITextServices *iface,
BSTR
*
pbstrText
)
{
ICOM_THIS_MULTI
(
ITextServicesImpl
,
lpVtbl
,
iface
);
int
length
;
FIXME
(
"%p: STUB
\n
"
,
This
);
return
E_NOTIMPL
;
length
=
ME_GetTextLength
(
This
->
editor
);
if
(
length
)
{
BSTR
bstr
;
bstr
=
SysAllocStringByteLen
(
NULL
,
length
*
sizeof
(
WCHAR
));
if
(
bstr
==
NULL
)
return
E_OUTOFMEMORY
;
ME_GetTextW
(
This
->
editor
,
bstr
,
0
,
length
,
FALSE
);
*
pbstrText
=
bstr
;
}
else
{
*
pbstrText
=
NULL
;
}
return
S_OK
;
}
HRESULT
WINAPI
fnTextSrv_TxSetText
(
ITextServices
*
iface
,
...
...
@@ -286,8 +301,17 @@ HRESULT WINAPI fnTextSrv_TxSetText(ITextServices *iface,
{
ICOM_THIS_MULTI
(
ITextServicesImpl
,
lpVtbl
,
iface
);
FIXME
(
"%p: STUB
\n
"
,
This
);
return
E_NOTIMPL
;
ME_InternalDeleteText
(
This
->
editor
,
0
,
ME_GetTextLength
(
This
->
editor
),
FALSE
);
ME_InsertTextFromCursor
(
This
->
editor
,
0
,
pszText
,
-
1
,
This
->
editor
->
pBuffer
->
pDefaultStyle
);
ME_SetSelection
(
This
->
editor
,
0
,
0
);
This
->
editor
->
nModifyStep
=
0
;
OleFlushClipboard
();
ME_EmptyUndoStack
(
This
->
editor
);
ME_UpdateRepaint
(
This
->
editor
);
return
S_OK
;
}
HRESULT
WINAPI
fnTextSrv_TxGetCurrentTargetX
(
ITextServices
*
iface
,
...
...
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