RVMisc.pas
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:2k
- {*******************************************************}
- { }
- { RichView }
- { Functions converting options of TFindDialog }
- { to options of RichView.SearchText and }
- { RichViewEdit.SearchText. }
- { }
- { Copyright (c) Sergey Tkachenko }
- { svt@trichview.com }
- { http://www.trichview.com }
- { }
- {*******************************************************}
- unit RVMisc;
- interface
- {$I RV_Defs.inc}
- uses RVScroll, RichView,
- {$IFNDEF RVDONOTUSERVF}
- RVEdit,
- {$ENDIF}
- Dialogs;
- function GetRVSearchOptions(fo: TFindOptions): TRVSearchOptions;
- {$IFNDEF RVDONOTUSERVF}
- function GetRVESearchOptions(fo: TFindOptions): TRVESearchOptions;
- {$ENDIF}
- {-----------------------------------------------------------------------}
- implementation
- {-----------------------------------------------------------------------}
- function GetRVSearchOptions(fo: TFindOptions): TRVSearchOptions;
- begin
- Result := [];
- if frMatchCase in fo then
- Include(Result,rvsroMatchCase);
- if frDown in fo then
- Include(Result,rvsroDown);
- if frWholeWord in fo then
- Include(Result, rvsroWholeWord);
- end;
- {-----------------------------------------------------------------------}
- {$IFNDEF RVDONOTUSERVF}
- function GetRVESearchOptions(fo: TFindOptions): TRVESearchOptions;
- begin
- Result := [];
- if frMatchCase in fo then
- Include(Result, rvseoMatchCase);
- if frDown in fo then
- Include(Result, rvseoDown);
- if frWholeWord in fo then
- Include(Result, rvseoWholeWord);
- end;
- {$ENDIF}
- end.