mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 21:18:01 +02:00
LCL: Remove UTF8CompareLatinTextFast calls.
This commit is contained in:
parent
08c0f4865d
commit
c285b58aa3
@ -11734,7 +11734,7 @@ begin
|
||||
if Assigned(OnCompareCells) then
|
||||
Result:=inherited DoCompareCells(Acol, ARow, Bcol, BRow)
|
||||
else begin
|
||||
Result:=UTF8CompareLatinTextFast(Cells[ACol,ARow], Cells[BCol,BRow]);
|
||||
Result:=AnsiCompareText(Cells[ACol,ARow], Cells[BCol,BRow]);
|
||||
if SortOrder=soDescending then
|
||||
result:=-result;
|
||||
end;
|
||||
|
@ -968,14 +968,14 @@ var i: integer;
|
||||
begin
|
||||
// insert as first
|
||||
if (Items.Count=0)
|
||||
or (not CaseSensitive and (UTF8CompareLatinTextFast(Items[0],Item)<>0))
|
||||
or (not CaseSensitive and (AnsiCompareText(Items[0],Item)<>0))
|
||||
or (CaseSensitive and (Items[0]<>Item)) then
|
||||
begin
|
||||
Items.InsertObject(0,Item,AnObject);
|
||||
end;
|
||||
// delete old
|
||||
for i:=Items.Count-1 downto 1 do begin
|
||||
if (not CaseSensitive and (UTF8CompareLatinTextFast(Items[i],Item)=0))
|
||||
if (not CaseSensitive and (AnsiCompareText(Items[i],Item)=0))
|
||||
or (CaseSensitive and (Items[i]=Item)) then
|
||||
Items.Delete(i);
|
||||
end;
|
||||
|
@ -628,7 +628,7 @@ begin
|
||||
begin
|
||||
XMLFontConfigChilds := XMLFontConfig.ChildNodes;
|
||||
for i := 0 to XMLFontConfigChilds.Count-1 do
|
||||
if UTF8CompareLatinTextFast(XMLFontConfigChilds.Item[i].NodeName, 'dir') = 0 then
|
||||
if CompareText(XMLFontConfigChilds.Item[i].NodeName, 'dir') = 0 then
|
||||
FontsScanDir(XMLFontConfigChilds.Item[i].FirstChild.NodeValue,AFontPaths,AFontList);
|
||||
end;
|
||||
finally
|
||||
|
@ -27,7 +27,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, LazUtilities, LazLoggerBase, LazUTF8, LazConfigStorage, Masks,
|
||||
FileUtil, LazFileUtils, LazUtilities, LazLoggerBase, LazConfigStorage, Masks,
|
||||
// LCL
|
||||
LCLStrConsts, Dialogs, HelpIntfs;
|
||||
|
||||
@ -1075,7 +1075,7 @@ begin
|
||||
for i:=0 to FSearchItems.Count-1 do begin
|
||||
Node:=THelpDBItem(FSearchItems[i]).Node;
|
||||
if (Node=nil) or (not Node.IDValid) then continue;
|
||||
if UTF8CompareLatinTextFast(Node.ID,HelpKeyword)<>0 then continue;
|
||||
if AnsiCompareText(Node.ID,HelpKeyword)<>0 then continue;
|
||||
CreateNodeQueryListAndAdd(Node,nil,ListOfNodes,true);
|
||||
end;
|
||||
end;
|
||||
@ -1097,7 +1097,7 @@ begin
|
||||
for i:=0 to FSearchItems.Count-1 do begin
|
||||
Node:=THelpDBItem(FSearchItems[i]).Node;
|
||||
if (Node=nil) or (not Node.IDValid) then continue;
|
||||
if UTF8CompareLatinTextFast(Node.ID,HelpDirective)<>0 then continue;
|
||||
if AnsiCompareText(Node.ID,HelpDirective)<>0 then continue;
|
||||
CreateNodeQueryListAndAdd(Node,nil,ListOfNodes,true);
|
||||
end;
|
||||
end;
|
||||
@ -1395,7 +1395,7 @@ end;
|
||||
function THelpDatabases.IndexOf(ID: THelpDatabaseID): integer;
|
||||
begin
|
||||
Result:=Count-1;
|
||||
while (Result>=0) and (UTF8CompareLatinTextFast(ID,Items[Result].ID)<>0) do
|
||||
while (Result>=0) and (AnsiCompareText(ID,Items[Result].ID)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
|
@ -5,9 +5,9 @@ unit ValEdit;
|
||||
interface
|
||||
|
||||
uses
|
||||
ContNrs, SysUtils, Classes, Variants,
|
||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, Laz2_XMLCfg,
|
||||
LCLStrConsts;
|
||||
SysUtils, Classes, Contnrs, Variants,
|
||||
Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, LCLStrConsts,
|
||||
Laz2_XMLCfg;
|
||||
|
||||
type
|
||||
|
||||
@ -1608,7 +1608,7 @@ begin
|
||||
begin
|
||||
if (Index <> i) and (FStrings.Names[i] <> '') then
|
||||
begin
|
||||
if (UTF8CompareLatinTextFast(FStrings.Names[i], NewValue) = 0) then
|
||||
if (AnsiCompareText(FStrings.Names[i], NewValue) = 0) then
|
||||
begin
|
||||
Result := False;
|
||||
ShowMessage(Format(rsVLEDuplicateKey,[NewValue, i + FixedRows]));
|
||||
|
Loading…
Reference in New Issue
Block a user