You've already forked lazarus-ccr
tvplanit: Less hints and warnings. Cosmetic changes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4941 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -106,7 +106,7 @@ uses
|
||||
const
|
||||
TURBO_LINK_URL = 'http://sourceforge.net/projects/tpvplanit/';
|
||||
HELP_URL = 'http://sourceforge.net/forum/forum.php?forum_id=241880';
|
||||
NEWS_SPECIFIC_URL = 'news://news.turbopower.com/turbopower.public.support.visualplanit';
|
||||
{%H-}NEWS_SPECIFIC_URL = 'news://news.turbopower.com/turbopower.public.support.visualplanit';
|
||||
GENERAL_DISCUSSION_URL = 'http://sourceforge.net/forum/forum.php?forum_id=241879';
|
||||
|
||||
|
||||
|
@ -35,13 +35,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
VpDlg, VpData, ExtCtrls, StdCtrls, VpBase, VpEvntEditDlg, VpBaseDS, VpConst,
|
||||
VpMisc;
|
||||
VpDlg, VpData, ExtCtrls, StdCtrls, VpEvntEditDlg, VpBaseDS, VpConst;
|
||||
|
||||
type
|
||||
{ forward declarations }
|
||||
@ -65,8 +64,7 @@ type
|
||||
procedure SnoozeBtnClick(Sender: TObject);
|
||||
procedure DismissBtnClick(Sender: TObject);
|
||||
procedure OpenItemBtnClick(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
SnoozeDelay: TDateTime;
|
||||
@ -104,7 +102,7 @@ implementation
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
StrUtils, VpSR;
|
||||
StrUtils, VpMisc, VpSR;
|
||||
|
||||
{ TVpNotificationDialog }
|
||||
|
||||
@ -285,6 +283,7 @@ end;
|
||||
procedure TAlarmNotifyForm.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
Unused(Shift);
|
||||
if Key = VK_ESCAPE then begin
|
||||
CalcSnooze;
|
||||
Close;
|
||||
|
@ -38,12 +38,12 @@ uses
|
||||
{$ELSE}
|
||||
Windows, Messages.
|
||||
{$ENDIF}
|
||||
Classes, Graphics, Controls, Dialogs, Forms, StdCtrls, ExtCtrls, SysUtils,
|
||||
Classes, Graphics, Controls, Dialogs, Forms, ExtCtrls, SysUtils,
|
||||
VpConst, VpSR;
|
||||
|
||||
const
|
||||
{Message base}
|
||||
Vp_First = WM_USER; //$7DF0; {Sets base for all Vp messages}
|
||||
Vp_First = WM_USER; // $7DF0; {Sets base for all Vp messages}
|
||||
|
||||
const
|
||||
{Custom message types}
|
||||
@ -99,13 +99,13 @@ type
|
||||
AMode: TVpPlaySoundMode) of object;
|
||||
|
||||
{ XML exceptions }
|
||||
EXML = class (Exception);
|
||||
EXML = class(Exception);
|
||||
|
||||
EVpStreamError = class(EXML)
|
||||
private
|
||||
seFilePos : Longint;
|
||||
public
|
||||
constructor CreateError(const FilePos: Longint; const Reason: DOMString);
|
||||
constructor CreateError(const FilePos: Longint; const Reason: string);
|
||||
property FilePos: Longint read seFilePos;
|
||||
end;
|
||||
|
||||
@ -115,7 +115,7 @@ type
|
||||
feLine: Longint;
|
||||
feLinePos: Longint;
|
||||
public
|
||||
constructor CreateError(const FilePos, Line, LinePos: Longint; const Reason: DOMString);
|
||||
constructor CreateError(const FilePos, Line, LinePos: Longint; const Reason: string);
|
||||
property Reason : DOMString read feReason;
|
||||
property Line: Longint read feLine;
|
||||
property LinePos: Longint read feLinePos;
|
||||
@ -123,7 +123,7 @@ type
|
||||
|
||||
EVpParserError = class(EVpFilterError)
|
||||
public
|
||||
constructor CreateError(Line, LinePos: Longint; const Reason: DOMString);
|
||||
constructor CreateError(Line, LinePos: Longint; const Reason: String);
|
||||
end;
|
||||
|
||||
{ implements the Version property with its associated design time About box }
|
||||
@ -238,7 +238,7 @@ type
|
||||
FOwner: TObject;
|
||||
procedure Changed; override;
|
||||
public
|
||||
constructor Create(AOwner: TObject); virtual;
|
||||
constructor Create(AOwner: TObject); virtual; reintroduce;
|
||||
property Owner: TObject read FOwner write FOwner;
|
||||
end;
|
||||
|
||||
@ -358,24 +358,25 @@ implementation
|
||||
|
||||
{$R vpbase.res}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
uses
|
||||
CommCtrl;
|
||||
{$IFNDEF LCL}
|
||||
CommCtrl,
|
||||
{$ENDIF}
|
||||
VpMisc;
|
||||
|
||||
{ EAdStreamError }
|
||||
|
||||
constructor EVpStreamError.CreateError(const FilePos: Integer;
|
||||
const Reason: DOMString);
|
||||
const Reason: String);
|
||||
begin
|
||||
inherited Create (Reason);
|
||||
inherited Create(Reason);
|
||||
seFilePos := FilePos;
|
||||
end;
|
||||
|
||||
{ EAdFilterError }
|
||||
|
||||
constructor EVpFilterError.CreateError(const FilePos, Line, LinePos: Integer;
|
||||
const Reason: DOMString);
|
||||
const Reason: string);
|
||||
begin
|
||||
inherited CreateError(FilePos, Reason);
|
||||
feLine := Line;
|
||||
@ -386,7 +387,7 @@ end;
|
||||
{ EAdParserError }
|
||||
|
||||
constructor EVpParserError.CreateError(Line, LinePos: Integer;
|
||||
const Reason: DOMString);
|
||||
const Reason: String);
|
||||
begin
|
||||
inherited CreateError(FilePos, Line, LinePos, Reason);
|
||||
end;
|
||||
@ -423,7 +424,8 @@ end;
|
||||
|
||||
procedure TVpCustomControl.SetVersion(const Value: string);
|
||||
begin
|
||||
// This method left intentionally blank.
|
||||
// This method left intentionally blank.
|
||||
Unused(Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
@ -574,6 +576,7 @@ end;
|
||||
|
||||
procedure TVpCollectionItem.SetVersion(const Value: String);
|
||||
begin
|
||||
Unused(Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
@ -621,6 +624,7 @@ end;
|
||||
procedure TVpComponent.SetVersion(const Value: string);
|
||||
begin
|
||||
// This method left intentionally blank.
|
||||
Unused(Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
|
@ -40,7 +40,7 @@ uses
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Classes, Dialogs, SysUtils, Graphics, Controls, StdCtrls, ExtCtrls,
|
||||
VpBase, VpData, Forms, VpPrtFmt, VpLocalize, VpException;
|
||||
VpBase, VpData, Forms, VpPrtFmt, VpLocalize;
|
||||
|
||||
type
|
||||
TVpResourceUpdate = (ruOnChange, ruOnExit, ruOnDropDownClose);
|
||||
@ -138,18 +138,18 @@ type
|
||||
|
||||
TVpResourceCombo = class(TCustomComboBox)
|
||||
protected {private}
|
||||
FDataStore : TVpCustomDataStore;
|
||||
FDataStore: TVpCustomDataStore;
|
||||
{internal variables}
|
||||
rcLoading : Boolean;
|
||||
OldItemIndex : Integer;
|
||||
FResourceUpdateStyle : TVpResourceUpdate;
|
||||
rcLoading: Boolean;
|
||||
OldItemIndex: Integer;
|
||||
FResourceUpdateStyle: TVpResourceUpdate;
|
||||
|
||||
procedure VpDataStoreChanged (var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message Vp_DataStoreChanged;
|
||||
procedure SetDataStore (const Value : TVpCustomDataStore);
|
||||
function GetAbout : string;
|
||||
procedure SetAbout (const Value : string);
|
||||
procedure SetResourceUpdateStyle (const v : TVpResourceUpdate);
|
||||
procedure ResourceChanged (Sender : TObject);
|
||||
procedure VpDataStoreChanged(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message Vp_DataStoreChanged;
|
||||
procedure SetDataStore(const Value: TVpCustomDataStore);
|
||||
function GetAbout: string;
|
||||
procedure SetAbout(const Value: string);
|
||||
procedure SetResourceUpdateStyle(const v: TVpResourceUpdate);
|
||||
procedure ResourceChanged(Sender: TObject);
|
||||
procedure LoadItems;
|
||||
{$IFNDEF LCL}
|
||||
procedure CNCommand (var Msg: TWMCommand); message CN_COMMAND;
|
||||
@ -405,9 +405,6 @@ uses
|
||||
(*****************************************************************************)
|
||||
{ TVpCustomDataStore }
|
||||
|
||||
type
|
||||
ProtectedTComponent = class(TComponent);
|
||||
|
||||
constructor TVpCustomDataStore.Create(AOwner: TComponent);
|
||||
var
|
||||
I: Integer;
|
||||
@ -811,7 +808,8 @@ end;
|
||||
|
||||
{ - Added}
|
||||
procedure TVpCustomDataStore.PurgeResource(Res: TVpResource);
|
||||
begin
|
||||
begin
|
||||
Unused(Res);
|
||||
if not Loading then
|
||||
NotifyDependents;
|
||||
end;
|
||||
@ -953,6 +951,7 @@ end;
|
||||
|
||||
procedure TVpResourceCombo.VpDataStoreChanged(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
begin
|
||||
Unused(Msg);
|
||||
LoadItems;
|
||||
end;
|
||||
{=====}
|
||||
@ -1006,6 +1005,7 @@ end;
|
||||
|
||||
procedure TVpResourceCombo.SetAbout(const Value: string);
|
||||
begin
|
||||
Unused(Value);
|
||||
//Empty on purpose
|
||||
end;
|
||||
{=====}
|
||||
@ -1179,14 +1179,16 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpLinkableControl.CMEnter(var Msg : {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
procedure TVpLinkableControl.CMEnter(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
begin
|
||||
Unused(Msg);
|
||||
invalidate;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpLinkableControl.CMExit(var Msg : {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
procedure TVpLinkableControl.CMExit(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
begin
|
||||
Unused(Msg);
|
||||
invalidate;
|
||||
end;
|
||||
{=====}
|
||||
|
@ -70,7 +70,7 @@ const
|
||||
(clBlack, clBlack, clAqua, clGray, clBlack, clNavy, clBlack),
|
||||
(clRed, clRed, clFuchsia, clGray, clBlue, clTeal, clBlack)
|
||||
);
|
||||
calDefWeekStarts = dtSunday;{ default start of the week }
|
||||
calDefWeekStarts = dtSunday; { default start of the week }
|
||||
|
||||
type
|
||||
TVpCalColors = class(TPersistent)
|
||||
@ -197,7 +197,7 @@ type
|
||||
procedure calRebuildCalArray(ADate: TDateTime);
|
||||
{-recalculate the contents of the calendar array}
|
||||
procedure CalculateSizes(WorkCanvas: TCanvas; Angle: TVpRotationAngle;
|
||||
Rect: TRect; var Row: TRowArray; var Col: TColArray; DisplayOnly: Boolean);
|
||||
Rect: TRect; out Row: TRowArray; out Col: TColArray; DisplayOnly: Boolean);
|
||||
procedure calRecalcSize (DisplayOnly: Boolean);
|
||||
{-calcualte new sizes for rows and columns}
|
||||
|
||||
@ -573,7 +573,7 @@ end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomCalendar.CalculateSizes(WorkCanvas: TCanvas;
|
||||
Angle: TVpRotationAngle; Rect: TRect; var Row: TRowArray; var Col: TColArray;
|
||||
Angle: TVpRotationAngle; Rect: TRect; out Row: TRowArray; out Col: TColArray;
|
||||
DisplayOnly: Boolean);
|
||||
{-calcualte new sizes for rows and columns}
|
||||
var
|
||||
|
@ -223,14 +223,14 @@ begin
|
||||
{get the day name}
|
||||
if cdoShortNames in FCalendar.Options then begin
|
||||
if FCalendar.DayNameWidth < 1 then
|
||||
S := ShortDayNames[Ord(DOW)+1]
|
||||
S := DefaultFormatSettings.ShortDayNames[Ord(DOW)+1]
|
||||
else
|
||||
S := Copy(ShortDayNames[Ord(DOW)+1], 1, FCalendar.DayNameWidth)
|
||||
S := Copy(DefaultFormatSettings.ShortDayNames[Ord(DOW)+1], 1, FCalendar.DayNameWidth)
|
||||
end else begin
|
||||
if FCalendar.DayNameWidth < 1 then
|
||||
S := LongDayNames[Ord(DOW)+1]
|
||||
S := DefaultFormatSettings.LongDayNames[Ord(DOW)+1]
|
||||
else
|
||||
S := Copy(LongDayNames[Ord(DOW)+1], 1, FCalendar.DayNameWidth)
|
||||
S := Copy(DefaultFormatSettings.LongDayNames[Ord(DOW)+1], 1, FCalendar.DayNameWidth)
|
||||
end;
|
||||
{$IF FPC_FULLVERSION < 30000}
|
||||
S := SysToUTF8(S);
|
||||
|
@ -83,7 +83,7 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, FileUtil,
|
||||
LCLProc, LCLType, LCLIntf, FileUtil,
|
||||
{$ELSE}
|
||||
Windows, //Messages,
|
||||
{$ENDIF}
|
||||
@ -725,7 +725,7 @@ begin
|
||||
if not Assigned(FCanvas) then
|
||||
raise EVpCanvasError.Create(RSNoCanvas);
|
||||
|
||||
FillChar(LF, SizeOf(LF), #0);
|
||||
FillChar(LF{%H-}, SizeOf(LF), #0);
|
||||
LF.lfHeight := FCanvas.Font.Height;
|
||||
LF.lfWidth := 0;
|
||||
case Angle of
|
||||
@ -759,6 +759,7 @@ begin
|
||||
OldFont := TFont.Create;
|
||||
try
|
||||
OldFont.Assign(FCanvas.Font);
|
||||
|
||||
// Create new font to use.
|
||||
FCanvas.Font.Handle := CreateFontIndirect(LF);
|
||||
|
||||
@ -880,6 +881,9 @@ end;
|
||||
procedure TVpExCanvas.BrushCopy(const Dest: TRect; Bitmap: TBitmap;
|
||||
const Source: TRect; AColor: TColor);
|
||||
begin
|
||||
Unused(Dest, Bitmap);
|
||||
Unused(Source, AColor);
|
||||
|
||||
if not Assigned(FCanvas) then
|
||||
raise EVpCanvasError.Create(RSNoCanvas);
|
||||
|
||||
@ -1157,6 +1161,8 @@ end;
|
||||
|
||||
procedure TVpExCanvas.TextRect(ARect: TRect; X, Y: Integer; const Text: string);
|
||||
begin
|
||||
Unused(ARect, X, Y);
|
||||
Unused(Text);
|
||||
if not Assigned(FCanvas) then
|
||||
raise EVpCanvasError.Create(RSNoCanvas);
|
||||
end;
|
||||
@ -1583,7 +1589,7 @@ begin
|
||||
DC := GetDC(0);
|
||||
SavedFontHandle := SelectObject(DC, ACanvas.Font.Handle);
|
||||
try
|
||||
GetTextMetrics(DC, Metrics);
|
||||
GetTextMetrics(DC, Metrics{%H-});
|
||||
Result := Metrics.tmAveCharWidth;
|
||||
finally
|
||||
SelectObject(DC, SavedFontHandle);
|
||||
|
@ -40,7 +40,7 @@ uses
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Classes, Controls, Dialogs, Forms, Graphics, Menus,Math,
|
||||
SysUtils, VpBase, VpMisc, VpLEDLabel, VpTimerPool;
|
||||
SysUtils, VpBase, VpLEDLabel, VpTimerPool;
|
||||
|
||||
type
|
||||
TVpPercent = 0..100;
|
||||
@ -207,8 +207,8 @@ type
|
||||
procedure ckHandOptionChange(Sender : TObject);
|
||||
procedure ckDigitalOptionChange(Sender : TObject);
|
||||
procedure SizeDigitalDisplay;
|
||||
procedure ckTimerEvent(Sender : TObject; Handle : Integer;
|
||||
Interval : Cardinal; ElapsedTime : LongInt);
|
||||
procedure ckTimerEvent(Sender: TObject; Handle: Integer; Interval: Cardinal;
|
||||
ElapsedTime: LongInt);
|
||||
procedure DoOnHourChange;
|
||||
procedure DoOnMinuteChange;
|
||||
procedure DoOnSecondChange;
|
||||
@ -216,12 +216,12 @@ type
|
||||
procedure PaintHands(ACanvas : TCanvas);
|
||||
{windows message methods}
|
||||
{$IFDEF LCL}
|
||||
procedure WMResize (var Msg: TLMSize); message LM_SIZE;
|
||||
procedure WMEraseBkgnd (var Msg : TLMEraseBkgnd); message LM_ERASEBKGND;
|
||||
procedure WMResize (var Msg: TLMSize); message LM_SIZE;
|
||||
procedure WMEraseBkgnd (var Msg: TLMEraseBkgnd); message LM_ERASEBKGND;
|
||||
{$ELSE}
|
||||
procedure WMResize (var Msg: TWMSize); message WM_SIZE;
|
||||
procedure WMEraseBkgnd (var Msg : TWMEraseBkgnd); message WM_ERASEBKGND;
|
||||
procedure WMGetDlgCode (var Msg : TWMGetDlgCode); message WM_GETDLGCODE;
|
||||
procedure WMResize (var Msg: TWMSize); message WM_SIZE;
|
||||
procedure WMEraseBkgnd (var Msg: TWMEraseBkgnd); message WM_ERASEBKGND;
|
||||
procedure WMGetDlgCode (var Msg: TWMGetDlgCode); message WM_GETDLGCODE;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure Loaded; override;
|
||||
@ -300,7 +300,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
VpConst;
|
||||
VpConst, VpMisc;
|
||||
|
||||
const
|
||||
ckDToR = (Pi / 180);
|
||||
@ -660,12 +660,14 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomClock.ckTimerEvent(Sender : TObject; Handle : Integer;
|
||||
Interval : Cardinal; ElapsedTime : LongInt);
|
||||
procedure TVpCustomClock.ckTimerEvent(Sender: TObject; Handle: Integer;
|
||||
Interval: Cardinal; ElapsedTime: LongInt);
|
||||
var
|
||||
Hour, Minute, Second, MSecond : Word;
|
||||
C, D : Integer;
|
||||
begin
|
||||
Unused(Handle, Interval);
|
||||
|
||||
if FClockMode = cmClock then begin
|
||||
{Clock}
|
||||
DecodeTime(Now, Hour, Minute, Second, MSecond);
|
||||
@ -678,7 +680,8 @@ begin
|
||||
Inc(C, 24);
|
||||
Hour := C;
|
||||
SetTime(EncodeTime(Hour, Minute, Second, MSecond));
|
||||
end else if FClockMode = cmTimer then begin
|
||||
end else
|
||||
if FClockMode = cmTimer then begin
|
||||
{Count Up Timer}
|
||||
SetTime(ckConvertMsToDateTime(ElapsedTime));
|
||||
end else begin
|
||||
@ -923,7 +926,7 @@ var
|
||||
MinuteHandLen : Integer;
|
||||
SecondHandLen : Integer;
|
||||
|
||||
procedure RotatePoint(OldPoint : TPoint; var NewPoint : TPoint);
|
||||
procedure RotatePoint(OldPoint: TPoint; out NewPoint: TPoint);
|
||||
begin
|
||||
OldPoint.X := OldPoint.X - HalfWidth;
|
||||
OldPoint.Y := OldPoint.Y - HalfHeight;
|
||||
@ -1350,6 +1353,8 @@ procedure TVpCustomClock.WMResize(var Msg: TWMSize);
|
||||
procedure TVpCustomClock.WMResize(var Msg: TLMSize);
|
||||
{$ENDIF}
|
||||
begin
|
||||
Unused(Msg);
|
||||
|
||||
if DisplayMode = dmDigital then begin
|
||||
Width := ckLEDDisplay.Width;
|
||||
Height := ckLEDDisplay.Height;
|
||||
|
@ -41,7 +41,7 @@ uses
|
||||
SysUtils,
|
||||
{$IFDEF VERSION6} Variants, {$ENDIF}
|
||||
Classes, Graphics, Controls, Forms, Dialogs, VpData, ExtCtrls, StdCtrls,
|
||||
VpException, VpMisc, VpBase, VpSR, VpDlg, VpBaseDS, ComCtrls, EditBtn, Types;
|
||||
VpException, VpMisc, VpBase, VpSR, VpDlg, VpBaseDS, ComCtrls, EditBtn;
|
||||
|
||||
type
|
||||
{ forward declarations }
|
||||
@ -634,6 +634,7 @@ end;
|
||||
procedure TContactEditForm.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
Unused(Shift);
|
||||
if Key = VK_ESCAPE then begin
|
||||
ReturnCode := rtAbandon;
|
||||
Close;
|
||||
|
@ -38,7 +38,7 @@ uses
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Classes, Graphics, Controls, ComCtrls, ExtCtrls, StdCtrls,
|
||||
Classes, Graphics, Controls, ExtCtrls, StdCtrls,
|
||||
VpBase, VpBaseDS, VpMisc, VpData, VpConst, VpSR, VpCanvasUtils, Menus;
|
||||
|
||||
const
|
||||
@ -214,8 +214,8 @@ type
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure LoadLanguage;
|
||||
procedure LinkHandler(Sender: TComponent;
|
||||
NotificationType: TVpNotificationType; const Value: Variant); override;
|
||||
procedure LinkHandler(Sender: TComponent; NotificationType: TVpNotificationType;
|
||||
const Value: Variant); override;
|
||||
function GetCityStateZipFormat: String;
|
||||
function GetControlType : TVpItemType; override;
|
||||
procedure DeleteActiveContact(Verify: Boolean);
|
||||
@ -266,7 +266,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, Math, Forms, Dialogs, VpContactEditDlg, VpContactGridPainter;
|
||||
SysUtils, Forms, Dialogs, VpContactEditDlg, VpContactGridPainter;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
@ -489,6 +489,7 @@ end;
|
||||
procedure TVpContactGrid.LinkHandler(Sender: TComponent;
|
||||
NotificationType: TVpNotificationType; const Value: Variant);
|
||||
begin
|
||||
Unused(Value);
|
||||
case NotificationType of
|
||||
neDataStoreChange : Invalidate;
|
||||
neInvalidate : Invalidate;
|
||||
@ -2154,6 +2155,7 @@ procedure TVpContactGrid.WMKillFocus(var Msg : TWMKillFocus);
|
||||
procedure TVpContactGrid.WMKillFocus(var Msg : TLMKillFocus);
|
||||
{$ENDIF}
|
||||
begin
|
||||
Unused(Msg);
|
||||
if Assigned(cgInplaceEditor) and not cgInplaceEditor.Visible then
|
||||
Invalidate;
|
||||
end;
|
||||
|
@ -35,12 +35,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages,LCLProc,LCLType,LCLIntf,
|
||||
LCLProc, LCLType, LCLIntf,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Buttons, Classes, Controls, Forms, Graphics, Menus, Messages,
|
||||
StdCtrls, SysUtils, VpBase, VpCalendar, VpConst, VpEdPop, VpMisc;
|
||||
Buttons, Classes, Controls, Forms, Graphics, Menus, StdCtrls, SysUtils,
|
||||
VpCalendar, VpConst, VpEdPop, VpMisc;
|
||||
|
||||
type
|
||||
TVpDateOrder = (doMDY, doDMY, doYMD);
|
||||
@ -375,6 +375,8 @@ var
|
||||
P : TPoint;
|
||||
I : Integer;
|
||||
begin
|
||||
Unused(Button, Shift);
|
||||
|
||||
P := Point(X,Y);
|
||||
if not PtInRect(Calendar.ClientRect, P) then
|
||||
PopUpClose(Sender);
|
||||
@ -393,8 +395,10 @@ end;
|
||||
|
||||
procedure TVpCustomDateEdit.PopupOpen;
|
||||
var
|
||||
P : TPoint;
|
||||
MeasureFrom : TPoint;
|
||||
P: TPoint;
|
||||
{$IFNDEF LCL}
|
||||
MeasureFrom: TPoint;
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
inherited PopupOpen;
|
||||
@ -436,7 +440,9 @@ begin
|
||||
Calendar.Colors.Assign(FPopupCalColors);
|
||||
{determine the proper position}
|
||||
P := Point (Left, Top + Height + 2);
|
||||
MeasureFrom := Point (0, 0);
|
||||
{$IFNDEF LCL}
|
||||
MeasureFrom := Point(0, 0);
|
||||
{$ENDIF}
|
||||
if Assigned (Parent) and (not (Parent is TForm)) then begin
|
||||
P.x := P.x + Parent.Left;
|
||||
P.y := P.y + Parent.Top;
|
||||
@ -467,6 +473,8 @@ end;
|
||||
|
||||
procedure TVpCustomDateEdit.PopupDateChange(Sender : TObject; Date : TDateTime);
|
||||
begin
|
||||
Unused(Date);
|
||||
|
||||
{get the current value}
|
||||
SetDate(Calendar.Date);
|
||||
Modified := True;
|
||||
|
@ -1198,7 +1198,8 @@ function TVpDayView.dvCalcVisibleLines(RenderHeight, ColHeadHeight, RowHeight: I
|
||||
Scale: Extended; StartLine, StopLine: Integer): Integer;
|
||||
var
|
||||
vertical: integer;
|
||||
d, m: Integer; // d = result of "div", m = result of "mod"
|
||||
d: Integer = 0; // d = result of "div"
|
||||
m: Integer = 0; // m = result of "mod"
|
||||
begin
|
||||
if StartLine < 0 then
|
||||
StartLine := TopLine;
|
||||
|
@ -38,7 +38,7 @@ uses
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Classes, Dialogs, SysUtils, Db,
|
||||
VpBase, VpData, VpSR, VpBaseDS, VpConst, VpException;
|
||||
VpBase, VpData, VpBaseDS, VpConst, VpException;
|
||||
|
||||
type
|
||||
TVpCustomDBDataStore = class(TVpCustomDataStore)
|
||||
|
@ -38,7 +38,7 @@ uses
|
||||
Controls,
|
||||
{$ELSE}
|
||||
{$ENDIF}
|
||||
Classes, Forms, Graphics, VpBase, VpBaseDS, VpData, VpConst, VpSR;
|
||||
Classes, Forms, Graphics, VpBase, VpBaseDS, VpConst, VpSR;
|
||||
|
||||
type
|
||||
TVpDialogPosition = (mpCenter, mpCenterTop, mpCustom);
|
||||
@ -93,6 +93,9 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
VpMisc;
|
||||
|
||||
constructor TVpBaseDialog.Create(AOwner : TComponent);
|
||||
var
|
||||
I: integer;
|
||||
@ -154,6 +157,7 @@ end;
|
||||
|
||||
procedure TVpBaseDialog.SetVersion(const Value: string);
|
||||
begin
|
||||
Unused(Value);
|
||||
// This method left intentionally blank.
|
||||
end;
|
||||
{=====}
|
||||
|
@ -34,14 +34,14 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages,LCLProc,LCLType,LCLIntf,
|
||||
LCLProc,LCLType,LCLIntf,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
StdCtrls, TypInfo, ExtCtrls,
|
||||
|
||||
VpPrtFmt, VpBase, VpBaseDS, VpDBDS,{ VpBDEDS,} VpPrtPrv, Buttons,
|
||||
VpPrtFmt, VpBase, VpBaseDS, VpPrtPrv, Buttons,
|
||||
VpException, VpSR;
|
||||
|
||||
const
|
||||
@ -240,18 +240,11 @@ var
|
||||
begin
|
||||
if IsDirty then begin
|
||||
Rslt := DirtyPrompt;
|
||||
|
||||
{ case Rslt of
|
||||
ID_YES: begin
|
||||
DoSave;
|
||||
end;
|
||||
|
||||
ID_NO: begin
|
||||
// nothing
|
||||
end;
|
||||
|
||||
ID_CANCEL: Exit;
|
||||
end;}
|
||||
case Rslt of
|
||||
ID_YES : DoSave;
|
||||
ID_NO : ; // nothing
|
||||
ID_CANCEL : Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if OpenDialog1.Execute then begin
|
||||
@ -315,19 +308,17 @@ var
|
||||
begin
|
||||
if IsDirty then begin
|
||||
Rslt := DirtyPrompt;
|
||||
|
||||
{ case Rslt of
|
||||
ID_YES: begin
|
||||
DoSave;
|
||||
case Rslt of
|
||||
ID_YES:
|
||||
begin
|
||||
DoSave;
|
||||
DoNewFile;
|
||||
end;
|
||||
ID_NO:
|
||||
DoNewFile;
|
||||
end;
|
||||
|
||||
ID_NO: begin
|
||||
DoNewFile;
|
||||
end;
|
||||
|
||||
ID_CANCEL: Exit;
|
||||
end;}
|
||||
ID_CANCEL:
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
DoNewFile;
|
||||
@ -543,24 +534,21 @@ var
|
||||
begin
|
||||
if IsDirty then begin
|
||||
Rslt := DirtyPrompt;
|
||||
|
||||
{ case Rslt of
|
||||
ID_YES: begin
|
||||
DoSave;
|
||||
case Rslt of
|
||||
ID_YES:
|
||||
begin
|
||||
DoSave;
|
||||
CanClose := True;
|
||||
end;
|
||||
ID_NO:
|
||||
CanClose := True;
|
||||
end;
|
||||
|
||||
ID_NO: begin
|
||||
CanClose := True;
|
||||
end;
|
||||
|
||||
ID_CANCEL: begin
|
||||
CanClose := False;
|
||||
Exit;
|
||||
end;
|
||||
end; }
|
||||
end
|
||||
else
|
||||
ID_CANCEL:
|
||||
begin
|
||||
CanClose := False;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
CanClose := True;
|
||||
end;
|
||||
{=====}
|
||||
@ -608,6 +596,7 @@ end;
|
||||
procedure TfrmPrnFormat.lbElementsMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
Unused(Button, Shift);
|
||||
LastX := X;
|
||||
LastY := Y;
|
||||
DragItem := (Sender as TListBox).ItemAtPos(Point(LastX, LastY), True);
|
||||
@ -633,6 +622,7 @@ procedure TfrmPrnFormat.lbElementsDragOver(Sender, Source: TObject; X,Y: Integer
|
||||
var
|
||||
lb: TListBox;
|
||||
begin
|
||||
Unused(State);
|
||||
lb := (Source as TListBox);
|
||||
lb.Canvas.DrawFocusRect(lb.ItemRect(lb.ItemAtPos(Point(LastX, LastY), True)));
|
||||
lb.Canvas.DrawFocusRect(lb.ItemRect(lb.ItemAtPos(Point(X, Y), True)));
|
||||
@ -659,11 +649,8 @@ end;
|
||||
procedure TfrmPrnFormat.SetCaptions;
|
||||
var
|
||||
cnv: TControlCanvas;
|
||||
i, w: Integer;
|
||||
wPrv: Integer;
|
||||
w: Integer;
|
||||
begin
|
||||
wPrv := PrintPreview.Width;
|
||||
|
||||
Caption := RSPrintFormatDesigner;
|
||||
LblFormats.Caption := RSFormats;
|
||||
LblElements.Caption := RSElements;
|
||||
|
@ -35,12 +35,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages,LCLProc,LCLType,LCLIntf,
|
||||
LCLProc, LCLType, LCLIntf,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Buttons, Classes, Controls, ExtCtrls, Forms, Graphics, Menus,
|
||||
Messages, StdCtrls, SysUtils, VpBase, VpConst;
|
||||
StdCtrls, SysUtils, VpConst;
|
||||
|
||||
type
|
||||
TVpEdButton = class(TBitBtn)
|
||||
@ -57,8 +57,8 @@ type
|
||||
FShowButton : Boolean;
|
||||
|
||||
function GetVersion : string;
|
||||
procedure SetShowButton(Value : Boolean);
|
||||
procedure SetVersion(const Value : string);
|
||||
procedure SetShowButton(Value: Boolean);
|
||||
procedure SetVersion(const Value: string);
|
||||
|
||||
{internal methods}
|
||||
function GetButtonWidth : Integer;
|
||||
@ -208,6 +208,7 @@ end;
|
||||
|
||||
procedure TVpEdPopup.SetVersion(const Value : string);
|
||||
begin
|
||||
Unused(Value);
|
||||
// Leave empty
|
||||
end;
|
||||
{=====}
|
||||
|
@ -279,6 +279,8 @@ var
|
||||
Name: string;
|
||||
ColorRect: TRect;
|
||||
begin
|
||||
Unused(Control, State);
|
||||
|
||||
Category.Canvas.FillRect(ARect);
|
||||
|
||||
Color := CatColorMap.GetCategory(Index).Color;
|
||||
@ -483,9 +485,9 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{ Inc or Dec AlarmAdvance according to which button was pressed }
|
||||
procedure TDlgEventEdit.AdvanceUpDownClick(Sender: TObject; Button: TUDBtnType);
|
||||
begin
|
||||
{ Inc or Dec AlarmAdvance according to which button was pressed }
|
||||
{ case Button of
|
||||
btNext:
|
||||
AlarmAdvance.Text := IntToStr(StrToIntDef(AlarmAdvance.Text, 0) + 1);
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, VpConst, VpSR;
|
||||
Classes, SysUtils, VpSR;
|
||||
|
||||
type
|
||||
{*** Base Vp exeption class ***}
|
||||
|
@ -45,7 +45,7 @@ uses
|
||||
{$IFDEF VERSION6} DesignIntf, DesignEditors, {$ELSE} DsgnIntf, {$ENDIF}, DBTables,
|
||||
{$ENDIF}
|
||||
{$ENDIF} {RUNTIMETEST}
|
||||
ExtCtrls, StdCtrls, Db, VpData, VpFlxDS, ComCtrls, Buttons;
|
||||
ExtCtrls, StdCtrls, Db, VpFlxDS, ComCtrls, Buttons;
|
||||
|
||||
type
|
||||
|
||||
@ -115,7 +115,7 @@ implementation
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
vpConst;
|
||||
vpConst, VpMisc;
|
||||
|
||||
{$IFDEF RUNTIMETEST}
|
||||
{ Runtime test }
|
||||
@ -481,6 +481,7 @@ end;
|
||||
procedure TfrmFieldMapper.DatasetFieldLBKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
begin
|
||||
Unused(Key);
|
||||
DbFieldSelected(sender);
|
||||
end;
|
||||
{=====}
|
||||
@ -494,6 +495,7 @@ end;
|
||||
procedure TfrmFieldMapper.VPFieldLBKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
begin
|
||||
Unused(Key);
|
||||
VpFieldSelected(Sender);
|
||||
end;
|
||||
{=====}
|
||||
@ -597,6 +599,7 @@ end;
|
||||
procedure TfrmFieldMapper.FieldMappingsLBKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
begin
|
||||
Unused(Key);
|
||||
FieldMappingsLBClick(Sender);
|
||||
end;
|
||||
{=====}
|
||||
@ -604,6 +607,7 @@ end;
|
||||
procedure TfrmFieldMapper.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Unused(Action);
|
||||
{reset all datasets to their original active status}
|
||||
if ResDS <> nil then
|
||||
ResDS.Active := DSResActive;
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Classes, Controls, Graphics, SysUtils, VpBase;
|
||||
Classes, Controls, Graphics, SysUtils;
|
||||
|
||||
type
|
||||
TSegmentSize = 2..10;
|
||||
@ -54,7 +54,7 @@ type
|
||||
FSize : TSegmentSize;
|
||||
lbDrawBmp : TBitmap;
|
||||
procedure CMTextChanged(var Message: {$IFDEF LCL}TLMessage{$ELSE}TMessage{$ENDIF}); message CM_TEXTCHANGED;
|
||||
procedure Initialize(var Points: array of TPoint);
|
||||
procedure Initialize(out Points: array of TPoint);
|
||||
function NewOffset(xOry: char; OldOffset: Integer): Integer;
|
||||
procedure ProcessCaption(Points: array of TPoint);
|
||||
procedure PaintSegment(Segment: Integer; Color: TColor;
|
||||
@ -135,7 +135,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
VpConst;
|
||||
VpConst, VpMisc;
|
||||
|
||||
{ LED Segment Map }
|
||||
{ }
|
||||
@ -275,9 +275,10 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomLEDLabel.SetAbout(const Value : string);
|
||||
procedure TVpCustomLEDLabel.SetAbout(const Value: string);
|
||||
begin
|
||||
{Leave empty}
|
||||
Unused(Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
@ -288,9 +289,9 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomLEDLabel.Initialize(var Points: array of TPoint);
|
||||
procedure TVpCustomLEDLabel.Initialize(out Points: array of TPoint);
|
||||
var
|
||||
I : Integer;
|
||||
I: Integer;
|
||||
begin
|
||||
for I := 0 to MAX_POINTS do begin
|
||||
Points[i].X := DigitPoints[i].X * (FSize - 1);
|
||||
|
@ -39,51 +39,48 @@ uses
|
||||
{$IFDEF LCL}
|
||||
LCLProc, LCLType, LCLIntf, LazFileUtils,
|
||||
{$ENDIF}
|
||||
Classes, Dialogs,SysUtils, Graphics, StdCtrls, Forms,
|
||||
VpBase, VpMisc, VpData, VpXParsr, VpPrtFmt; { For TVpAttributes }
|
||||
Classes, Dialogs,SysUtils, Graphics, Forms,
|
||||
VpBase, VpMisc, VpXParsr, VpPrtFmt; { For TVpAttributes }
|
||||
|
||||
type
|
||||
TVpLocalizeLanguage = class;
|
||||
|
||||
TVpLocalizeLanguageItem = class (TVpCollectionItem)
|
||||
TVpLocalizeLanguageItem = class(TVpCollectionItem)
|
||||
private
|
||||
FCollection : TVpLocalizeLanguage;
|
||||
FLanguageID : Integer;
|
||||
FSubLanguageID : Integer;
|
||||
FName : string;
|
||||
protected
|
||||
FCollection: TVpLocalizeLanguage;
|
||||
FLanguageID: Integer;
|
||||
FSubLanguageID: Integer;
|
||||
FName: string;
|
||||
|
||||
public
|
||||
constructor Create (Collection : TCollection); override;
|
||||
constructor Create(Collection: TCollection); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
published
|
||||
property Collection : TVpLocalizeLanguage read FCollection write FCollection;
|
||||
property LanguageID : Integer read FLanguageID write FLanguageID;
|
||||
property Name : string read FName write FName;
|
||||
property SubLanguageID : Integer read FSubLanguageID write FSubLanguageID;
|
||||
property Collection: TVpLocalizeLanguage read FCollection write FCollection;
|
||||
property LanguageID: Integer read FLanguageID write FLanguageID;
|
||||
property Name: string read FName write FName;
|
||||
property SubLanguageID: Integer read FSubLanguageID write FSubLanguageID;
|
||||
end;
|
||||
|
||||
TVpLocalizeLanguage = class (TCollection)
|
||||
TVpLocalizeLanguage = class(TCollection)
|
||||
private
|
||||
FOwner : TPersistent;
|
||||
FOwner: TPersistent;
|
||||
|
||||
protected
|
||||
function GetItem (Index : Integer) : TVpLocalizeLanguageItem;
|
||||
function GetItem(Index: Integer): TVpLocalizeLanguageItem;
|
||||
function GetOwner : TPersistent; override;
|
||||
procedure SetItem (Index : Integer; Value : TVpLocalizeLanguageItem);
|
||||
procedure SetItem(Index: Integer; Value: TVpLocalizeLanguageItem);
|
||||
|
||||
public
|
||||
constructor Create (AOwner : TPersistent);
|
||||
{$IFNDEF VERSION5}
|
||||
procedure Delete (Item : integer);
|
||||
{$ENDIF}
|
||||
function HasLanguage (ALanguage : Integer) : Integer;
|
||||
function HasSubLanguage (ALanguage : Integer;
|
||||
ASubLanguage : Integer) : Integer;
|
||||
function HasLanguage(ALanguage: Integer) : Integer;
|
||||
function HasSubLanguage(ALanguage : Integer; ASubLanguage: Integer): Integer;
|
||||
|
||||
property Items[Index : Integer] : TVpLocalizeLanguageItem
|
||||
read GetItem write SetItem;
|
||||
property Items[Index: Integer]: TVpLocalizeLanguageItem read GetItem write SetItem;
|
||||
end;
|
||||
|
||||
TVpLocalizeStates = class;
|
||||
@ -205,37 +202,27 @@ type
|
||||
FElementIndex : Integer;
|
||||
|
||||
protected
|
||||
procedure xmlLocalizeAttribute (oOwner : TObject;
|
||||
sName,
|
||||
sValue : DOMString;
|
||||
bSpecified : Boolean);
|
||||
procedure xmlLocalizeEndElement (oOwner : TObject;
|
||||
sValue : DOMString);
|
||||
procedure xmlLocalizeStartElement (oOwner : TObject;
|
||||
sValue : DOMString);
|
||||
procedure xmlLocalizeAttribute(oOwner: TObject; sName, sValue: DOMString; bSpecified: Boolean);
|
||||
procedure xmlLocalizeEndElement(oOwner: TObject; sValue: DOMString);
|
||||
procedure xmlLocalizeStartElement(oOwner: TObject; sValue: DOMString);
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure CountriesByLanguage (ALanguage : Integer;
|
||||
AStrings : TStrings);
|
||||
procedure CountriesBySubLanguage (ALanguage : Integer;
|
||||
ASubLanguage : Integer;
|
||||
AStrings : TStrings);
|
||||
function CountryNameToIndex (ACountry : string) : Integer;
|
||||
procedure CountriesToTStrings (AStrings : TStrings);
|
||||
function GetCurrentCountry : Integer;
|
||||
function GetCountryByLanguage (ALanguage : Integer) : Integer;
|
||||
function GetCountryBySubLanguage (ALanguage : Integer;
|
||||
ASubLanguage : Integer) : Integer;
|
||||
procedure LoadFromFile (const FileName : string;
|
||||
const Append : Boolean);
|
||||
function StateNameToIndex (ACountry : Integer;
|
||||
AState : string) : Integer;
|
||||
procedure StatesToTStrings (ACountry : Integer;
|
||||
AStrings : TStrings);
|
||||
procedure CountriesByLanguage(ALanguage: Integer; AStrings: TStrings);
|
||||
procedure CountriesBySubLanguage(ALanguage: Integer; ASubLanguage: Integer;
|
||||
AStrings: TStrings);
|
||||
function CountryNameToIndex(ACountry: string): Integer;
|
||||
procedure CountriesToTStrings(AStrings: TStrings);
|
||||
function GetCurrentCountry: Integer;
|
||||
function GetCountryByLanguage(ALanguage: Integer): Integer;
|
||||
function GetCountryBySubLanguage(ALanguage: Integer; ASubLanguage: Integer): Integer;
|
||||
procedure LoadFromFile(const FileName: string; const Append: Boolean);
|
||||
function StateNameToIndex(ACountry: Integer; AState: string): Integer;
|
||||
procedure StatesToTStrings (ACountry: Integer; AStrings: TStrings);
|
||||
|
||||
published
|
||||
property Countries : TVpLocalizeCountry read FCountries write FCountries;
|
||||
property Countries: TVpLocalizeCountry read FCountries write FCountries;
|
||||
end;
|
||||
|
||||
|
||||
@ -243,14 +230,16 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
constructor TVpLocalizeLanguageItem.Create (Collection : TCollection);
|
||||
begin
|
||||
inherited Create (Collection);
|
||||
FCollection := TVpLocalizeLanguage.Create (TVpLocalizeLanguage (Collection).FOwner);
|
||||
{ TVpLocalizeLanguageItem }
|
||||
|
||||
FLanguageID := -1;
|
||||
constructor TVpLocalizeLanguageItem.Create(Collection: TCollection);
|
||||
begin
|
||||
inherited Create(Collection);
|
||||
FCollection := TVpLocalizeLanguage.Create(TVpLocalizeLanguage(Collection).FOwner);
|
||||
|
||||
FLanguageID := -1;
|
||||
FSubLanguageID := -1;
|
||||
FName := '';
|
||||
FName := '';
|
||||
end;
|
||||
|
||||
destructor TVpLocalizeLanguageItem.Destroy;
|
||||
@ -260,9 +249,12 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
constructor TVpLocalizeLanguage.Create(AOwner : TPersistent);
|
||||
|
||||
{ TVpLocalizeLanguage }
|
||||
|
||||
constructor TVpLocalizeLanguage.Create(AOwner: TPersistent);
|
||||
begin
|
||||
inherited Create (TVpLocalizeLanguageItem);
|
||||
inherited Create(TVpLocalizeLanguageItem);
|
||||
FOwner := AOwner;
|
||||
end;
|
||||
{=====}
|
||||
@ -275,22 +267,21 @@ end;
|
||||
{=====}
|
||||
{$ENDIF}
|
||||
|
||||
function TVpLocalizeLanguage.GetItem (Index : Integer) : TVpLocalizeLanguageItem;
|
||||
function TVpLocalizeLanguage.GetItem(Index: Integer): TVpLocalizeLanguageItem;
|
||||
begin
|
||||
Result := TVpLocalizeLanguageItem (inherited GetItem (Index));
|
||||
Result := TVpLocalizeLanguageItem(inherited GetItem(Index));
|
||||
end;
|
||||
{=====}
|
||||
|
||||
function TVpLocalizeLanguage.GetOwner : TPersistent;
|
||||
function TVpLocalizeLanguage.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FOwner;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
function TVpLocalizeLanguage.HasLanguage (ALanguage : Integer) : Integer;
|
||||
function TVpLocalizeLanguage.HasLanguage (ALanguage: Integer): Integer;
|
||||
var
|
||||
i : Integer;
|
||||
|
||||
i: Integer;
|
||||
begin
|
||||
Result := -1;
|
||||
for i := 0 to Count - 1 do
|
||||
@ -300,24 +291,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TVpLocalizeLanguage.HasSubLanguage (ALanguage : Integer;
|
||||
ASubLanguage : Integer) : Integer;
|
||||
function TVpLocalizeLanguage.HasSubLanguage(ALanguage: Integer;
|
||||
ASubLanguage: Integer): Integer;
|
||||
var
|
||||
i : Integer;
|
||||
|
||||
i: Integer;
|
||||
begin
|
||||
Result := -1;
|
||||
for i := 0 to Count - 1 do
|
||||
if (Items[i].LanguageID = ALanguage) and
|
||||
(Items[i].SubLanguageID = ASubLanguage) then begin
|
||||
if (Items[i].LanguageID = ALanguage) and (Items[i].SubLanguageID = ASubLanguage) then
|
||||
begin
|
||||
Result := i;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpLocalizeLanguage.SetItem (Index : Integer; Value : TVpLocalizeLanguageItem);
|
||||
procedure TVpLocalizeLanguage.SetItem(Index: Integer; Value: TVpLocalizeLanguageItem);
|
||||
begin
|
||||
inherited SetItem (Index, Value);
|
||||
inherited SetItem(Index, Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
@ -411,9 +401,9 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
constructor TVpLocalizeCountry.Create(AOwner : TPersistent);
|
||||
constructor TVpLocalizeCountry.Create(AOwner: TPersistent);
|
||||
begin
|
||||
inherited Create (TVpLocalizeCountryItem);
|
||||
inherited Create(TVpLocalizeCountryItem);
|
||||
FOwner := AOwner;
|
||||
end;
|
||||
{=====}
|
||||
@ -555,7 +545,6 @@ end;
|
||||
function TVpLocalization.GetCountryByLanguage (ALanguage : Integer) : Integer;
|
||||
var
|
||||
i : Integer;
|
||||
|
||||
begin
|
||||
Result := -1;
|
||||
for i := 0 to Countries.Count - 1 do
|
||||
@ -641,14 +630,13 @@ begin
|
||||
AStrings.Add (FCountries.Items[ACountry].States.Items[i].Name);
|
||||
end;
|
||||
|
||||
procedure TVpLocalization.xmlLocalizeAttribute (oOwner : TObject;
|
||||
sName,
|
||||
sValue : DOMString;
|
||||
bSpecified : Boolean);
|
||||
procedure TVpLocalization.xmlLocalizeAttribute(oOwner: TObject;
|
||||
sName, sValue: DOMString; bSpecified: Boolean);
|
||||
var
|
||||
Item : TVpAttributeItem;
|
||||
begin
|
||||
Item := TVpAttributeItem (FAttributes.Add);
|
||||
Unused(oOwner, bSpecified);
|
||||
Item := TVpAttributeItem(FAttributes.Add);
|
||||
Item.Name := sName;
|
||||
Item.Value := sValue;
|
||||
end;
|
||||
@ -656,8 +644,9 @@ end;
|
||||
procedure TVpLocalization.xmlLocalizeEndElement (oOwner : TObject;
|
||||
sValue : DOMString);
|
||||
begin
|
||||
if (sValue = 'Country') or (sValue = 'Countries') or
|
||||
(sValue = 'AddressDefinition') then begin
|
||||
Unused(oOwner);
|
||||
if (sValue = 'Country') or (sValue = 'Countries') or (sValue = 'AddressDefinition') then
|
||||
begin
|
||||
FLoadingIndex := -1;
|
||||
FElementIndex := -1;
|
||||
end else if sValue = 'State' then
|
||||
@ -665,27 +654,27 @@ begin
|
||||
FAttributes.Clear;
|
||||
end;
|
||||
|
||||
procedure TVpLocalization.xmlLocalizeStartElement (oOwner : TObject;
|
||||
sValue : DOMString);
|
||||
procedure TVpLocalization.xmlLocalizeStartElement(oOwner: TObject; sValue: DOMString);
|
||||
|
||||
function GetBooleanValue (AString : string;
|
||||
ADefault : Boolean) : Boolean;
|
||||
function GetBooleanValue(AString: string; ADefault: Boolean): Boolean;
|
||||
begin
|
||||
Result := ADefault;
|
||||
AString := LowerCase (AString);
|
||||
if (AString = 't') or (AString = 'true') or (AString = '1') or
|
||||
(AString = 'on') or (AString = 'yes') then
|
||||
(AString = 'on') or (AString = 'yes')
|
||||
then
|
||||
Result := True
|
||||
else if (AString= 'f') or (AString = 'false') or (AString = '0') or
|
||||
(AString = 'off') or (AString = 'no') then
|
||||
else
|
||||
if (AString= 'f') or (AString = 'false') or (AString = '0') or
|
||||
(AString = 'off') or (AString = 'no')
|
||||
then
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function GetIntegerValue (AString : string;
|
||||
ADefault : Integer) : Integer;
|
||||
function GetIntegerValue(AString: string; ADefault: Integer): Integer;
|
||||
begin
|
||||
try
|
||||
Result := StrToInt (AString);
|
||||
Result := StrToInt(AString);
|
||||
except on EConvertError do
|
||||
Result := ADefault;
|
||||
end;
|
||||
@ -698,20 +687,21 @@ var
|
||||
NewLanguage : TVpLocalizeLanguageItem;
|
||||
|
||||
begin
|
||||
Unused(oOwner);
|
||||
|
||||
if sValue = 'Countries' then begin
|
||||
FLoadingIndex := -1;
|
||||
FElementIndex := -1;
|
||||
|
||||
end else if sValue = 'Country' then begin
|
||||
end else
|
||||
if sValue = 'Country' then begin
|
||||
NewItem := TVpLocalizeCountryItem (FCountries.Add);
|
||||
FLoadingIndex := NewItem.Index;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
if (FAttributes.Items[i].Name = 'Name') and
|
||||
(Fattributes.Items[i].Value <> '') then
|
||||
if (FAttributes.Items[i].Name = 'Name') and (Fattributes.Items[i].Value <> '') then
|
||||
NewItem.Name := FAttributes.Items[i].Value;
|
||||
end
|
||||
|
||||
end else if sValue = 'State' then begin
|
||||
end else
|
||||
if sValue = 'State' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -725,10 +715,10 @@ begin
|
||||
GetBooleanValue (FAttributes.Items[i].Value, False)
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].StatesVisible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'Address1' then begin
|
||||
end else
|
||||
if sValue = 'Address1' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -736,10 +726,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].Address1Caption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].Address1Visible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'Address2' then begin
|
||||
end else
|
||||
if sValue = 'Address2' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -747,10 +737,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].Address2Caption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].Address2Visible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'Address3' then begin
|
||||
end else
|
||||
if sValue = 'Address3' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -758,10 +748,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].Address3Caption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].Address3Visible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'Address4' then begin
|
||||
end else
|
||||
if sValue = 'Address4' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -769,10 +759,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].Address4Caption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].Address4Visible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, False);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, False);
|
||||
end;
|
||||
|
||||
end else if sValue = 'City' then begin
|
||||
end else
|
||||
if sValue = 'City' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -780,10 +770,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].CityCaption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].CityVisible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'Zipcode' then begin
|
||||
end else
|
||||
if sValue = 'Zipcode' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to FAttributes.Count - 1 do begin
|
||||
@ -791,10 +781,10 @@ begin
|
||||
FCountries.Items[FLoadingIndex].ZipCaption := FAttributes.Items[i].Value
|
||||
else if FAttributes.Items[i].Name = 'Visible' then
|
||||
FCountries.Items[FLoadingIndex].ZipVisible :=
|
||||
GetBooleanValue (FAttributes.Items[i].Value, True);
|
||||
GetBooleanValue(FAttributes.Items[i].Value, True);
|
||||
end;
|
||||
|
||||
end else if sValue = 'LegalValue' then begin
|
||||
end else
|
||||
if sValue = 'LegalValue' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
NewElement := TVpLocalizeStatesItem (FCountries.Items[FLoadingIndex].States.Add);
|
||||
@ -805,7 +795,8 @@ begin
|
||||
else if FAttributes.Items[i].Name = 'Value' then
|
||||
NewElement.Abbr := FAttributes.Items[i].Value;
|
||||
end;
|
||||
end else if sValue = 'Language' then begin
|
||||
end else
|
||||
if sValue = 'Language' then begin
|
||||
if FLoadingIndex < 0 then
|
||||
Exit;
|
||||
NewLanguage := TVpLocalizeLanguageItem (FCountries.Items[FLoadingIndex].Languages.Add);
|
||||
@ -819,7 +810,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
FAttributes.Clear;
|
||||
end;
|
||||
|
||||
|
@ -63,7 +63,7 @@ function DaysInMonth(Year, Month : Integer) : Integer;
|
||||
{-return the number of days in the specified month of a given year}
|
||||
function DefaultEpoch : Integer;
|
||||
{-return the current century}
|
||||
function GetLeftButton : Byte;
|
||||
//function GetLeftButton : Byte;
|
||||
procedure GetRGB(Clr : TColor; var IR, IG, IB : Byte);
|
||||
function IsLeapYear(Year : Integer) : Boolean;
|
||||
function GetStartOfWeek(Date: TDateTime; StartOn: TVpDayType): TDateTime;
|
||||
@ -348,13 +348,13 @@ begin
|
||||
Result := (ThisYear div 100) * 100;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
(*
|
||||
function GetLeftButton : Byte;
|
||||
const
|
||||
RLButton : array[Boolean] of Word = (VK_LBUTTON, VK_RBUTTON);
|
||||
begin
|
||||
//TODO: Result := RLButton[GetSystemMetrics(SM_SWAPBUTTON) <> 0];
|
||||
end;
|
||||
end; *)
|
||||
{=====}
|
||||
|
||||
procedure GetRGB(Clr : TColor; var IR, IG, IB : Byte);
|
||||
@ -591,7 +591,12 @@ end;
|
||||
function GetRealFontHeight(AFont: TFont): Integer;
|
||||
begin
|
||||
if AFont.Size = 0 then
|
||||
Result := GetFontData(AFont.Handle).Height else
|
||||
{$IFDEF LCL}
|
||||
Result := GetFontData(AFont.Reference.Handle).Height
|
||||
{$ELSE}
|
||||
Result := GetFontData(AFont.Handle).Height
|
||||
{$ENDIF}
|
||||
else
|
||||
Result := AFont.Height;
|
||||
end;
|
||||
|
||||
|
@ -770,8 +770,6 @@ procedure TVpMonthView.WMRButtonDown(var Msg : TWMRButtonDown);
|
||||
{$ELSE}
|
||||
procedure TVpMonthView.WMRButtonDown(var Msg : TLMRButtonDown);
|
||||
{$ENDIF}
|
||||
var
|
||||
ClientOrigin : TPoint;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -780,7 +778,6 @@ begin
|
||||
SetFocus;
|
||||
if FRightClickChangeDate then
|
||||
mvSetDateByCoord (Point (Msg.XPos, Msg.YPos));
|
||||
ClientOrigin := GetClientOrigin;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
@ -35,7 +35,7 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf,
|
||||
LCLProc, LCLType, LCLIntf,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
@ -144,6 +144,9 @@ implementation
|
||||
{$R *.DFM}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
VpMisc;
|
||||
|
||||
{$IFDEF VERSION6}
|
||||
procedure EditNavBar(Designer : TIDesigner; Bar : TVpNavBar);
|
||||
{$ELSE}
|
||||
@ -199,6 +202,7 @@ end;
|
||||
procedure TfrmNavBarEd.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Unused(Action);
|
||||
RefreshTimer.Free;
|
||||
Release;
|
||||
end;
|
||||
@ -335,6 +339,7 @@ end;
|
||||
procedure TfrmNavBarEd.lbItemsMeasureItem(Control: TWinControl;
|
||||
Index: Integer; var Height: Integer);
|
||||
begin
|
||||
Unused(Control, Index);
|
||||
if (Bar.Images <> nil) then
|
||||
Height := Bar.Images.Height + 4;
|
||||
end;
|
||||
@ -343,6 +348,7 @@ end;
|
||||
procedure TfrmNavBarEd.lbItemsDrawItem(Control: TWinControl;
|
||||
Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||
begin
|
||||
Unused(State);
|
||||
with TListBox(Control).Canvas do
|
||||
FillRect(Rect);
|
||||
if (Bar.Images <> nil)
|
||||
@ -364,6 +370,7 @@ end;
|
||||
procedure TfrmNavBarEd.lbImagesDrawItem(Control: TWinControl;
|
||||
Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||
begin
|
||||
Unused(State);
|
||||
with TListBox(Control).Canvas do
|
||||
FillRect(Rect);
|
||||
if (Bar.Images <> nil) then
|
||||
|
@ -263,7 +263,7 @@ type
|
||||
procedure nabFontChanged(Sender: TObject);
|
||||
procedure nabGetEditorCaption(var Caption: string);
|
||||
function nabGetFolderArea(Index: Integer): TRect;
|
||||
procedure nabGetHitTest(X, Y: Integer; var FolderIndex: Integer; var ItemIndex: Integer);
|
||||
procedure nabGetHitTest(X, Y: Integer; out FolderIndex, ItemIndex: Integer);
|
||||
procedure nabImagesChanged(Sender: TObject);
|
||||
procedure nabRecalcDisplayNames;
|
||||
procedure nabScrollDownBtnClick(Sender: TObject);
|
||||
@ -284,8 +284,8 @@ type
|
||||
procedure WMNCHitTest(var Msg: TWMNCHitTest); message WM_NCHITTEST;
|
||||
procedure WMSetCursor(var Msg: TWMSetCursor); message WM_SETCURSOR;
|
||||
{$ELSE}
|
||||
procedure CMFontChanged(var Message: TLMessage); message CM_FONTCHANGED;
|
||||
procedure CMParentColorChanged(var Message: TLMessage); message CM_PARENTCOLORCHANGED;
|
||||
procedure CMFontChanged(var Msg: TLMessage); message CM_FONTCHANGED;
|
||||
procedure CMParentColorChanged(var Msg: TLMessage); message CM_PARENTCOLORCHANGED;
|
||||
{windows message response methods}
|
||||
procedure WMEraseBkGnd(var Msg: TLMEraseBkGnd); message LM_ERASEBKGND;
|
||||
procedure WMNCHitTest(var Msg: TLMNCHitTest); message LM_NCHITTEST;
|
||||
@ -673,6 +673,8 @@ var
|
||||
I: Integer;
|
||||
C: TControl;
|
||||
begin
|
||||
Unused(Root);
|
||||
|
||||
inherited GetChildren(Proc, Self);
|
||||
for I := 0 to ControlCount - 1 do begin
|
||||
C := Controls[I];
|
||||
@ -956,8 +958,8 @@ end;
|
||||
{===== TVpNavBar ================================================}
|
||||
|
||||
constructor TVpCustomNavBar.Create(AOwner: TComponent);
|
||||
var
|
||||
HSnd: THandle;
|
||||
{var
|
||||
HSnd: THandle; }
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
@ -1105,6 +1107,8 @@ end;
|
||||
|
||||
procedure TVpCustomNavBar.FolderChanged(FolderIndex: Integer);
|
||||
begin
|
||||
Unused(FolderIndex);
|
||||
|
||||
Invalidate;
|
||||
if not (csDestroying in ComponentState) then
|
||||
RecreateWnd{$IFDEF LCL}(self){$ENDIF};
|
||||
@ -1119,13 +1123,14 @@ end;
|
||||
{$ENDIF}
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomNavBar.CMFontChanged(var Message: {$IFDEF LCL}TLMessage{$ELSE}TMessage{$ENDIF});
|
||||
procedure TVpCustomNavBar.CMFontChanged(var Msg: {$IFDEF LCL}TLMessage{$ELSE}TMessage{$ENDIF});
|
||||
begin
|
||||
Unused(Msg);
|
||||
nabRecalcDisplayNames;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomNavBar.CMParentColorChanged(var Message: {$IFDEF LCL}TLMessage{$ELSE}TMessage{$ENDIF});
|
||||
procedure TVpCustomNavBar.CMParentColorChanged(var Msg: {$IFDEF LCL}TLMessage{$ELSE}TMessage{$ENDIF});
|
||||
begin
|
||||
inherited;
|
||||
if ParentColor then
|
||||
@ -1169,6 +1174,7 @@ procedure TVpCustomNavBar.GetChildren(Proc: TGetChildProc; Root: TComponent);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Unused(Root);
|
||||
for I := 0 to FContainers.Count - 1 do
|
||||
Proc(TComponent(FContainers[I]));
|
||||
end;
|
||||
@ -1226,6 +1232,7 @@ end;
|
||||
|
||||
procedure TVpCustomNavBar.DoMouseOverItem(X, Y, ItemIndex: Integer);
|
||||
begin
|
||||
Unused(ItemIndex);
|
||||
if Assigned(FOnMouseOverItem) then
|
||||
FOnMouseOverItem(Self, Folders[ActiveFolder].Items[GetItemAt(X, Y)]);
|
||||
end;
|
||||
@ -1692,8 +1699,8 @@ begin
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpCustomNavBar.nabGetHitTest(X, Y: Integer; var FolderIndex: Integer;
|
||||
var ItemIndex: Integer);
|
||||
procedure TVpCustomNavBar.nabGetHitTest(X, Y: Integer;
|
||||
out FolderIndex, ItemIndex: Integer);
|
||||
var
|
||||
I: Integer;
|
||||
Item: TVpNavBtnItem;
|
||||
@ -1738,6 +1745,8 @@ function TVpCustomNavBar.nabGetFolderArea(Index: Integer): TRect;
|
||||
var
|
||||
I : Integer;
|
||||
begin
|
||||
Unused(Index);
|
||||
|
||||
Result := ClientRect;
|
||||
for I := 0 to ActiveFolder do
|
||||
Inc(Result.Top, FButtonHeight);
|
||||
@ -1810,9 +1819,11 @@ end;
|
||||
procedure TVpCustomNavBar.nabTimerEvent(Sender: TObject; Handle: Integer;
|
||||
Interval: Cardinal; ElapsedTime: LongInt);
|
||||
var
|
||||
Pt: TPoint;
|
||||
Pt: TPoint = (x:0; y:0);
|
||||
Form: TCustomForm;
|
||||
begin
|
||||
Unused(Handle, Interval, ElapsedTime);
|
||||
|
||||
GetCursorPos(Pt);
|
||||
Pt := ScreenToClient(Pt);
|
||||
if not PtInRect(ClientRect, Pt) then begin
|
||||
@ -2058,8 +2069,8 @@ var
|
||||
Flags: Integer;
|
||||
MyRect: TRect;
|
||||
TR: TRect;
|
||||
ContainerRect: TRect;
|
||||
FolderType: TVpFolderType;
|
||||
// ContainerRect: TRect;
|
||||
// FolderType: TVpFolderType;
|
||||
BkColor: TColor;
|
||||
Folder: TVpNavFolder;
|
||||
Item: TVpNavBtnItem;
|
||||
|
@ -90,19 +90,22 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf,
|
||||
LCLProc, LCLType, LCLIntf,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Classes, Dialogs, SysUtils, Graphics, StdCtrls, Forms, Printers,
|
||||
VpBase, VpMisc, VpData, VpXParsr, VpCanvasUtils, VpSR, VpException;
|
||||
Classes, Dialogs, SysUtils, Graphics, Forms, Printers,
|
||||
VpBase, VpData, VpXParsr, VpCanvasUtils, VpSR, VpException;
|
||||
|
||||
type
|
||||
TVpChangeVar = (cvRemove, cvIgnore, cvChange);
|
||||
|
||||
TVpDayUnits = (duDay, duWeek, duMonth, duYear);
|
||||
TVpShapeType = (ustRectangle, ustTopLine, ustBottomLine,
|
||||
ustLeftLine, ustRightLine, ustTLToBRLine,
|
||||
ustBLToTRLine, ustEllipse);
|
||||
|
||||
TVpShapeType = (
|
||||
ustRectangle, ustTopLine, ustBottomLine, ustLeftLine, ustRightLine,
|
||||
ustTLToBRLine, ustBLToTRLine, ustEllipse
|
||||
);
|
||||
|
||||
TVpWatcher = record
|
||||
Handle: THandle;
|
||||
@ -447,8 +450,7 @@ uses
|
||||
{$IFDEF LCL}
|
||||
DateUtils,
|
||||
{$ENDIF}
|
||||
VpConst, VpBaseDS, VpPrtFmtCBox, VpPrtPrv, VpDayView, VpWeekView, VpMonthView,
|
||||
VpCalendar, VpTaskList, VpContactGrid;
|
||||
VpConst, VpMisc, VpBaseDS, VpPrtFmtCBox;
|
||||
|
||||
function XMLizeString(const s: string): string;
|
||||
var
|
||||
@ -557,6 +559,8 @@ var
|
||||
OldPen: TPen;
|
||||
OldBrush: TBrush;
|
||||
begin
|
||||
Unused(Angle, Viewport);
|
||||
|
||||
OldPen := TPen.Create;
|
||||
try
|
||||
OldBrush := TBrush.Create;
|
||||
@ -949,6 +953,8 @@ procedure TVpPrintFormatElement.NotifyAll(Item: TCollectionItem);
|
||||
var
|
||||
Notifier: TPersistent;
|
||||
begin
|
||||
Unused(Item);
|
||||
|
||||
if not Assigned (FOwner) then
|
||||
Exit;
|
||||
|
||||
@ -1172,6 +1178,8 @@ end;
|
||||
|
||||
procedure TVpPrintFormat.NotifyAll(Item: TCollectionItem);
|
||||
begin
|
||||
Unused(Item);
|
||||
|
||||
if not Assigned(FOwner) then
|
||||
Exit;
|
||||
|
||||
@ -1736,7 +1744,6 @@ var
|
||||
HeightInPixels: Integer;
|
||||
PixelsPerInchX: Integer;
|
||||
PixelsPerInchY: Integer;
|
||||
Scale: Extended;
|
||||
|
||||
procedure GetMeasurements;
|
||||
begin
|
||||
@ -1750,8 +1757,6 @@ var
|
||||
|
||||
PixelsPerInchX := GetDeviceCaps(APrinter.Canvas.Handle, LOGPIXELSX);
|
||||
PixelsPerInchY := GetDeviceCaps(APrinter.Canvas.Handle, LOGPIXELSY);
|
||||
|
||||
Scale := PixelsPerInchY / Screen.PixelsPerInch;
|
||||
end;
|
||||
|
||||
procedure CalculateMargins;
|
||||
@ -1919,7 +1924,6 @@ var
|
||||
HeightInPixels: Integer;
|
||||
PixelsPerInchX: Integer;
|
||||
PixelsPerInchY: Integer;
|
||||
Scale: Extended;
|
||||
|
||||
procedure GetMeasurements;
|
||||
begin
|
||||
@ -1928,8 +1932,6 @@ var
|
||||
|
||||
PixelsPerInchX := GetDeviceCaps(ACanvas.Handle, LOGPIXELSX);
|
||||
PixelsPerInchY := GetDeviceCaps(ACanvas.Handle, LOGPIXELSY);
|
||||
|
||||
Scale := PixelsPerInchY / Screen.PixelsPerInch;
|
||||
end;
|
||||
|
||||
procedure CalculateMargins;
|
||||
@ -2462,6 +2464,8 @@ procedure TVpPrinter.xmlPrintFormatAttribute(oOwner: TObject;
|
||||
var
|
||||
Item: TVpAttributeItem;
|
||||
begin
|
||||
Unused(oOwner, bSpecified);
|
||||
|
||||
Item := TVpAttributeItem(FAttributes.Add);
|
||||
Item.Name := sName;
|
||||
Item.Value := sValue;
|
||||
@ -2471,6 +2475,7 @@ end;
|
||||
procedure TVpPrinter.xmlPrintFormatEndElement(oOwner: TObject;
|
||||
sValue: DOMString);
|
||||
begin
|
||||
Unused(oOwner);
|
||||
if (sValue = 'PrintFormat') or (sValue = 'VpPrintFormats') then begin
|
||||
FLoadingIndex := -1;
|
||||
FElementIndex := -1;
|
||||
@ -2487,8 +2492,8 @@ var
|
||||
NewItem: TVpPrintFormatItem;
|
||||
NewElement: TVpPrintFormatElementItem;
|
||||
attr: TVpAttributeItem;
|
||||
elem: TVpPrintFormatItem;
|
||||
begin
|
||||
Unused(oOwner);
|
||||
if sValue = 'VpPrintFormats' then begin
|
||||
FLoadingIndex := -1;
|
||||
FElementIndex := -1;
|
||||
|
@ -56,12 +56,12 @@ type
|
||||
function GetAbout : string;
|
||||
procedure Loaded; override;
|
||||
procedure Notification (AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SetAbout (const Value : string);
|
||||
procedure SetControlLink (const v : TVpControlLink);
|
||||
procedure VpPrintFormatChanged (var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message Vp_PrintFormatChanged;
|
||||
procedure SetAbout(const Value: string);
|
||||
procedure SetControlLink(const v: TVpControlLink);
|
||||
procedure VpPrintFormatChanged(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message Vp_PrintFormatChanged;
|
||||
|
||||
public
|
||||
constructor Create (AOwner : TComponent); override;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure UpdateItems;
|
||||
@ -69,9 +69,8 @@ type
|
||||
property Style;
|
||||
|
||||
published
|
||||
property Version : string read GetAbout write SetAbout stored False;
|
||||
property ControlLink : TVpControlLink
|
||||
read FControlLink write SetControlLink;
|
||||
property Version: string read GetAbout write SetAbout stored False;
|
||||
property ControlLink: TVpControlLink read FControlLink write SetControlLink;
|
||||
|
||||
property Cursor;
|
||||
property DragCursor;
|
||||
@ -121,11 +120,14 @@ function SearchControlLink (const C : TComponent) : TVpControlLink;
|
||||
|
||||
implementation
|
||||
|
||||
function SearchControlLink (const C : TComponent) : TVpControlLink;
|
||||
uses
|
||||
VpMisc;
|
||||
|
||||
function FindControlLink (const C : TComponent) : TVpControlLink;
|
||||
function SearchControlLink(const C: TComponent): TVpControlLink;
|
||||
|
||||
function FindControlLink (const C: TComponent): TVpControlLink;
|
||||
var
|
||||
I : Integer;
|
||||
I: Integer;
|
||||
begin
|
||||
Result := nil;
|
||||
if not Assigned (C) then
|
||||
@ -148,21 +150,21 @@ begin
|
||||
Result := FindControlLink (C);
|
||||
end;
|
||||
|
||||
constructor TVpPrintFormatComboBox.Create (AOwner : TComponent);
|
||||
constructor TVpPrintFormatComboBox.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create (AOwner);
|
||||
inherited Create(AOwner);
|
||||
|
||||
Style := csDropDownList;
|
||||
Style := csDropDownList;
|
||||
Sorted := True;
|
||||
|
||||
FControlLink := SearchControlLink (Owner);
|
||||
FControlLink := SearchControlLink(Owner);
|
||||
UpdateItems;
|
||||
end;
|
||||
|
||||
destructor TVpPrintFormatComboBox.Destroy;
|
||||
begin
|
||||
if (HandleAllocated) and (Assigned (FControlLink)) then
|
||||
FControlLink.Printer.DeregisterWatcher (Handle);
|
||||
if HandleAllocated and Assigned(FControlLink) then
|
||||
FControlLink.Printer.DeregisterWatcher(Handle);
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
@ -219,6 +221,7 @@ end;
|
||||
procedure TVpPrintFormatComboBox.SetAbout(const Value: string);
|
||||
begin
|
||||
//Empty on purpose
|
||||
Unused(Value);
|
||||
end;
|
||||
|
||||
procedure TVpPrintFormatComboBox.SetControlLink (const v : TVpControlLink);
|
||||
@ -235,14 +238,14 @@ end;
|
||||
|
||||
procedure TVpPrintFormatComboBox.VpPrintFormatChanged(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF});
|
||||
begin
|
||||
Unused(Msg);
|
||||
UpdateItems;
|
||||
end;
|
||||
|
||||
procedure TVpPrintFormatComboBox.UpdateItems;
|
||||
var
|
||||
i : Integer;
|
||||
Ctr : Integer;
|
||||
|
||||
i: Integer;
|
||||
Ctr: Integer;
|
||||
begin
|
||||
if not Assigned (FControlLink) then
|
||||
Exit;
|
||||
|
@ -34,15 +34,13 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages,LCLProc,LCLType,LCLIntf,
|
||||
LCLProc, LCLType, LCLIntf,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
StdCtrls, TypInfo, ExtCtrls,
|
||||
|
||||
VpPrtFmt, VpBase, VpBaseDS, VpDlg, VpDBDS,{ VpBDEDS,} VpPrtPrv, VpPrtFmtCBox,
|
||||
VpEdFmtLst;
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
TypInfo, ExtCtrls,
|
||||
VpBase, VpBaseDS, VpDlg, VpPrtFmtCBox, VpEdFmtLst;
|
||||
|
||||
type
|
||||
|
||||
|
@ -52,8 +52,8 @@ uses
|
||||
{$ELSE}
|
||||
DsgnIntf,
|
||||
{$ENDIF}
|
||||
StdCtrls, ExtCtrls, Buttons,
|
||||
VpSR, VpBase, VpBaseDS, VpEdFmtLst;
|
||||
ExtCtrls, Buttons,
|
||||
VpSR, VpBaseDS, VpEdFmtLst;
|
||||
|
||||
type
|
||||
TVpPrtFmtPropertyEditor = class(TComponentEditor)
|
||||
|
@ -34,14 +34,14 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
|
||||
Buttons, Printers, ImgList, ComCtrls, ToolWin, ActnList,
|
||||
Buttons, Printers, ComCtrls, ActnList,
|
||||
{$IFDEF VERSION6} Variants, {$ENDIF}
|
||||
VpMisc, VpBase, VpException, VpData, VpPrtPrv, VpSR, VpBaseDS, VpDlg,
|
||||
VpMisc, VpBase, VpData, VpPrtPrv, VpSR, VpBaseDS, VpDlg,
|
||||
VpPrtFmtCBox;
|
||||
|
||||
type
|
||||
@ -379,6 +379,8 @@ end;
|
||||
procedure TfrmPrintPreview.actMainUpdate(Action: TBasicAction;
|
||||
var Handled: Boolean);
|
||||
begin
|
||||
Unused(Action, Handled);
|
||||
|
||||
if VpPrintPreview1.IsFirstPage then begin
|
||||
actFirstPage.Enabled := False;
|
||||
actPrevPage.Enabled := False;
|
||||
@ -405,6 +407,8 @@ end;
|
||||
procedure TfrmPrintPreview.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
Unused(Shift);
|
||||
|
||||
if Key = VK_ESCAPE then
|
||||
actCancel.Execute;
|
||||
end;
|
||||
|
@ -34,7 +34,7 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
|
@ -32,12 +32,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
StdCtrls, VpBaseDS, VpBase, VpDlg, VpResEditDlg, ExtCtrls;
|
||||
StdCtrls, VpBaseDS, VpResEditDlg, ExtCtrls;
|
||||
|
||||
type
|
||||
TfrmSelectResource = class(TForm)
|
||||
|
@ -35,14 +35,14 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
Windows, Messages, VpEdPop, VpDateEdit,
|
||||
{$ENDIF}
|
||||
SysUtils,
|
||||
{$IFDEF VERSION6} Variants, {$ENDIF}
|
||||
Classes, Graphics, Controls, Forms, Dialogs, VpData, StdCtrls, ExtCtrls,
|
||||
VpEdPop, VpDateEdit, VpBase, VpSR, VpDlg, ComCtrls, EditBtn;
|
||||
VpBase, VpSR, VpDlg, ComCtrls, EditBtn;
|
||||
|
||||
type
|
||||
{ forward declarations }
|
||||
|
@ -38,7 +38,7 @@ uses
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
Classes, Graphics, Controls, ComCtrls, ExtCtrls, StdCtrls,
|
||||
Classes, Graphics, Controls, ExtCtrls, StdCtrls,
|
||||
VpBase, VpBaseDS, VpMisc, VpData, VpSR, VpConst, VpCanvasUtils, Menus;
|
||||
|
||||
type
|
||||
@ -228,19 +228,12 @@ type
|
||||
procedure LinkHandler(Sender: TComponent;
|
||||
NotificationType: TVpNotificationType;
|
||||
const Value: Variant); override;
|
||||
function GetControlType : TVpItemType; override;
|
||||
procedure PaintToCanvas (ACanvas : TCanvas;
|
||||
ARect : TRect;
|
||||
Angle : TVpRotationAngle);
|
||||
procedure RenderToCanvas (RenderCanvas : TCanvas;
|
||||
RenderIn : TRect;
|
||||
Angle : TVpRotationAngle;
|
||||
Scale : Extended;
|
||||
RenderDate : TDateTime;
|
||||
StartLine : Integer;
|
||||
StopLine : Integer;
|
||||
UseGran : TVpGranularity;
|
||||
DisplayOnly : Boolean); override;
|
||||
function GetControlType: TVpItemType; override;
|
||||
procedure PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
||||
Angle: TVpRotationAngle);
|
||||
procedure RenderToCanvas(RenderCanvas: TCanvas; RenderIn: TRect;
|
||||
Angle: TVpRotationAngle; Scale: Extended; RenderDate: TDateTime;
|
||||
StartLine, StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean); override;
|
||||
property ActiveTask: TVpTask read FActiveTask;
|
||||
property TaskIndex: Integer read GetTaskIndex write SetTaskIndex;
|
||||
published
|
||||
@ -282,7 +275,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
SysUtils, Math, Forms, Dialogs, VpTaskEditDlg, VpDlg, VpTasklistPainter;
|
||||
SysUtils, Forms, Dialogs, VpTaskEditDlg, VpDlg, VpTasklistPainter;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
@ -570,13 +563,10 @@ end;
|
||||
|
||||
procedure TVpTaskList.DeleteActiveTask(Verify: Boolean);
|
||||
var
|
||||
Str: string;
|
||||
DoIt: Boolean;
|
||||
begin
|
||||
DoIt := not Verify;
|
||||
if FActiveTask <> nil then begin
|
||||
Str := FActiveTask.Description;
|
||||
|
||||
if Verify then
|
||||
DoIt := (MessageDlg(RSConfirmDeleteTask + #13#10#10 + RSPermanent,
|
||||
mtConfirmation, [mbYes, mbNo], 0) = mrYes);
|
||||
@ -603,9 +593,10 @@ end;
|
||||
procedure TVpTaskList.LinkHandler(Sender: TComponent;
|
||||
NotificationType: TVpNotificationType; const Value: Variant);
|
||||
begin
|
||||
Unused(Value);
|
||||
case NotificationType of
|
||||
neDataStoreChange: Invalidate;
|
||||
neInvalidate: Invalidate;
|
||||
neDataStoreChange : Invalidate;
|
||||
neInvalidate : Invalidate;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
@ -36,12 +36,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType, LCLIntf, LResources,
|
||||
LCLProc, LCLType, LCLIntf, LResources,
|
||||
{$ELSE}
|
||||
Windows, Messages,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
FileCtrl, StdCtrls, ExtCtrls, Buttons, VpBase, ComCtrls, ShellCtrls;
|
||||
StdCtrls, ExtCtrls, Buttons, VpBase, ComCtrls, ShellCtrls;
|
||||
|
||||
type
|
||||
|
||||
|
@ -46,7 +46,7 @@ uses
|
||||
{$ELSE}
|
||||
DsgnIntf,
|
||||
{$ENDIF}
|
||||
VpBase, VpWavDlg, Forms;
|
||||
VpWavDlg, Forms;
|
||||
|
||||
type
|
||||
{TWavFileProperty}
|
||||
|
@ -110,11 +110,11 @@ implementation
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages,LCLProc,LCLType,
|
||||
LCLProc, LCLType,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
SysUtils;
|
||||
SysUtils, VpMisc;
|
||||
|
||||
|
||||
{== Utility methods ==================================================}
|
||||
@ -675,6 +675,7 @@ end;
|
||||
{==TVpMemoryStream===================================================}
|
||||
procedure TVpMemoryStream.SetPointer(Ptr : Pointer; Size : Integer);
|
||||
begin
|
||||
Unused(Ptr, Size);
|
||||
Assert(not Assigned(Memory));
|
||||
// inherited SetPointer(Ptr);
|
||||
end;
|
||||
|
@ -92,35 +92,29 @@ type
|
||||
protected
|
||||
procedure csAdvanceLine;
|
||||
procedure csAdvanceLinePos;
|
||||
procedure csGetCharPrim(var aCh : TVpUcs4Char;
|
||||
var aIsLiteral : Boolean);
|
||||
function csGetNextBuffer : Boolean;
|
||||
function csGetTwoAnsiChars(var Buffer) : Boolean;
|
||||
function csGetUtf8Char : TVpUcs4Char;
|
||||
procedure csGetCharPrim(var aCh: TVpUcs4Char; var aIsLiteral: Boolean);
|
||||
function csGetNextBuffer: Boolean;
|
||||
function csGetTwoAnsiChars(var Buffer): Boolean;
|
||||
function csGetUtf8Char: TVpUcs4Char;
|
||||
procedure csIdentifyFormat;
|
||||
procedure csPushCharPrim(aCh : TVpUcs4Char);
|
||||
procedure csSetFormat(const aValue : TVpStreamFormat); override;
|
||||
|
||||
procedure csGetChar(var aCh : TVpUcs4Char;
|
||||
var aIsLiteral : Boolean);
|
||||
procedure csPushCharPrim(aCh: TVpUcs4Char);
|
||||
procedure csSetFormat(const aValue: TVpStreamFormat); override;
|
||||
procedure csGetChar(var aCh: TVpUcs4Char; var aIsLiteral: Boolean);
|
||||
|
||||
public
|
||||
constructor Create(aStream : TStream; const aBufSize : Longint); override;
|
||||
constructor Create(aStream: TStream; const aBufSize: Longint); override;
|
||||
|
||||
property Format: TVpStreamFormat read FFormat write csSetFormat;
|
||||
property EOF: Boolean read FEOF;
|
||||
|
||||
property Format : TVpStreamFormat
|
||||
read FFormat
|
||||
write csSetFormat;
|
||||
property EOF : Boolean
|
||||
read FEOF;
|
||||
public
|
||||
procedure SkipChar;
|
||||
function TryRead(const S : array of Longint) : Boolean;
|
||||
function ReadChar : DOMChar;
|
||||
function ReadAndSkipChar : DOMChar;
|
||||
property Line : LongInt
|
||||
read FLine;
|
||||
property LinePos : LongInt
|
||||
read FLinePos;
|
||||
function TryRead(const S: array of Longint) : Boolean;
|
||||
function ReadChar: DOMChar;
|
||||
function ReadAndSkipChar: DOMChar;
|
||||
|
||||
property Line : LongInt read FLine;
|
||||
property LinePos : LongInt read FLinePos;
|
||||
end;
|
||||
|
||||
TVpOutCharFilter = class(TVpBaseCharFilter)
|
||||
@ -275,10 +269,7 @@ begin
|
||||
|
||||
{check to see that the character is valid according to XML}
|
||||
if (aCh <> TVpUCS4Char(VpEndOfStream)) and (not VpIsChar(aCh)) then
|
||||
raise EVpFilterError.CreateError (FStream.Position,
|
||||
Line,
|
||||
LinePos,
|
||||
sInvalidXMLChar);
|
||||
raise EVpFilterError.CreateError(FStream.Position, Line, LinePos, sInvalidXMLChar);
|
||||
end;
|
||||
{--------}
|
||||
function TVpInCharFilter.csGetNextBuffer : Boolean;
|
||||
@ -546,7 +537,7 @@ var
|
||||
i : integer;
|
||||
begin
|
||||
if not VpUcs4ToUtf8(aCh, UTF8) then
|
||||
raise EVpStreamError.CreateError (FStream.Position, sUCS_U8ConverErr);
|
||||
raise EVpStreamError.CreateError(FStream.Position, sUCS_U8ConverErr);
|
||||
for i := 1 to length(UTF8) do begin
|
||||
if (FBufPos = FBufSize) then
|
||||
csWriteBuffer;
|
||||
|
@ -34,19 +34,12 @@ interface
|
||||
|
||||
uses
|
||||
{$IFDEF LCL}
|
||||
LMessages, LCLProc, LCLType,
|
||||
LCLProc, LCLType,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
Graphics,
|
||||
Controls,
|
||||
SysUtils,
|
||||
Classes,
|
||||
VpConst,
|
||||
VpSR,
|
||||
VpBase,
|
||||
VpXBase,
|
||||
VpXChrFlt;
|
||||
Graphics, Controls, SysUtils, Classes,
|
||||
VpConst, VpSR, VpBase, VpXBase, VpXChrFlt;
|
||||
|
||||
type
|
||||
StringIds = array[0..1] of DOMString;
|
||||
@ -342,6 +335,10 @@ implementation
|
||||
|
||||
{.$R *.RES}
|
||||
|
||||
uses
|
||||
VpMisc;
|
||||
|
||||
|
||||
{== TVpEntityInfo ====================================================}
|
||||
type
|
||||
TVpEntityInfo = class(TObject)
|
||||
@ -684,6 +681,8 @@ function TVpParser.DeclaredAttributes(const sName : DOMString;
|
||||
aIdx : Integer)
|
||||
: TStringList;
|
||||
begin
|
||||
Unused(sName);
|
||||
|
||||
if aIdx < 0 then
|
||||
Result := nil
|
||||
else
|
||||
@ -722,6 +721,8 @@ var
|
||||
oAttr : TVpAttributeInfo;
|
||||
HasEntRef : Boolean;
|
||||
begin
|
||||
Unused(sElemName);
|
||||
|
||||
SetLength(Result, 0);
|
||||
HasEntRef := False;
|
||||
if aIdx >= 0 then begin
|
||||
@ -749,6 +750,7 @@ function TVpParser.GetElementContentType(const sName : DOMString;
|
||||
aIdx : Integer)
|
||||
: Integer;
|
||||
begin
|
||||
Unused(sName);
|
||||
if aIdx < 0 then
|
||||
Result := CONTENT_UNDECLARED
|
||||
else
|
||||
@ -1881,9 +1883,8 @@ begin
|
||||
on E:EStringListError do begin
|
||||
EntRefs.Free;
|
||||
raise EVpParserError.CreateError (FFilter.Line,
|
||||
FFilter.LinePos,
|
||||
sCircularEntRef +
|
||||
TempChar);
|
||||
FFilter.LinePos,
|
||||
sCircularEntRef + TempChar);
|
||||
end;
|
||||
on E:EVpParserError do
|
||||
raise;
|
||||
@ -2252,10 +2253,7 @@ begin
|
||||
for i := 1 to Length(aString) do begin
|
||||
VpIso88591ToUcs4(AnsiChar(aString[i]), Ucs4Char);
|
||||
if (not VpIsPubidChar(Ucs4Char)) then
|
||||
raise EVpParserError.CreateError (FFilter.Line,
|
||||
FFilter.LinePos,
|
||||
sInvPubIDChar +
|
||||
QuotedStr(aString[i]));
|
||||
raise EVpParserError.CreateError(FFilter.Line, FFilter.LinePos, sInvPubIDChar + QuotedStr(aString[i]));
|
||||
end;
|
||||
end;
|
||||
{--------}
|
||||
|
Reference in New Issue
Block a user