Application for GSoC 2014 - riched20: implement ITextDocument::Range and ITextRange

Jactry Zeng jactry92 at gmail.com
Tue Apr 15 12:26:34 CDT 2014


Hello folks,

I began to work on ITextRange and ITextSelction in the past two weeks. I
have
implemented the ITextRange interface and some functions of it. And fixed
some
other bugs in dlls/riched20/richole.c.


1. Stub implementation of ITextRange interface
https://github.com/Jactry/wine/commit/0c79f0e0f6aba886b366e424608a74135cb88386
This is just an initial implementation. In order to implement all the
functions
of ITextRange, more members will be added to ITextRangeImpl struct. For
example,
according this test[0] we knew when some text in an ITextRange instance was
deleted,
range of ITextRange in the same RichEdit should adjust for this change.
(MSDN[1]
also has some description about this.) So we should add something to let all
ITextRange instance know each other and adjust others range after deleting
or
appending some text.

2. Initial implementation of ITextRange::GetText
https://github.com/Jactry/wine/commit/90dcce8bea58c789dcc82bde1ebd321205dade12
This is also an initial implementation, because I found range of all the
ITextRange
instances in an RichEdit would be reseted to (0, 0) and ITextRange::GetText
would
return a NULL BSTR[2] when the content in this RichEdit was changed by
WM_SETTEXT.
I think we may need to add a member to ME_TextEditor to let it know about
all
ITextRange of it, so it can reset the range of all ITextRange in it when
the content
was changed by WM_SETTEXT or any other functions.

Linked list may will be a good choice for the first problem.
Or anyone have a better way?
Any feedback will be appreciate!
Thank you! :)


[0]
https://github.com/Jactry/wine/commit/95e43da329dde420138bbf3b2e5c608c2a2ba685
[1]
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774058(v=vs.85).aspx
 [2]
https://github.com/Jactry/wine/commit/90dcce8bea58c789dcc82bde1ebd321205dade12#diff-c52a40c69f47b2440ad0672ffee8c9ffR506



-- 
Regards,
Jactry Zeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140416/9e2a6121/attachment.html>


More information about the wine-devel mailing list