<div dir="ltr"><div><div><div><div>Hello folks,</div><div><br></div><div><br></div><div>I am Jactry Zeng, a junior who majoring in Electronic Science from China. And also a very</div><div>fresh developer of Wine. My nickname in #winehackers is jactry. :)</div>



<div><br></div><div>I would like to apply for this year's GSoC to work for Wine. I have entered Wine's GSoC last</div><div>year. What I have work for is ITextDocument, I implemented some functions of it. I got some</div>



<div>experience of Wine development and fixed some other bugs[0] of richedit during that time.</div><div><br></div><div>I continued the work of ITextDocument after GSoC, I know there is still a lot of work worth</div><div>



to do. Such as ITextDocument::Range[1], which is used to get an ITextRange object of the</div><div>content. And functions of ITextRange[2] are used to operate this range of text. Now in Wine,</div><div>ITextRange was implemented mix with ITextSelection[3][4]. And ITextDocument::GetSelection[5]</div>



<div>which is used to get an ITextSelection object is similar to ITextRange. In an easy way, we can</div><div>implement ITextDocument::Range using some cast (I have a dirty hack in attachment). But I</div><div>don't think it is a permanent solution.</div>



<div><br></div><div><br></div><div>There are four parts in my plan:</div><div><br></div><div>--- Part 0: Do some COM cleanup. ---</div><div><br></div><div>Because ITextRange is implemented mix with ITextSelection now, so we should do some COM </div>



<div>cleanup to create an ITextRange interface independently. And create a ITextSelection interface </div><div>inherits from ITextRange.</div><div>This is just the preparatory work for implementing ITextRange and I will begin this part before</div>



<div>GSoC. ( So it is signed as part zore :b )</div><div><br></div><div><br></div><div>--- Part 1: Implement ITextDocument::Range. ---</div><div><br></div><div>I will write more tests for ITextDocument::Range and ITextDocument::GetSelection first. Than try</div>



<div>to implement ITextDocumen::Range. </div><div>When this part is finished, bug 12458[6] and bug 18303[7] will benefit from it.</div><div><br></div><div><br></div><div>--- Part 2: Implement functions of ITextRange ---</div>



<div><br></div><div>In this part, I will try my best to implement some functions of ITextRange. I will write some</div><div>tests for them first and than implement them. I think this is the hard part.</div><div>And these functions will be implemented preferentially: GetText, GetDuplicate, GetStar, GetEnd,</div>



<div>Copy, SetText. Because GetDuplicate and GetEnd were needed by bug 18303, and these </div><div>functions seem was depend on the others.</div><div>After these functions were implemented, I think bug 18303 will be fixed!</div>



<div>( Oh, this one of my pursues! ;) )</div><div><br></div><div><br></div><div>--- Part 3: Imporve all the code for being merged by upstream. ---</div><div><br></div><div>This is the last part, I will improve all the patches for being merged by upstream, including what</div>



<div>I did last year. After this part is finished, Wine will really has an initial implementation of</div><div>ITextDocument and ITextRange. Maybe it will spend a lot of time, and I will continue this work</div><div>after GSoC if I can't finish all of this part during GSoC.</div>



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



<div>real world applications.<br></div><div><br></div><div><br></div><div>I appreciate for any comment.</div><div>Thank you. :)</div><div><br></div><div><br></div><div>attachments:</div>
<div>dirty hack of ITextDocument::Range: dirty_hack.txt</div><div>patch 0001: tests for ITextDocument_Range</div><div><br></div><div><br></div><div><br></div><div>[0] <a href="http://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=author&s=jactry" target="_blank">http://source.winehq.org/git/wine.git/?a=search&amp;h=HEAD&amp;st=author&amp;s=jactry</a></div>



<div>[1] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774097(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774097(v=vs.85).aspx</a></div><div>[2] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774058(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774058(v=vs.85).aspx</a></div>



<div>[3] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774060(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774060(v=vs.85).aspx</a></div><div>[4] <a href="http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/richole.c#l779" target="_blank">http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/riched20/richole.c#l779</a></div>



<div>[5] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774013(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774013(v=vs.85).aspx</a></div><div>[6] <a href="http://bugs.winehq.org/show_bug.cgi?id=12458" target="_blank">http://bugs.winehq.org/show_bug.cgi?id=12458</a></div>



<div>[7] <a href="http://bugs.winehq.org/show_bug.cgi?id=18303" target="_blank">http://bugs.winehq.org/show_bug.cgi?id=18303</a></div></div></div></div><div><br></div>-- <br><div dir="ltr"><div>Regards,<br></div><div>Jactry Zeng</div>


<div>
<br>
</div></div>
</div>