2014-09-11 22:53 GMT+08:00 Huw Davies <huw@codeweavers.com>: > > Nice. Well hopefully nothing depends on that, so we don't have to follow > their broken implementation. I think you should implement it as I suggested > and don't bother adding tests for the exact refcount number (nothing should > care about the exact number anyway).
So these should been added into the implementation:
1. AddRef(reOle) in CreateITextRange() (both ITextDocument::Range and ITextRange::GetDuplicate
will call this function to fill a ITextRange interface); 2. Release(reOle) in ITextRange::Release()
3. Pass IRichEditOle and ITextRange into CreateITextRange() instead of IRichEditOleImpl and
ITextRangeImpl
Is it the right way?
Thanks again. :)
btw, the rangelist was implemented for ITextRange::Delete.
Range of all ITextRange in one IRichEditOle should be reseted after we used ITextRange::Delete to
delete some text in the RichEdit Control. And a rangelist will make this work easier.