Changeset 214 for trunk/Components/RichTextDocumentUnit.pas
- Timestamp:
- Jun 13, 2007, 8:33:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/RichTextDocumentUnit.pas
r15 r214 118 118 uses 119 119 BseDOS, // for NLS/case mapping 120 SysUtils, ACLStringUtility; 120 SysUtils, 121 CharUtilsUnit, 122 StringUtilsUnit; 121 123 122 124 const … … 238 240 end; 239 241 240 if CurrentChar = DoubleQuote then242 if CurrentChar = CharDoubleQuote then 241 243 begin 242 244 if not InQuote then … … 247 249 begin 248 250 // Could be escaped quote "" 249 if ( TextPointer + 1 ) ^ = DoubleQuote then251 if ( TextPointer + 1 ) ^ = CharDoubleQuote then 250 252 begin 251 253 // yes it is … … 306 308 end; 307 309 308 if CurrentChar = DoubleQuote then310 if CurrentChar = CharDoubleQuote then 309 311 begin 310 312 if not InQuote then … … 320 322 InQuote := false; 321 323 end 322 else if ( TextPointer - 1 ) ^ = DoubleQuote then324 else if ( TextPointer - 1 ) ^ = CharDoubleQuote then 323 325 begin 324 326 // yes it is … … 502 504 begin 503 505 try 504 Color := Hex ToInt( StrRightFrom( ColorParam, 2 ) );506 Color := HexStrToLongInt( StrSubstringFrom( ColorParam, 2 ) ); 505 507 Result := true; 506 508 except … … 511 513 for ColorIndex := 0 to High( StandardColors ) do 512 514 begin 513 if Str ingsSame( ColorParam, StandardColors[ ColorIndex ].Name ) then515 if StrEqualIgnoringCase( ColorParam, StandardColors[ ColorIndex ].Name ) then 514 516 begin 515 517 Color := StandardColors[ ColorIndex ].Color; … … 525 527 const Default: TTextAlignment ): TTextAlignment; 526 528 begin 527 if Str ingsSame( AlignParam, 'left' ) then529 if StrEqualIgnoringCase( AlignParam, 'left' ) then 528 530 Result := taLeft 529 else if Str ingsSame( AlignParam, 'center' ) then531 else if StrEqualIgnoringCase( AlignParam, 'center' ) then 530 532 Result := taCenter 531 else if Str ingsSame( AlignParam, 'right' ) then533 else if StrEqualIgnoringCase( AlignParam, 'right' ) then 532 534 Result := taRight 533 535 else … … 537 539 function GetTagTextWrap( const WrapParam: string ): boolean; 538 540 begin 539 Result := Str ingsSame( WrapParam, 'yes' );541 Result := StrEqualIgnoringCase( WrapParam, 'yes' ); 540 542 end; 541 543 … … 619 621 Result := true; 620 622 pMatch := pMatchStart; 621 MatchLength := PChar Diff( P, pMatchStart )623 MatchLength := PCharPointerDiff( P, pMatchStart ) 622 624 + 1; // include this char 623 625 exit; … … 746 748 end; 747 749 pWordStart := P; 748 WordLength := PChar Diff( pWordEnd, pWordStart );750 WordLength := PCharPointerDiff( pWordEnd, pWordStart ); 749 751 Result := true; 750 752 end; … … 798 800 P := NextP; 799 801 end; 800 result := PChar Diff( Q, Buffer );802 result := PCharPointerDiff( Q, Buffer ); 801 803 end; 802 804
Note:
See TracChangeset
for help on using the changeset viewer.