Changeset 252 for trunk/NewView
- Timestamp:
- Sep 21, 2007, 5:57:18 PM (18 years ago)
- Location:
- trunk/NewView
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/HelpFile.pas
r228 r252 669 669 var 670 670 i: longint; 671 tmpIndex: String; 671 672 begin 672 673 result := nil; … … 674 675 for i := 0 to _Index.Count - 1 do 675 676 begin 676 if StrStartsWithIgnoringCase( SearchText, _Index.ValuePtrs[ i ] ^ ) then 677 tmpIndex := _Index.ValuePtrs[i]^; 678 if StrStartsWithIgnoringCase(tmpIndex, SearchText) then 677 679 begin 678 680 // found … … 718 720 if tmpLevel = tmpTopic.ContentsLevel then 719 721 begin 720 if StrStartsWithIgnoringCase( SearchText, tmpTopic.TitlePtr ^) then722 if StrStartsWithIgnoringCase(tmpTopic.TitlePtr^, SearchText) then 721 723 begin 722 724 result := tmpTopic; -
trunk/NewView/HelpTopic.pas
r228 r252 1052 1052 ProgramFilename := ExtractFilename( ProgramPath ); 1053 1053 1054 if StrStartsWithIgnoringCase(P RGM_EXPLORER, ProgramFilename ) // web explorer?1055 or StrStartsWithIgnoringCase(P RGM_NETSCAPE, ProgramFilename)1056 or StrStartsWithIgnoringCase(P RGM_MOZILLA, ProgramFilename)1057 or StrStartsWithIgnoringCase(P RGM_FIREFOX, ProgramFilename)1054 if StrStartsWithIgnoringCase(ProgramFilename, PRGM_EXPLORER) 1055 or StrStartsWithIgnoringCase(ProgramFilename, PRGM_NETSCAPE) 1056 or StrStartsWithIgnoringCase(ProgramFilename, PRGM_MOZILLA) 1057 or StrStartsWithIgnoringCase(ProgramFilename, PRGM_FIREFOX) 1058 1058 then 1059 1059 begin -
trunk/NewView/MainForm.pas
r236 r252 2384 2384 Filename := THelpFile( CurrentOpenFiles[ 0 ] ).Filename; 2385 2385 NamePart := ExtractFileName( Filename ); 2386 Result := StrStartsWithIgnoringCase( 'newview', NamePart);2386 Result := StrStartsWithIgnoringCase(NamePart, 'newview'); 2387 2387 end; 2388 2388 … … 4487 4487 End; 4488 4488 4489 Procedure TMainForm.IndexSearchEditOnScan (Sender: TObject; 4490 Var KeyCode: TKeyCode); 4489 Procedure TMainForm.IndexSearchEditOnScan (Sender: TObject; Var KeyCode: TKeyCode); 4491 4490 Begin 4492 4491 case KeyCode of … … 4515 4514 Procedure TMainForm.IndexSearchEditOnChange (Sender: TObject); 4516 4515 var 4517 MatchIndex: longint;4518 IndexINdex: longint;4519 SearchText: string;4516 tmpMatchIndex : longint; 4517 tmpSearchText: string; 4518 i : longint; 4520 4519 Begin 4521 4520 if InIndexSearch then 4522 4521 exit; 4523 4522 4524 MatchIndex:= -1; 4525 SearchText:= trim( IndexSearchEdit.Text ); 4526 for IndexIndex:= 0 to DisplayedIndex.Count - 1 do 4527 begin 4528 if StrStartsWithIgnoringCase( SearchText, DisplayedIndex[ IndexIndex ] ) then //IndexEntry ) then 4523 tmpMatchIndex := -1; 4524 tmpSearchText := trim(IndexSearchEdit.Text); 4525 4526 for i := 0 to DisplayedIndex.Count - 1 do 4527 begin 4528 if StrStartsWithIgnoringCase(DisplayedIndex[i], tmpSearchText) then 4529 4529 begin 4530 MatchIndex:= IndexIndex;4530 tmpMatchIndex := i; 4531 4531 break; 4532 4532 end; 4533 4533 end; 4534 4534 4535 if MatchIndex = -1 then4535 if tmpMatchIndex = -1 then 4536 4536 exit; 4537 4537 4538 4538 InIndexSearch:= true; 4539 4539 4540 if IndexListBox.ItemIndex <> MatchIndex then4541 IndexListBox.ItemIndex:= MatchIndex;4540 if IndexListBox.ItemIndex <> tmpMatchIndex then 4541 IndexListBox.ItemIndex:= tmpMatchIndex; 4542 4542 4543 4543 InIndexSearch:= false; -
trunk/NewView/SearchUnit.pas
r115 r252 168 168 begin 169 169 DictWord := HelpFile.DictionaryWords[ DictIndex ]; 170 if StrStartsWithIgnoringCase( SearchWord, DictWord) then170 if StrStartsWithIgnoringCase(DictWord, SearchWord) then 171 171 Results[ DictIndex ] := MatchedWordRelevance( SearchWord, DictWord ); 172 172 end;
Note:
See TracChangeset
for help on using the changeset viewer.