diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index 4276914dee..9f9ab986b8 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -111,11 +111,18 @@ type type + { TBMStringList } + + TBMStringList = class (TStringList) + protected + function DoCompareText(const s1,s2 : string) : PtrInt; override; + end; + { TBookmarkList } TBookmarkList=class private - FList: TStringlist; + FList: TBMStringList; FGrid: TCustomDbGrid; function GetCount: integer; function GetCurrentRowSelected: boolean; @@ -3463,7 +3470,7 @@ constructor TBookmarkList.Create(AGrid: TCustomDBGrid); begin inherited Create; FGrid := AGrid; - FList := TStringList.Create; + FList := TBMStringList.Create; FList.CaseSensitive:=True; FList.Sorted:=True; end; @@ -3528,6 +3535,19 @@ begin FGrid.Invalidate; end; +{ TBMStringList } + +function TBMStringList.DoCompareText(const s1, s2: string): PtrInt; +begin + if Length(s1)Length(s2) then + result := 1 + else + result := CompareMemRange(@s1[1],@s2[1], Length(s1)); +end; + initialization {$I lcl_dbgrid_images.lrs}