Hi to all,

Does someone know a reliable way to get the paragraph containing a TextRange (let's say it's collapsed), beside of course enumerating all paragraphs from the start of the text ? (which has linear complexity proportional to the number of paragraphs)

I have read in a mail of this list that the TextRange service implements XEnumerationAccess, apparently in the same way as the Text service does.
I have tried, and it seems to give some result, but :
- XEnumerationAccess on TextRange seems undocumented (at least in the SDK 2.0 I have); will this interface be maintained or published in the future ? - Can I be sure that it is the TextRange service itself that implements XEnumerationAccess, and not only some services including TextRange, such as TextCursor, TextPortion, etc. ? (I have tried on both TextCursor and TextPortion, it works)

For instance, is the following navigation in the text model valid :

Text -> by XEnumerationAccess, enumerate all Paragraph
Paragraph -> by XEnumerationAccess, enumerate all TextPortion
TextPortion -> since it includes TextRange, by XEnumerationAccess, enumerate again the (only) paragraph "contained" in the range of the portion

etc. ad infinitum ? It seems to work !

Thank you if you have any hint or confirmation of this surprising use of interfaces,

Julien Galand


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to