Hello folks,


I am Jactry Zeng, a junior who majoring in Electronic Science from China. And also a very
fresh developer of Wine. My nickname in #winehackers is jactry. :)

I would like to apply for this year's GSoC to work for Wine. I have entered Wine's GSoC last
year. What I have work for is ITextDocument, I implemented some functions of it. I got some
experience of Wine development and fixed some other bugs[0] of richedit during that time.

I continued the work of ITextDocument after GSoC, I know there is still a lot of work worth
to do. Such as ITextDocument::Range[1], which is used to get an ITextRange object of the
content. And functions of ITextRange[2] are used to operate this range of text. Now in Wine,
ITextRange was implemented mix with ITextSelection[3][4]. And ITextDocument::GetSelection[5]
which is used to get an ITextSelection object is similar to ITextRange. In an easy way, we can
implement ITextDocument::Range using some cast (I have a dirty hack in attachment). But I
don't think it is a permanent solution.


There are four parts in my plan:

--- Part 0: Do some COM cleanup. ---

Because ITextRange is implemented mix with ITextSelection now, so we should do some COM 
cleanup to create an ITextRange interface independently. And create a ITextSelection interface 
inherits from ITextRange.
This is just the preparatory work for implementing ITextRange and I will begin this part before
GSoC. ( So it is signed as part zore :b )


--- Part 1: Implement ITextDocument::Range. ---

I will write more tests for ITextDocument::Range and ITextDocument::GetSelection first. Than try
to implement ITextDocumen::Range. 
When this part is finished, bug 12458[6] and bug 18303[7] will benefit from it.


--- Part 2: Implement functions of ITextRange ---

In this part, I will try my best to implement some functions of ITextRange. I will write some
tests for them first and than implement them. I think this is the hard part.
And these functions will be implemented preferentially: GetText, GetDuplicate, GetStar, GetEnd,
Copy, SetText. Because GetDuplicate and GetEnd were needed by bug 18303, and these 
functions seem was depend on the others.
After these functions were implemented, I think bug 18303 will be fixed!
( Oh, this one of my pursues! ;) )


--- Part 3: Imporve all the code for being merged by upstream. ---

This is the last part, I will improve all the patches for being merged by upstream, including what
I did last year. After this part is finished, Wine will really has an initial implementation of
ITextDocument and ITextRange. Maybe it will spend a lot of time, and I will continue this work
after GSoC if I can't finish all of this part during GSoC.


I think after all these are finished not only bug 18303 and bug 12458 will benefit from it, but
also many other softwares. Because TOM interfaces are so important and be used frequently in 
real world applications.


I appreciate for any comment.
Thank you. :)


attachments:
dirty hack of ITextDocument::Range: dirty_hack.txt
patch 0001: tests for ITextDocument_Range



[0] http://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=author&s=jactry
[1] http://msdn.microsoft.com/en-us/library/windows/desktop/bb774097(v=vs.85).aspx
[2] http://msdn.microsoft.com/en-us/library/windows/desktop/bb774058(v=vs.85).aspx
[3] http://msdn.microsoft.com/en-us/library/windows/desktop/bb774060(v=vs.85).aspx
[4] http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/richole.c#l779
[5] http://msdn.microsoft.com/en-us/library/windows/desktop/bb774013(v=vs.85).aspx
[6] http://bugs.winehq.org/show_bug.cgi?id=12458
[7] http://bugs.winehq.org/show_bug.cgi?id=18303

--
Regards,
Jactry Zeng