mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 12:20:22 +02:00
LHelp: Remove UTF8CompareLatinTextFast calls.
This commit is contained in:
parent
26547663f2
commit
aecb1d9473
@ -23,7 +23,7 @@ uses
|
|||||||
// LCL
|
// LCL
|
||||||
LCLIntf, Forms, StdCtrls, ExtCtrls, ComCtrls, Controls, Menus,
|
LCLIntf, Forms, StdCtrls, ExtCtrls, ComCtrls, Controls, Menus,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils, LazStringUtils, LazUTF8, Laz2_XMLCfg, LazLoggerBase,
|
LazFileUtils, LazStringUtils, Laz2_XMLCfg, LazLoggerBase,
|
||||||
// Turbopower IPro
|
// Turbopower IPro
|
||||||
IpHtml,
|
IpHtml,
|
||||||
// ChmHelp
|
// ChmHelp
|
||||||
@ -275,7 +275,9 @@ end;
|
|||||||
procedure TChmContentProvider.CompareIndexNodes(Sender: TObject; Node1,
|
procedure TChmContentProvider.CompareIndexNodes(Sender: TObject; Node1,
|
||||||
Node2: TTreeNode; var Compare: Integer);
|
Node2: TTreeNode; var Compare: Integer);
|
||||||
begin
|
begin
|
||||||
Compare:= UTF8CompareLatinTextFast(Node1.Text, Node2.Text);
|
// ToDo: Use AnsiCompareText() but only when the data actually has Unicode.
|
||||||
|
// FPC and Lazarus help files have none.
|
||||||
|
Compare:= CompareText(Node1.Text, Node2.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChmContentProvider.ProcTreeKeyDown(Sender: TObject; var Key: Word;
|
procedure TChmContentProvider.ProcTreeKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
@ -204,10 +204,12 @@ begin
|
|||||||
IdxSm:=0;
|
IdxSm:=0;
|
||||||
while (IdxSrc <> fTreeView.Items.TopLvlCount-1 ) and (IdxSm <> fSitemap.Items.Count-1) do
|
while (IdxSrc <> fTreeView.Items.TopLvlCount-1 ) and (IdxSm <> fSitemap.Items.Count-1) do
|
||||||
begin
|
begin
|
||||||
if (UTF8CompareLatinTextFast(fSitemap.Items.Item[IdxSm].Text,
|
// ToDo: Use AnsiCompareText() but only when the data actually has Unicode.
|
||||||
fTreeView.Items.TopLvlItems[IdxSrc].Text) <= 0)
|
// FPC and Lazarus help files have none.
|
||||||
|
if (CompareText(fSitemap.Items.Item[IdxSm].Text,
|
||||||
|
fTreeView.Items.TopLvlItems[IdxSrc].Text) <= 0)
|
||||||
then begin
|
then begin
|
||||||
// insert sitemap before fTreeView Node
|
// insert sitemap before fTreeView Node
|
||||||
AddSiteMapItem(fSitemap.Items.Item[IdxSm], ParentNode, fTreeView.Items.TopLvlItems[IdxSrc]);
|
AddSiteMapItem(fSitemap.Items.Item[IdxSm], ParentNode, fTreeView.Items.TopLvlItems[IdxSrc]);
|
||||||
if IdxSm < fSitemap.Items.Count-1 then
|
if IdxSm < fSitemap.Items.Count-1 then
|
||||||
Inc(IdxSm);
|
Inc(IdxSm);
|
||||||
|
Loading…
Reference in New Issue
Block a user