<div dir="ltr">[0] <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774062(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/bb774062(v=vs.85).aspx</a></div><div class="gmail_extra"><br>

<br><div class="gmail_quote">2014-07-23 14:57 GMT+08:00 Jactry Zeng <span dir="ltr"><<a href="mailto:jactry92@gmail.com" target="_blank">jactry92@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra">Hi,</div><div class="gmail_extra">2014-07-22 18:36 GMT+08:00 Huw Davies <<a href="mailto:huw@codeweavers.com" target="_blank">huw@codeweavers.com</a>>:<div class=""><br>><br>

> Before you start implementing the ITextSelection methods, have you<br>




> thought about how the ITextRange returned by<br>> ITextDocument::GetStoryRanges would work?<br>></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Do you mean ITextRange returned by ITextDocument::Range?</div>




<div class="gmail_extra">
ITextRange is returned by ITextDocument::Range and MS's Text Object Model</div><div class="gmail_extra">didn't implement ITextDocument::GetStoryRanges.[0]</div><div class="gmail_extra"><div class=""><br>> It seems to me it would be useful to have a text range object that<br>





> could be used by both, rather than implementing two lots of<br>> ITextRange methods.<br><br></div>I would like to write some helper functions(such as ME_ITextGetText and ME_ITextGetChar)</div><div class="gmail_extra">

and share them between ITextSelection and ITextRange.<br>

<a href="https://github.com/Jactry/wine/commit/91e4f9f1510cb71c3c5afe4bf9e4bc8cb6b4388f#diff-7422359fbc8e3da5f16777ae7e94ce42R2524" target="_blank">https://github.com/Jactry/wine/commit/91e4f9f1510cb71c3c5afe4bf9e4bc8cb6b4388f#diff-7422359fbc8e3da5f16777ae7e94ce42R2524</a><br clear="all">





<div><br></div><div>What ITextSelection is different to ITextRange is range of ITextSelection is changeful. Every time</div><div>we call ITextSelection::XXXX() a new range may be returned.</div><div>So I saved range of ITextRange in ITextRangeImpl. And just calling ME_GetSelection to get range of </div>



<div>ITextSelection every time we call ITextSelection::XXX().</div><div><a href="https://github.com/Jactry/wine/commit/6932adce0d97c3ddbbe737230694444b26b0473e#diff-7422359fbc8e3da5f16777ae7e94ce42R64" target="_blank">https://github.com/Jactry/wine/commit/6932adce0d97c3ddbbe737230694444b26b0473e#diff-7422359fbc8e3da5f16777ae7e94ce42R64</a><br>



</div><div><br></div><div>Is this a right way?</div><div><br></div><div>Thanks for your comment!</div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><div>Regards,<br></div><div>Jactry Zeng</div><div><br>

</div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Regards,<br></div><div>Jactry Zeng</div><div><br></div></div>
</div>