Changeset 133 for trunk/Packages/VCard


Ignore:
Timestamp:
Apr 10, 2022, 1:39:35 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Show number of removed duplicates.
  • Fixed: Set document as modified only if data are really changed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/VCard/UVCard.pas

    r132 r133  
    209209    procedure Merge(Contact: TContact; FieldIndex: TContactFieldIndex);
    210210    function ToString: ansistring; override;
    211     procedure RemoveExactDuplicates;
     211    function RemoveExactDuplicates: Integer;
    212212    procedure Sort;
    213213  end;
     
    12421242end;
    12431243
    1244 procedure TContacts.RemoveExactDuplicates;
     1244function TContacts.RemoveExactDuplicates: Integer;
    12451245var
    12461246  I: Integer;
    12471247  J: Integer;
    12481248begin
     1249  Result := 0;
    12491250  for I := 0 to Count - 1 do
    12501251    for J := Count - 1 downto I + 1 do
    12511252      if Items[I].CompareTo(Items[J]) then begin
    12521253        Remove(Items[J]);
     1254        Inc(Result);
    12531255      end;
    12541256end;
Note: See TracChangeset for help on using the changeset viewer.