* Replace WideString by UnicodeString
* Don't type cast Pointer to ordinal in QuickSort git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1055 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
8575e8a108
commit
0fb81de4d1
@ -3397,8 +3397,8 @@ type
|
|||||||
function ContentToRTF(Source: TVSTTextSourceType): AnsiString;
|
function ContentToRTF(Source: TVSTTextSourceType): AnsiString;
|
||||||
function ContentToAnsi(Source: TVSTTextSourceType; const Separator: String): AnsiString;
|
function ContentToAnsi(Source: TVSTTextSourceType; const Separator: String): AnsiString;
|
||||||
function ContentToText(Source: TVSTTextSourceType; const Separator: String): AnsiString; inline;
|
function ContentToText(Source: TVSTTextSourceType; const Separator: String): AnsiString; inline;
|
||||||
function ContentToUnicode(Source: TVSTTextSourceType; const Separator: String): WideString; inline;
|
function ContentToUnicode(Source: TVSTTextSourceType; const Separator: String): UnicodeString; inline;
|
||||||
function ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): WideString;
|
function ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): UnicodeString;
|
||||||
function ContentToUTF8(Source: TVSTTextSourceType; const Separator: String): String;
|
function ContentToUTF8(Source: TVSTTextSourceType; const Separator: String): String;
|
||||||
procedure GetTextInfo(Node: PVirtualNode; Column: TColumnIndex; const AFont: TFont; var R: TRect;
|
procedure GetTextInfo(Node: PVirtualNode; Column: TColumnIndex; const AFont: TFont; var R: TRect;
|
||||||
var Text: String); override;
|
var Text: String); override;
|
||||||
@ -4518,9 +4518,9 @@ begin
|
|||||||
J := R;
|
J := R;
|
||||||
P := TheArray[(L + R) shr 1];
|
P := TheArray[(L + R) shr 1];
|
||||||
repeat
|
repeat
|
||||||
while PtrUInt(TheArray[I]) < PtrUInt(P) do
|
while TheArray[I] < P do
|
||||||
Inc(I);
|
Inc(I);
|
||||||
while PtrUInt(TheArray[J]) > PtrUInt(P) do
|
while TheArray[J] > P do
|
||||||
Dec(J);
|
Dec(J);
|
||||||
if I <= J then
|
if I <= J then
|
||||||
begin
|
begin
|
||||||
@ -4550,11 +4550,11 @@ var
|
|||||||
Size: TSize;
|
Size: TSize;
|
||||||
Len: Integer;
|
Len: Integer;
|
||||||
L, H, N, W: Integer;
|
L, H, N, W: Integer;
|
||||||
WideStr: WideString;
|
WideStr: UnicodeString;
|
||||||
begin
|
begin
|
||||||
//todo: this need to be adjusted to work with UTF8 strings since the current algorithm
|
//todo: this need to be adjusted to work with UTF8 strings since the current algorithm
|
||||||
// when direct ported to use UTF8 functions leads to invalid UTF8 strings.
|
// when direct ported to use UTF8 functions leads to invalid UTF8 strings.
|
||||||
// for now use a WideString as a bridge
|
// for now use a UnicodeString as a bridge
|
||||||
WideStr := UTF8Decode(S);
|
WideStr := UTF8Decode(S);
|
||||||
Len := Length(WideStr);
|
Len := Length(WideStr);
|
||||||
if (Len = 0) or (Width <= 0) then
|
if (Len = 0) or (Width <= 0) then
|
||||||
@ -33203,7 +33203,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomVirtualStringTree.ContentToUnicode(Source: TVSTTextSourceType;
|
function TCustomVirtualStringTree.ContentToUnicode(Source: TVSTTextSourceType;
|
||||||
const Separator: String): WideString;
|
const Separator: String): UnicodeString;
|
||||||
begin
|
begin
|
||||||
Result := ContentToUTF16(Source, Separator);
|
Result := ContentToUTF16(Source, Separator);
|
||||||
end;
|
end;
|
||||||
@ -33344,7 +33344,7 @@ end;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function TCustomVirtualStringTree.ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): WideString;
|
function TCustomVirtualStringTree.ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): UnicodeString;
|
||||||
var
|
var
|
||||||
Buffer: TBufferedUTF8String;
|
Buffer: TBufferedUTF8String;
|
||||||
begin
|
begin
|
||||||
|
@ -350,7 +350,7 @@ var
|
|||||||
Data: Pointer;
|
Data: Pointer;
|
||||||
DataSize: Cardinal;
|
DataSize: Cardinal;
|
||||||
S: string;
|
S: string;
|
||||||
WS: WideString;
|
WS: UnicodeString;
|
||||||
P: Pointer;
|
P: Pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user