Selection bounds and Unicode text
Posted: Tue Jan 15, 2008 1:45 pm
Hi there,
I'm trying to implement a "Find All" function which creates a list of all the hits from a particular search operation, using SearchTextW. I'm able to find each instance of the search text without problems, but I'm having trouble storing information about the hit (start location, length, and a "hit in context" string that I generate with GetTextRange). The obvious way to do this is to use RVLinear functions, but they all work with strings, not WideStrings. So I have a couple of questions:
1. Is there any plan to provide a WideString version of RVLinear.pas? I see you've created RVGetTextW.pas already; a version of RVLinearW.pas would be really handy.
2. If not, is there any way to store the details of the search hit? My problem here is that the document may contain tables, so I not only need to know the item number and offset, but also the RVData that contains the item.
3. Is there a simpler way to do this?
All help appreciated,
Martin
I'm trying to implement a "Find All" function which creates a list of all the hits from a particular search operation, using SearchTextW. I'm able to find each instance of the search text without problems, but I'm having trouble storing information about the hit (start location, length, and a "hit in context" string that I generate with GetTextRange). The obvious way to do this is to use RVLinear functions, but they all work with strings, not WideStrings. So I have a couple of questions:
1. Is there any plan to provide a WideString version of RVLinear.pas? I see you've created RVGetTextW.pas already; a version of RVLinearW.pas would be really handy.
2. If not, is there any way to store the details of the search hit? My problem here is that the document may contain tables, so I not only need to know the item number and offset, but also the RVData that contains the item.
3. Is there a simpler way to do this?
All help appreciated,
Martin