Hi there,
Since Unicode text searching isn't implemented yet, I've been trying to create a workaround that involves searching a plain text version of the text and setting the selection with RVLinear:
RVSetSelection(MyRichViewEdit, HitLocation, Length(SearchString));
This is working OK except where there are bulletted or numbered lists in the text; the bullets and numbers seem to be missing from the plain text version. I'm getting the plain text copy by selecting everything in the control, then doing GetSelTextW. Is there any way I could get a plain-text copy that would include the extra bullet/numbering characters, so my search offsets are correct?
All help appreciated,
Martin
Unicode text search strategies
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
As far as I remember, RVLinear's functions treat list markers like any other non-text item (except for tables), i.e. they are treated like space character.
It should not cause problem for RVSetSelection, if its parameters were received from RVGetSelection or RVGetLinearCaretPos.
The only text exporting function which returns string having one-to-one correspondence to places in the document is GetTextRange from RVLinear.pas. It treats all non-text items (except for tables) as one space character. Other functions may ignore non-text items, or return multicharacter text representations of them.
It should not cause problem for RVSetSelection, if its parameters were received from RVGetSelection or RVGetLinearCaretPos.
The only text exporting function which returns string having one-to-one correspondence to places in the document is GetTextRange from RVLinear.pas. It treats all non-text items (except for tables) as one space character. Other functions may ignore non-text items, or return multicharacter text representations of them.
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm