diff options
author | George Hazan <george.hazan@gmail.com> | 2016-08-23 12:19:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-08-23 12:19:43 +0000 |
commit | 3c22d97f8c0bab9fc214a3a3b36ab57ddc1bbfb2 (patch) | |
tree | b66e8b3378e285d9e3c19a8cd62d12c705092211 /plugins | |
parent | 352fe9cb793622c4a6ccc88e938ae51ed09b6d94 (diff) |
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@17200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryGrid.pas | 20 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_events.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_externalgrid.pas | 8 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_global.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_itemprocess.pas | 8 |
5 files changed, 17 insertions, 23 deletions
diff --git a/plugins/HistoryPlusPlus/HistoryGrid.pas b/plugins/HistoryPlusPlus/HistoryGrid.pas index 6954426099..3f8894875d 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: String) of object;
+ TGetNameData = procedure(Sender: TObject; Index: Integer; var Name: AnsiString) 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: String) of object;
+ TOnTranslateTime = procedure(Sender: TObject; Time: DWord; var Text: AnsiString) of object;
TOnProgress = procedure(Sender: TObject; Position, Max: Integer) of object;
TOnSearchFinished = procedure(Sender: TObject; Text: String; Found: Boolean) of object;
TOnSearched = TOnSearchFinished;
@@ -546,7 +546,7 @@ type procedure MakeSelected(Value: Integer);
function GetSelCount: Integer;
procedure SetFilter(const Value: TMessageTypes);
- function GetTime(Time: DWord): String;
+ function GetTime(Time: DWord): AnsiString;
function GetItems(Index: Integer): THistoryItem;
function IsMatched(Index: Integer): Boolean;
function IsUnknown(Index: Integer): Boolean;
@@ -1641,7 +1641,7 @@ end; procedure THistoryGrid.PaintItem(Index: Integer; ItemRect: TRect);
var
- TimeStamp, HeaderName: String;
+ TimeStamp, HeaderName: AnsiString;
OrgRect, ItemClipRect: TRect;
TopIconOffset, IconOffset, TimeOffset: Integer;
// icon: TIcon;
@@ -3158,7 +3158,7 @@ begin EndUpdate;
end;
-function THistoryGrid.GetTime(Time: DWord): String;
+function THistoryGrid.GetTime(Time: DWord): AnsiString;
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: String;
+ from_nick, to_nick, nick: AnsiString;
dt: TDateTime;
Mes, selmes: String;
begin
@@ -4918,7 +4918,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveHTML;
var
mes_id, type_id: AnsiString;
- nick, Mes, Time: String;
+ nick, Mes, Time: AnsiString;
txt: AnsiString;
FullHeader: Boolean;
begin
@@ -4999,7 +4999,7 @@ procedure THistoryGrid.SaveItem(Stream: TFileStream; Item: Integer; SaveFormat: procedure SaveUnicode;
var
- nick, Mes, Time: String;
+ nick, Mes, Time: AnsiString;
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: String;
+ nick, Mes: AnsiString;
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: String;
+ Text: AnsiString;
FullHeader: Boolean;
begin
FullHeader := not(FGroupLinked and FItems[Item].LinkedToPrev);
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas index 848008a37e..e99974543a 100644 --- a/plugins/HistoryPlusPlus/hpp_events.pas +++ b/plugins/HistoryPlusPlus/hpp_events.pas @@ -382,7 +382,7 @@ begin end;
end;
-function TextHasUrls(var Text: String): Boolean;
+function TextHasUrls(var Text: AnsiString): Boolean;
var
i,len,lenW: Integer;
pText,pPos: PChar;
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 2bf5dd6c8c..23f89e1934 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: String);
- procedure GridNameData(Sender: TObject; Index: Integer; var Name: String);
+ procedure GridTranslateTime(Sender: TObject; Time: DWord; var Text: AnsiString);
+ procedure GridNameData(Sender: TObject; Index: Integer; var Name: AnsiString);
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: String);
+procedure TExternalGrid.GridTranslateTime(Sender: TObject; Time: DWord; var Text: AnsiString);
begin
Text := TimestampToString(Time);
end;
-procedure TExternalGrid.GridNameData(Sender: TObject; Index: Integer; var Name: String);
+procedure TExternalGrid.GridNameData(Sender: TObject; Index: Integer; var Name: AnsiString);
begin
if Name = '' then
begin
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas index d0b04669c6..aacb3b57ad 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: String;
+ Text: AnsiString;
CodePage: Cardinal;
RTLMode: TRTLMode;
HasHeader: Boolean; // header for sessions
diff --git a/plugins/HistoryPlusPlus/hpp_itemprocess.pas b/plugins/HistoryPlusPlus/hpp_itemprocess.pas index 521c928017..3d5204c4c4 100644 --- a/plugins/HistoryPlusPlus/hpp_itemprocess.pas +++ b/plugins/HistoryPlusPlus/hpp_itemprocess.pas @@ -47,8 +47,6 @@ Contributors: theMIROn, Art Fedorov
-----------------------------------------------------------------------------}
-{$DEFINE USE_URL_BBCODE}
-
unit hpp_itemprocess;
interface
@@ -114,7 +112,7 @@ const (sz:'white'; col:$FFFFFF));
const
- bbCodesCount = {$IFDEF USE_URL_BBCODE}7{$ELSE}6{$ENDIF};
+ bbCodesCount = 7;
var
bbCodes: array[0..bbCodesCount,bbStart..bbEnd] of TBBCodeInfo = (
@@ -128,10 +126,8 @@ var (prefix:(ansi:'[/s]'); suffix:(ansi:nil); bbtype:bbSimple; rtf:'}'; html:'</s>')),
((prefix:(ansi:'[color='); suffix:(ansi:']'); bbtype:bbColor; rtf:'{\cf%u '; html:'<font style="color:%s">'; minRE: 10),
(prefix:(ansi:'[/color]'); suffix:(ansi:nil); bbtype:bbSimple; rtf:'}'; html:'</font>')),
- {$IFDEF USE_URL_BBCODE}
((prefix:(ansi:'[url='); suffix:(ansi:']'); bbtype:bbUrl; rtf:'{\field{\*\fldinst{HYPERLINK ":%s"}}{\fldrslt{\ul\cf%u'; html:'<a href="%s">'; minRE: 31),
(prefix:(ansi:'[/url]'); suffix:(ansi:nil); bbtype:bbSimple; rtf:'}}}'; html:'</a>')),
- {$ENDIF}
((prefix:(ansi:'[size='); suffix:(ansi:']'); bbtype:bbSize; rtf:'{\fs%u '; html:'<font style="font-size:%spt">'; minRE: 10),
(prefix:(ansi:'[/size]'); suffix:(ansi:nil); bbtype:bbSimple; rtf:'}'; html:'</font>')),
((prefix:(ansi:'[img]'); suffix:(ansi:nil); bbtype:bbImage; rtf:'[{\revised\ul\cf%u '; html:'['; minRE: 20),
@@ -309,7 +305,6 @@ begin if TryStrToInt(String(code), n) then
newCode := StrLFmt(fmt_buffer, MAX_FMTBUF, bbCodes[i, bbStart].rtf, [n shl 1]);
end;
-{$IFDEF USE_URL_BBCODE}
bbUrl:
begin
SetString(code, strCode, lenCode);
@@ -319,7 +314,6 @@ begin n := 0;
newCode := StrLFmt(fmt_buffer, MAX_FMTBUF, bbCodes[i, bbStart].rtf, [PAnsiChar(code), n]);
end;
-{$ENDIF}
bbImage:
begin
if doColorBBCodes then
|