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