diff options
author | George Hazan <george.hazan@gmail.com> | 2016-08-23 12:42:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-08-23 12:42:56 +0000 |
commit | 81ecfce928b7a9382c442ccf566ed6369b8b2669 (patch) | |
tree | e1d7020d6c78cb0d83ce8ac23b9d55d53cd28ede /plugins/HistoryPlusPlus | |
parent | 3c22d97f8c0bab9fc214a3a3b36ab57ddc1bbfb2 (diff) |
switch to WideStrings
git-svn-id: http://svn.miranda-ng.org/main/trunk@17201 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus')
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryGrid.pas | 30 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_events.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_externalgrid.pas | 10 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_global.pas | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/plugins/HistoryPlusPlus/HistoryGrid.pas b/plugins/HistoryPlusPlus/HistoryGrid.pas index 3f8894875d..0ccc1b4502 100644 --- a/plugins/HistoryPlusPlus/HistoryGrid.pas +++ b/plugins/HistoryPlusPlus/HistoryGrid.pas @@ -123,11 +123,11 @@ type TOnSelect = procedure(Sender: TObject; Item, OldItem: Integer) of object;
TOnBookmarkClick = procedure(Sender: TObject; Item: Integer) of object;
TGetItemData = procedure(Sender: TObject; Index: Integer; var Item: THistoryItem) of object;
- TGetNameData = procedure(Sender: TObject; Index: Integer; var Name: AnsiString) of object;
+ TGetNameData = procedure(Sender: TObject; Index: Integer; var Name: WideString) of object;
TGetXMLData = procedure(Sender: TObject; Index: Integer; var Item: TXMLItem) of object;
TGetMCData = procedure(Sender: TObject; Index: Integer; var Item: TMCItem; Stage: TSaveStage) of object;
TOnPopup = TNotifyEvent;
- TOnTranslateTime = procedure(Sender: TObject; Time: DWord; var Text: AnsiString) of object;
+ TOnTranslateTime = procedure(Sender: TObject; Time: DWord; var Text: WideString) of object;
TOnProgress = procedure(Sender: TObject; Position, Max: Integer) of object;
TOnSearchFinished = procedure(Sender: TObject; Text: String; Found: Boolean) of object;
TOnSearched = TOnSearchFinished;
@@ -546,12 +546,12 @@ type procedure MakeSelected(Value: Integer);
function GetSelCount: Integer;
procedure SetFilter(const Value: TMessageTypes);
- function GetTime(Time: DWord): AnsiString;
+ function GetTime(Time: DWord): WideString;
function GetItems(Index: Integer): THistoryItem;
function IsMatched(Index: Integer): Boolean;
function IsUnknown(Index: Integer): Boolean;
procedure WriteString(fs: TFileStream; Text: AnsiString);
- procedure WriteWideString(fs: TFileStream; Text: String);
+ procedure WriteWideString(fs: TFileStream; Text: WideString);
procedure CheckBusy;
function GetSelItems(Index: Integer): Integer;
procedure SetSelItems(Index: Integer; Item: Integer);
@@ -666,7 +666,7 @@ type property Items[Index: Integer]: THistoryItem read GetItems;
property Bookmarked[Index: Integer]: Boolean read GetBookmarked write SetBookmarked;
property SelectedItems[Index: Integer]: Integer read GetSelItems write SetSelItems;
- function Search(Text: String; CaseSensitive: Boolean; FromStart: Boolean = False;
+ function Search(Text: WideString; CaseSensitive: Boolean; FromStart: Boolean = False;
SearchAll: Boolean = False; FromNext: Boolean = False; Down: Boolean = True): Integer;
function SearchItem(ItemID: Integer): Integer;
procedure AddItem;
@@ -1641,7 +1641,7 @@ end; procedure THistoryGrid.PaintItem(Index: Integer; ItemRect: TRect);
var
- TimeStamp, HeaderName: AnsiString;
+ TimeStamp, HeaderName: WideString;
OrgRect, ItemClipRect: TRect;
TopIconOffset, IconOffset, TimeOffset: Integer;
// icon: TIcon;
@@ -3158,7 +3158,7 @@ begin EndUpdate;
end;
-function THistoryGrid.GetTime(Time: DWord): AnsiString;
+function THistoryGrid.GetTime(Time: DWord): WideString;
begin
if Assigned(FTranslateTime) then
OnTranslateTime(Self, Time, Result)
@@ -3410,7 +3410,7 @@ var tok: TWideStrArray;
toksp: TIntArray;
subst: String;
- from_nick, to_nick, nick: AnsiString;
+ from_nick, to_nick, nick: WideString;
dt: TDateTime;
Mes, selmes: String;
begin
@@ -4329,7 +4329,7 @@ begin end;
end;
-function THistoryGrid.Search(Text: String; CaseSensitive: Boolean;
+function THistoryGrid.Search(Text: WideString; CaseSensitive: Boolean;
FromStart: Boolean = False; SearchAll: Boolean = False; FromNext: Boolean = False;
Down: Boolean = True): Integer;
var
@@ -4393,7 +4393,7 @@ begin else
begin
// need to strip bbcodes
- if Pos(Text, string(WideUpperCase(FItems[Item].Text))) <> 0 then
+ if Pos(Text, WideUpperCase(FItems[Item].Text)) <> 0 then
begin
Result := Item;
break;
@@ -4918,7 +4918,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveHTML;
var
mes_id, type_id: AnsiString;
- nick, Mes, Time: AnsiString;
+ nick, Mes, Time: WideString;
txt: AnsiString;
FullHeader: Boolean;
begin
@@ -4999,7 +4999,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveUnicode;
var
- nick, Mes, Time: AnsiString;
+ nick, Mes, Time: WideString;
FullHeader: Boolean;
begin
FullHeader := not(FGroupLinked and FItems[Item].LinkedToPrev);
@@ -5029,7 +5029,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveText;
var
Time: AnsiString;
- nick, Mes: AnsiString;
+ nick, Mes: WideString;
FullHeader: Boolean;
begin
FullHeader := not(FGroupLinked and FItems[Item].LinkedToPrev);
@@ -5059,7 +5059,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveRTF;
var
RTFStream: AnsiString;
- Text: AnsiString;
+ Text: WideString;
FullHeader: Boolean;
begin
FullHeader := not(FGroupLinked and FItems[Item].LinkedToPrev);
@@ -5115,7 +5115,7 @@ begin fs.Write(Text[1], Length(Text));
end;
-procedure THistoryGrid.WriteWideString(fs: TFileStream; Text: String);
+procedure THistoryGrid.WriteWideString(fs: TFileStream; Text: WideString);
begin
fs.Write(Text[1], Length(Text) * SizeOf(Char));
end;
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas index e99974543a..b301c2f0a7 100644 --- a/plugins/HistoryPlusPlus/hpp_events.pas +++ b/plugins/HistoryPlusPlus/hpp_events.pas @@ -382,7 +382,7 @@ begin end;
end;
-function TextHasUrls(var Text: AnsiString): Boolean;
+function TextHasUrls(var Text: WideString): Boolean;
var
i,len,lenW: Integer;
pText,pPos: PChar;
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 23f89e1934..7167245f05 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -107,8 +107,8 @@ type function IsFileEvent(Index: Integer): Boolean;
protected
procedure GridItemData(Sender: TObject; Index: Integer; var Item: THistoryItem);
- procedure GridTranslateTime(Sender: TObject; Time: DWord; var Text: AnsiString);
- procedure GridNameData(Sender: TObject; Index: Integer; var Name: AnsiString);
+ procedure GridTranslateTime(Sender: TObject; Time: DWord; var Text: WideString);
+ procedure GridNameData(Sender: TObject; Index: Integer; var Name: WideString);
procedure GridProcessRichText(Sender: TObject; Handle: THandle; Item: Integer);
procedure GridUrlClick(Sender: TObject; Item: Integer; URLText: String; Button: TMouseButton);
procedure GridBookmarkClick(Sender: TObject; Item: Integer);
@@ -547,12 +547,12 @@ begin end;
end;
-procedure TExternalGrid.GridTranslateTime(Sender: TObject; Time: DWord; var Text: AnsiString);
+procedure TExternalGrid.GridTranslateTime(Sender: TObject; Time: DWord; var Text: WideString);
begin
- Text := TimestampToString(Time);
+ Text := WideString(TimestampToString(Time));
end;
-procedure TExternalGrid.GridNameData(Sender: TObject; Index: Integer; var Name: AnsiString);
+procedure TExternalGrid.GridNameData(Sender: TObject; Index: Integer; var Name: WideString);
begin
if Name = '' then
begin
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas index aacb3b57ad..f21092d9ed 100644 --- a/plugins/HistoryPlusPlus/hpp_global.pas +++ b/plugins/HistoryPlusPlus/hpp_global.pas @@ -81,7 +81,7 @@ type Height: Integer;
Module: AnsiString;
Proto: AnsiString;
- Text: AnsiString;
+ Text: WideString;
CodePage: Cardinal;
RTLMode: TRTLMode;
HasHeader: Boolean; // header for sessions
|