From 37bb56a6cd175a02f1b80ab5e95fbd4e2f848853 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 12 Jan 2018 12:42:12 +0000 Subject: [PATCH] tvplanit: Inc version number to 1.0.9. Less hints and warnings. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6130 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/laz_visualplanit.lpk | 2 +- components/tvplanit/laz_visualplanit_design.lpk | 2 +- components/tvplanit/laz_visualplanit_zeos.lpk | 2 +- .../tvplanit/laz_visualplanit_zeos_design.lpk | 2 +- .../tvplanit/source/addons/zeos/vpzeosds.pas | 2 +- components/tvplanit/source/vpalarmdlg.pas | 1 - components/tvplanit/source/vpbase.pas | 2 +- components/tvplanit/source/vpcontactgrid.pas | 11 ++++++----- components/tvplanit/source/vpdayview.pas | 15 ++++++++------- components/tvplanit/source/vpedfmtlst.pas | 1 - components/tvplanit/source/vpjsonds.pas | 5 ++--- components/tvplanit/source/vpmisc.pas | 3 --- components/tvplanit/source/vpmonthview.pas | 17 ++++++----------- components/tvplanit/source/vptasklist.pas | 11 ++++++----- .../tvplanit/source/vptasklistpainter.pas | 2 +- components/tvplanit/source/vpweekview.pas | 12 ++++++------ 16 files changed, 41 insertions(+), 49 deletions(-) diff --git a/components/tvplanit/laz_visualplanit.lpk b/components/tvplanit/laz_visualplanit.lpk index 3d9f4b33b..c445ee14d 100644 --- a/components/tvplanit/laz_visualplanit.lpk +++ b/components/tvplanit/laz_visualplanit.lpk @@ -31,7 +31,7 @@ The Initial Developer of the Original Code is TurboPower Software. Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved. Contributor(s): "/> - + diff --git a/components/tvplanit/laz_visualplanit_design.lpk b/components/tvplanit/laz_visualplanit_design.lpk index 9e015f63b..c3647692a 100644 --- a/components/tvplanit/laz_visualplanit_design.lpk +++ b/components/tvplanit/laz_visualplanit_design.lpk @@ -27,7 +27,7 @@ The Initial Developer of the Original Code is TurboPower Software. Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower Software Inc. All Rights Reserved. Contributor(s): "/> - + diff --git a/components/tvplanit/laz_visualplanit_zeos.lpk b/components/tvplanit/laz_visualplanit_zeos.lpk index 5b2ea4be9..c90f1f84a 100644 --- a/components/tvplanit/laz_visualplanit_zeos.lpk +++ b/components/tvplanit/laz_visualplanit_zeos.lpk @@ -18,7 +18,7 @@ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. "/> - + diff --git a/components/tvplanit/laz_visualplanit_zeos_design.lpk b/components/tvplanit/laz_visualplanit_zeos_design.lpk index 608771bbd..699a47140 100644 --- a/components/tvplanit/laz_visualplanit_zeos_design.lpk +++ b/components/tvplanit/laz_visualplanit_zeos_design.lpk @@ -14,7 +14,7 @@ - + diff --git a/components/tvplanit/source/addons/zeos/vpzeosds.pas b/components/tvplanit/source/addons/zeos/vpzeosds.pas index 4f0efa38a..7444c4beb 100644 --- a/components/tvplanit/source/addons/zeos/vpzeosds.pas +++ b/components/tvplanit/source/addons/zeos/vpzeosds.pas @@ -40,7 +40,7 @@ type public constructor Create(AOwner: TComponent); override; procedure CreateTables; - function GetNextID(TableName: string): integer; override; + function GetNextID({%H-}TableName: string): integer; override; property ResourceTable; property EventsTable; diff --git a/components/tvplanit/source/vpalarmdlg.pas b/components/tvplanit/source/vpalarmdlg.pas index 3c63c7ef7..dae4b7092 100644 --- a/components/tvplanit/source/vpalarmdlg.pas +++ b/components/tvplanit/source/vpalarmdlg.pas @@ -307,7 +307,6 @@ end; procedure TAlarmNotifyForm.PositionControls; var w, h: Integer; - b: TButton; i: Integer; cnv: TControlCanvas; begin diff --git a/components/tvplanit/source/vpbase.pas b/components/tvplanit/source/vpbase.pas index 5fc36af15..49e668f99 100644 --- a/components/tvplanit/source/vpbase.pas +++ b/components/tvplanit/source/vpbase.pas @@ -370,7 +370,7 @@ type TVpHintWindow = class(THintWindow) public - function CalcHintRect(MaxWidth: Integer; const AHint: String; + function CalcHintRect({%H-}MaxWidth: Integer; const AHint: String; AData: pointer): TRect; override; end; diff --git a/components/tvplanit/source/vpcontactgrid.pas b/components/tvplanit/source/vpcontactgrid.pas index c19dc7a27..6895d2c6d 100644 --- a/components/tvplanit/source/vpcontactgrid.pas +++ b/components/tvplanit/source/vpcontactgrid.pas @@ -195,11 +195,6 @@ type procedure EditContact; procedure EndEdit(Sender: TObject); procedure InitializeDefaultPopup; - {$IF VP_LCL_SCALING = 2} - procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; - {$ELSEIF VP_LCL_SCALING = 1} - procedure ScaleFontsPPI(const AProportion: Double); override; - {$ENDIF} { message handlers } {$IFNDEF LCL} @@ -245,6 +240,12 @@ type { - Added to support the buttonbar component. } function SelectContactByName(const Name: String): Boolean; + {$IF VP_LCL_SCALING = 2} + procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; + {$ELSEIF VP_LCL_SCALING = 1} + procedure ScaleFontsPPI(const AProportion: Double); override; + {$ENDIF} + property ActiveContact: TVpContact read FActiveContact; property ContactIndex: Integer read FContactIndex write SetContactIndex; diff --git a/components/tvplanit/source/vpdayview.pas b/components/tvplanit/source/vpdayview.pas index 736a9506c..7ded094be 100644 --- a/components/tvplanit/source/vpdayview.pas +++ b/components/tvplanit/source/vpdayview.pas @@ -389,13 +389,6 @@ type procedure EndEdit(Sender: TObject); procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure SetTimeIntervals(UseGran: TVpGranularity); - {$IF VP_LCL_SCALING = 2} - procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; - {$ELSE} - {$IF VP_LCL_SCALING = 1} - procedure ScaleFontsPPI(const AProportion: Double); override; - {$ENDIF} - {$ENDIF} { message handlers } procedure VpDayViewInit(var Msg: {$IFDEF DELPHI}TMessage{$ELSE}TLMessage{$ENDIF}); message Vp_DayViewInit; @@ -441,6 +434,14 @@ type Angle: TVpRotationAngle; Scale: Extended; RenderDate: TDateTime; StartLine, StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean); override; + {$IF VP_LCL_SCALING = 2} + procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; + {$ELSE} + {$IF VP_LCL_SCALING = 1} + procedure ScaleFontsPPI(const AProportion: Double); override; + {$ENDIF} + {$ENDIF} + property ActiveEvent: TVpEvent read FActiveEvent write FActiveEvent; property TopHour: TVpHours read FTopHour write SetTopHour; property TopLine: Integer read FTopLine write SetTopLine; diff --git a/components/tvplanit/source/vpedfmtlst.pas b/components/tvplanit/source/vpedfmtlst.pas index 186cbde26..3fa89d628 100644 --- a/components/tvplanit/source/vpedfmtlst.pas +++ b/components/tvplanit/source/vpedfmtlst.pas @@ -342,7 +342,6 @@ end; function TfrmPrnFormat.DirtyPrompt: Integer; var msg: String; - fn: String; begin if FormatFileName = '' then msg := RSSaveFormatChangesToFile diff --git a/components/tvplanit/source/vpjsonds.pas b/components/tvplanit/source/vpjsonds.pas index e57fa80b7..6d98c3836 100644 --- a/components/tvplanit/source/vpjsonds.pas +++ b/components/tvplanit/source/vpjsonds.pas @@ -7,7 +7,7 @@ unit VpJSONDs; interface uses - SysUtils, Classes, db, fpjson, + SysUtils, Classes, fpjson, VpData, VpBaseDS; type @@ -67,7 +67,7 @@ implementation uses LazFileUtils, jsonparser, - VpConst, VpSR, VpMisc; + VpSR, VpMisc; constructor TVpJSONDatastore.Create(AOwner: TComponent); begin @@ -646,7 +646,6 @@ var cont: TVpContact; task: TvpTask; i, j: Integer; - s: String; stream: TStream; begin if FFilename = '' then diff --git a/components/tvplanit/source/vpmisc.pas b/components/tvplanit/source/vpmisc.pas index b981409ef..172109acc 100644 --- a/components/tvplanit/source/vpmisc.pas +++ b/components/tvplanit/source/vpmisc.pas @@ -964,7 +964,6 @@ procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; AResName: String); var stream: TResourceStream; pic: TPicture; - bmp: TBitmap; begin stream := TResourceStream.Create(HINSTANCE, AResName, RT_RCDATA); try @@ -983,8 +982,6 @@ end; procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; ABaseResName: String; ALowRes, AMedRes, AHighRes: Integer); var - stream: TResourceStream; - pic: TPicture; ppiFactor: Integer; resName: String; begin diff --git a/components/tvplanit/source/vpmonthview.pas b/components/tvplanit/source/vpmonthview.pas index 68a906604..0279454d5 100644 --- a/components/tvplanit/source/vpmonthview.pas +++ b/components/tvplanit/source/vpmonthview.pas @@ -233,11 +233,6 @@ type procedure MouseMove(Shift: TShiftState; X,Y: Integer); override; procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure Paint; override; - {$IF VP_LCL_SCALING = 2} - procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; - {$ELSEIF VP_LCL_SCALING = 1} - procedure ScaleFontsPPI(const AProportion: Double); override; - {$ENDIF} { drag and drop } procedure DoEndDrag(Target: TObject; X, Y: Integer); override; @@ -294,6 +289,12 @@ type StartLine, StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean); override; + {$IF VP_LCL_SCALING = 2} + procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; + {$ELSEIF VP_LCL_SCALING = 1} + procedure ScaleFontsPPI(const AProportion: Double); override; + {$ENDIF} + property Date: TDateTime read FDate write SetDate; published @@ -1117,14 +1118,11 @@ end; {=====} procedure TVpMonthView.ShowHintWindow(APoint: TPoint; ADate: TDateTime); -const - MaxWidth = 400; var txt, s: String; i: Integer; event: TVpEvent; list: TList; - R: TRect; holiday: String = ''; todayDate: TDate; begin @@ -1413,9 +1411,6 @@ end; procedure TVpMonthView.MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); -var - oldDate: TDate; - i: Integer; begin inherited; diff --git a/components/tvplanit/source/vptasklist.pas b/components/tvplanit/source/vptasklist.pas index 54e6e2f76..bb678e6f6 100644 --- a/components/tvplanit/source/vptasklist.pas +++ b/components/tvplanit/source/vptasklist.pas @@ -189,11 +189,6 @@ type procedure EditTask; procedure EndEdit(Sender: TObject); procedure KeyDown(var Key: Word; Shift: TShiftState); override; - {$IF VP_LCL_SCALING = 2} - procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; - {$ELSEIF VP_LCL_SCALING = 1} - procedure ScaleFontsPPI(const AProportion: Double); override; - {$ENDIF} { message handlers } {$IFNDEF LCL} @@ -224,6 +219,12 @@ type Angle: TVpRotationAngle; Scale: Extended; RenderDate: TDateTime; StartLine, StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean); override; + {$IF VP_LCL_SCALING = 2} + procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; + {$ELSEIF VP_LCL_SCALING = 1} + procedure ScaleFontsPPI(const AProportion: Double); override; + {$ENDIF} + property ActiveTask: TVpTask read FActiveTask; property TaskIndex: Integer read GetTaskIndex write SetTaskIndex; diff --git a/components/tvplanit/source/vptasklistpainter.pas b/components/tvplanit/source/vptasklistpainter.pas index e83496a9a..3ab596ce2 100644 --- a/components/tvplanit/source/vptasklistpainter.pas +++ b/components/tvplanit/source/vptasklistpainter.pas @@ -90,7 +90,7 @@ var dx, dy: Integer; tm: Integer; // Scaled text margin; d2: Integer; // 2*Scale - d1px, d2px, d3px: Integer; + {%H-}d1px, {%H-}d2px, d3px: Integer; begin if Scale > 1 then tm := Round(TextMargin * Scale) else diff --git a/components/tvplanit/source/vpweekview.pas b/components/tvplanit/source/vpweekview.pas index 1b6f455cb..85d9bb48d 100644 --- a/components/tvplanit/source/vpweekview.pas +++ b/components/tvplanit/source/vpweekview.pas @@ -223,11 +223,6 @@ type procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override; procedure Paint; override; - {$IF VP_LCL_SCALING = 2} - procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; - {$ELSEIF VP_LCL_SCALING = 1} - procedure ScaleFontsPPI(const AProportion: Double); override; - {$ENDIF} { drag and drop } procedure DoEndDrag(Target: TObject; X, Y: Integer); override; @@ -273,6 +268,12 @@ type StartLine: Integer; StopLine: Integer; UseGran: TVpGranularity; DisplayOnly: Boolean); override; + {$IF VP_LCL_SCALING = 2} + procedure ScaleFontsPPI(const AToPPI: Integer; const AProportion: Double); override; + {$ELSEIF VP_LCL_SCALING = 1} + procedure ScaleFontsPPI(const AProportion: Double); override; + {$ENDIF} + property ActiveEvent: TVpEvent read FActiveEvent write SetActiveEvent; property Date: TDateTime read FActiveDate write SetActiveDate; property VisibleLines: Integer read FVisibleLines; @@ -1048,7 +1049,6 @@ end; procedure TVpWeekView.ShowHintWindow(APoint: TPoint; AEvent: TVpEvent); var txt: String; - R, eventR: TRect; begin HideHintWindow; case FHintMode of