From 0fb81de4d1786e61a2ead64d4c227646a8ccad9a Mon Sep 17 00:00:00 2001 From: blikblum Date: Sun, 13 Dec 2009 05:00:53 +0000 Subject: [PATCH] * 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 --- .../virtualtreeview-new/trunk/VirtualTrees.pas | 16 ++++++++-------- .../trunk/include/intf/win32/olemethods.inc | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/virtualtreeview-new/trunk/VirtualTrees.pas b/components/virtualtreeview-new/trunk/VirtualTrees.pas index a290eff4e..4d539e168 100644 --- a/components/virtualtreeview-new/trunk/VirtualTrees.pas +++ b/components/virtualtreeview-new/trunk/VirtualTrees.pas @@ -3397,8 +3397,8 @@ type function ContentToRTF(Source: TVSTTextSourceType): AnsiString; function ContentToAnsi(Source: TVSTTextSourceType; const Separator: String): AnsiString; function ContentToText(Source: TVSTTextSourceType; const Separator: String): AnsiString; inline; - function ContentToUnicode(Source: TVSTTextSourceType; const Separator: String): WideString; inline; - function ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): WideString; + function ContentToUnicode(Source: TVSTTextSourceType; const Separator: String): UnicodeString; inline; + function ContentToUTF16(Source: TVSTTextSourceType; const Separator: String): UnicodeString; function ContentToUTF8(Source: TVSTTextSourceType; const Separator: String): String; procedure GetTextInfo(Node: PVirtualNode; Column: TColumnIndex; const AFont: TFont; var R: TRect; var Text: String); override; @@ -4518,9 +4518,9 @@ begin J := R; P := TheArray[(L + R) shr 1]; repeat - while PtrUInt(TheArray[I]) < PtrUInt(P) do + while TheArray[I] < P do Inc(I); - while PtrUInt(TheArray[J]) > PtrUInt(P) do + while TheArray[J] > P do Dec(J); if I <= J then begin @@ -4550,11 +4550,11 @@ var Size: TSize; Len: Integer; L, H, N, W: Integer; - WideStr: WideString; + WideStr: UnicodeString; begin //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. - // for now use a WideString as a bridge + // for now use a UnicodeString as a bridge WideStr := UTF8Decode(S); Len := Length(WideStr); if (Len = 0) or (Width <= 0) then @@ -33203,7 +33203,7 @@ begin end; function TCustomVirtualStringTree.ContentToUnicode(Source: TVSTTextSourceType; - const Separator: String): WideString; + const Separator: String): UnicodeString; begin Result := ContentToUTF16(Source, Separator); 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 Buffer: TBufferedUTF8String; begin diff --git a/components/virtualtreeview-new/trunk/include/intf/win32/olemethods.inc b/components/virtualtreeview-new/trunk/include/intf/win32/olemethods.inc index 2a1ed7acb..f51fee553 100644 --- a/components/virtualtreeview-new/trunk/include/intf/win32/olemethods.inc +++ b/components/virtualtreeview-new/trunk/include/intf/win32/olemethods.inc @@ -350,7 +350,7 @@ var Data: Pointer; DataSize: Cardinal; S: string; - WS: WideString; + WS: UnicodeString; P: Pointer; begin