Changeset 140 for trunk/NewView/HelpFile.pas
- Timestamp:
- Apr 30, 2007, 9:01:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/HelpFile.pas
r124 r140 157 157 BseErr, 158 158 StringUtilsUnit, 159 CharUtilsUnit, 159 160 DebugUnit, 160 ACLStringUtility,161 161 ACLFileIOUtility, 162 162 ACLLanguageUnit; … … 964 964 i: longint; 965 965 pFontSpec: pTHelpFontSpec; 966 tmpSubstitutionItems : TStringList; 967 tmpCounter : integer; 968 tmpDimensionParts : TStringList; 966 969 begin 967 970 ParseFontTable; // (re)load table from raw data 968 971 969 while Substitutions <> '' do 970 begin 971 Item := ExtractNextValue( Substitutions, ';' ); 972 tmpSubstitutionItems := TStringList.Create; 973 StrExtractStrings(tmpSubstitutionItems, Substitutions, [';'], #0); 974 975 for tmpCounter := 0 to tmpSubstitutionItems.Count - 1 do 976 begin 977 Item := tmpSubstitutionItems[tmpCounter]; 972 978 try 973 979 if Item <> '' then … … 975 981 // Look for space in xxxx WxH 976 982 977 SpacePos := FindCharFromEnd( Item, ' ');983 SpacePos := LastPosOfChar(' ', Item); 978 984 if SpacePos > 0 then 979 985 begin … … 981 987 FontName := StrLeft( Item, SpacePos - 1 ); 982 988 Delete( Item, 1, SpacePos ); 989 983 990 // width and height after, with an X between 984 W := StrToInt( ExtractNextValue( Item, 'x' ) ); 985 H := StrToInt( Item ); 991 tmpDimensionParts := TStringList.Create; 992 StrExtractStrings(tmpDimensionParts, Item, ['x'], #0); 993 W := StrToInt(tmpDimensionParts[0]); 994 H := StrToInt(tmpDimensionParts[1]); 995 tmpDimensionParts.Destroy; 986 996 if ( W > 0 ) and ( H > 0 ) then 987 997 begin … … 990 1000 begin 991 1001 pFontSpec := _FontTable[ i ]; 992 if StrNPas( pFontSpec ^. FaceName, 993 sizeof( pFontSpec ^. FaceName ) ) = FontName then 1002 if StrPasWithLength( pFontSpec^.FaceName, sizeof( pFontSpec^.FaceName ) ) = FontName then 994 1003 begin 995 1004 // same face name... … … 1007 1016 end; 1008 1017 end; 1018 1019 tmpSubstitutionItems.Destroy; 1009 1020 end; 1010 1021 … … 1026 1037 Result := ''; 1027 1038 1028 if Str ingsSame( Ext, '.inf' )1029 or Str ingsSame( Ext, '.hlp' ) then1039 if StrEqualIgnoringCase( Ext, '.inf' ) 1040 or StrEqualIgnoringCase( Ext, '.hlp' ) then 1030 1041 begin 1031 1042 szName := Filename;
Note:
See TracChangeset
for help on using the changeset viewer.