Ignore:
Timestamp:
Jun 13, 2007, 8:33:51 PM (18 years ago)
Author:
RBRi
Message:

using StringUtilsUnit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/RichTextDocumentUnit.pas

    r15 r214  
    118118uses
    119119  BseDOS, // for NLS/case mapping
    120   SysUtils, ACLStringUtility;
     120  SysUtils,
     121  CharUtilsUnit,
     122  StringUtilsUnit;
    121123
    122124const
     
    238240    end;
    239241
    240     if CurrentChar = DoubleQuote then
     242    if CurrentChar = CharDoubleQuote then
    241243    begin
    242244      if not InQuote then
     
    247249      begin
    248250        // Could be escaped quote ""
    249         if ( TextPointer + 1 ) ^ = DoubleQuote then
     251        if ( TextPointer + 1 ) ^ = CharDoubleQuote then
    250252        begin
    251253          // yes it is
     
    306308    end;
    307309
    308     if CurrentChar = DoubleQuote then
     310    if CurrentChar = CharDoubleQuote then
    309311    begin
    310312      if not InQuote then
     
    320322          InQuote := false;
    321323        end
    322         else if ( TextPointer - 1 ) ^ = DoubleQuote then
     324        else if ( TextPointer - 1 ) ^ = CharDoubleQuote then
    323325        begin
    324326          // yes it is
     
    502504    begin
    503505      try
    504         Color := HexToInt( StrRightFrom( ColorParam, 2 ) );
     506        Color := HexStrToLongInt( StrSubstringFrom( ColorParam, 2 ) );
    505507        Result := true;
    506508      except
     
    511513      for ColorIndex := 0 to High( StandardColors ) do
    512514      begin
    513         if StringsSame( ColorParam, StandardColors[ ColorIndex ].Name ) then
     515        if StrEqualIgnoringCase( ColorParam, StandardColors[ ColorIndex ].Name ) then
    514516        begin
    515517          Color := StandardColors[ ColorIndex ].Color;
     
    525527                              const Default: TTextAlignment ): TTextAlignment;
    526528begin
    527   if StringsSame( AlignParam, 'left' ) then
     529  if StrEqualIgnoringCase( AlignParam, 'left' ) then
    528530    Result := taLeft
    529   else if StringsSame( AlignParam, 'center' ) then
     531  else if StrEqualIgnoringCase( AlignParam, 'center' ) then
    530532    Result := taCenter
    531   else if StringsSame( AlignParam, 'right' ) then
     533  else if StrEqualIgnoringCase( AlignParam, 'right' ) then
    532534    Result := taRight
    533535  else
     
    537539function GetTagTextWrap( const WrapParam: string ): boolean;
    538540begin
    539   Result := StringsSame( WrapParam, 'yes' );
     541  Result := StrEqualIgnoringCase( WrapParam, 'yes' );
    540542end;
    541543
     
    619621            Result := true;
    620622            pMatch := pMatchStart;
    621             MatchLength := PCharDiff( P, pMatchStart )
     623            MatchLength := PCharPointerDiff( P, pMatchStart )
    622624                           + 1; // include this char
    623625            exit;
     
    746748  end;
    747749  pWordStart := P;
    748   WordLength := PCharDiff( pWordEnd, pWordStart );
     750  WordLength := PCharPointerDiff( pWordEnd, pWordStart );
    749751  Result := true;
    750752end;
     
    798800    P := NextP;
    799801  end;
    800   result := PCharDiff( Q, Buffer );
     802  result := PCharPointerDiff( Q, Buffer );
    801803end;
    802804
Note: See TracChangeset for help on using the changeset viewer.