Changeset 140 for trunk/NewView/HelpTopic.pas
- Timestamp:
- Apr 30, 2007, 9:01:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NewView/HelpTopic.pas
r127 r140 253 253 NewViewConstantsUnit, 254 254 ACLUtility, 255 ACLStringUtility,256 255 ACLFileIOUtility, 257 256 AStringUtilityUnit, 258 257 ACLLanguageUnit, 259 258 StringUtilsUnit, 259 CharUtilsUnit, 260 260 SettingsUnit; 261 261 … … 565 565 566 566 Write( F, ':artwork name=' ); 567 Write( F, Str Quote( 'img' + IntToStr( ImageIndex ) + '.bmp') );567 Write( F, StrInSingleQuotes('img' + IntToStr(ImageIndex) + '.bmp') ); 568 568 569 569 case BitmapFlags and 7 of … … 826 826 end; 827 827 828 // TODO 828 829 function FullDoubleQuote( const s: string ): string; 829 830 begin 830 Result := DoubleQuote 831 + InsertDuplicateChars( s, 832 DoubleQuote ) 833 + DoubleQuote; 831 Result := StrDoubleQuote 832 + StrEscapeAllCharsBy(s, [], CharDoubleQuote) 833 + StrDoubleQuote; 834 834 end; 835 835 … … 906 906 ProgramFilename: string; 907 907 ProgramInfo : TSerializableStringList; 908 tmpProgramLinkParts : TStringList; 908 909 909 910 OutputString: string; … … 1031 1032 // :link reftype=hd refid=... database=<filename> 1032 1033 ExternalLinkFileIndex := ( pData + 2 )^; 1033 ExternalLinkTopicID := Str NPas( pchar( pData + 4 ), ( pData + 3 )^ );1034 ExternalLinkTopicID := StrPasWithLength( pchar( pData + 4 ), ( pData + 3 )^ ); 1034 1035 OutputString := '<blue><link ' + PARAM_LINK_EXTERNAL + ' ' 1035 1036 + IntToStr( ExternalLinkFileIndex ) … … 1043 1044 begin 1044 1045 CheckForAutoURL( Text, State ); 1045 ProgramLink := StrNPas( pchar( pData + 3 ), EscapeLen - 3 ); 1046 ProgramPath := ExtractNextValue( ProgramLink, ' ' ); 1046 ProgramLink := StrPasWithLength( pchar( pData + 3 ), EscapeLen - 3 ); 1047 1048 tmpProgramLinkParts := TStringList.Create; 1049 StrExtractStrings(tmpProgramLinkParts, ProgramLink, [' '], #0); 1050 ProgramPath := tmpProgramLinkParts[0]; 1051 tmpProgramLinkParts.Destroy; 1052 1047 1053 ProgramFilename := ExtractFilename( ProgramPath ); 1048 if StrStarts( 'netscape', ProgramFilename ) 1049 or StrStarts( 'explore', ProgramFilename ) // web explorer? 1050 or StrStarts( 'mozilla', ProgramFilename ) 1054 1055 if StrStartsWithIgnoringCase(PRGM_EXPLORER, ProgramFilename ) // web explorer? 1056 or StrStartsWithIgnoringCase(PRGM_NETSCAPE, ProgramFilename ) 1057 or StrStartsWithIgnoringCase(PRGM_MOZILLA, ProgramFilename ) 1058 or StrStartsWithIgnoringCase(PRGM_FIREFOX, ProgramFilename ) 1051 1059 then 1052 1060 begin … … 1201 1209 begin 1202 1210 pFontSpec := _FontTable[ FontIndex ]; 1203 FaceName := Str NPas( pFontSpec ^. FaceName,1211 FaceName := StrPasWithLength( pFontSpec ^. FaceName, 1204 1212 sizeof( pFontSpec ^. FaceName ) ); 1205 1213 // arbitrarily and capriciously use specified height * 2/3 … … 1511 1519 1512 1520 // s := pstring( _GlobalDictionary[ DictIndex ] )^; // for debug only 1513 if not IsSpaces( pstring( _GlobalDictionary[ DictIndex ] )^ ) then1521 if not StrIsEmptyOrSpaces( pstring( _GlobalDictionary[ DictIndex ] )^ ) then 1514 1522 begin 1515 1523 if pSequenceStepWords^[ DictIndex ] = 0 then … … 1638 1646 StringToAdd := ''; 1639 1647 1640 if IsSpaces( StringToAdd ) then1648 if StrIsEmptyOrSpaces( StringToAdd ) then 1641 1649 begin 1642 1650 // spaces only... … … 2022 2030 2023 2031 if GlobalDictIndex < _GlobalDictionary.Count then 2024 if not IsSpaces( pstring( _GlobalDictionary[ GlobalDictIndex ] )^ ) then;2032 if not StrIsEmptyOrSpaces( pstring( _GlobalDictionary[ GlobalDictIndex ] )^ ) then; 2025 2033 WordRelevance := pStepWordRelevances[ GlobalDictIndex ]; 2026 2034 … … 2265 2273 ProgramLink: string; 2266 2274 ProgramPath: string; 2275 tmpProgramLinkParts : TStringList; 2267 2276 2268 2277 OutputString: string; … … 2372 2381 begin 2373 2382 ExternalLinkFileIndex := ( pData + 2 )^; 2374 ExternalLinkTopicID := Str NPas( pchar( pData + 4 ), ( pData + 3 )^ );2383 ExternalLinkTopicID := StrPasWithLength( pchar( pData + 4 ), ( pData + 3 )^ ); 2375 2384 Write( F, ':link reftype=hd ' 2376 + ' refid=' + Str Quote( ExternalLinkTopicID )2377 + ' database=' + Str Quote( _ReferencedFiles[ ExternalLinkFileIndex ] )2385 + ' refid=' + StrInSingleQuotes( ExternalLinkTopicID ) 2386 + ' database=' + StrInSingleQuotes( _ReferencedFiles[ ExternalLinkFileIndex ] ) 2378 2387 + '.' ); 2379 2388 … … 2382 2391 ecProgramLink: 2383 2392 begin 2384 ProgramLink := StrNPas( pchar( pData + 3 ), EscapeLen - 3 ); 2385 ProgramPath := ExtractNextValue( ProgramLink, ' ' ); 2393 ProgramLink := StrPasWithLength( pchar( pData + 3 ), EscapeLen - 3 ); 2394 2395 tmpProgramLinkParts := TStringList.Create; 2396 StrExtractStrings(tmpProgramLinkParts, ProgramLink, [' '], #0); 2397 ProgramPath := tmpProgramLinkParts[0]; 2398 tmpProgramLinkParts.Destroy; 2399 2386 2400 Write( F, ':link reftype=launch' 2387 + ' object=' + Str Quote( ProgramPath )2388 + ' data=' + Str Quote( ProgramLink )2401 + ' object=' + StrInSingleQuotes( ProgramPath ) 2402 + ' data=' + StrInSingleQuotes( ProgramLink ) 2389 2403 + '.' ); 2390 2404 end; … … 2506 2520 begin 2507 2521 pFontSpec := _FontTable[ FontIndex ]; 2508 FaceName := Str NPas( pFontSpec ^. FaceName,2522 FaceName := StrPasWithLength( pFontSpec ^. FaceName, 2509 2523 sizeof( pFontSpec ^. FaceName ) ); 2510 2524 Write( F, 2511 ':font facename=' + Str Quote( FaceName )2525 ':font facename=' + StrInSingleQuotes( FaceName ) 2512 2526 + ' size=' + IntToStr( pFontSpec ^. Height ) 2513 2527 + 'x' + IntToStr( pFontSpec ^. Width )
Note:
See TracChangeset
for help on using the changeset viewer.