TvPlanIt: Fix compilation after Laz/main commit 74446557f6825c4ddadd9f6321a80147798dbf99. Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8836 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-06-15 10:20:49 +00:00
parent 875a3a826d
commit b84bdf27e1
10 changed files with 45 additions and 58 deletions

View File

@ -721,41 +721,41 @@ object MainForm: TMainForm
DrawingStyle = dsCoolTab
FolderCollection = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Planner'
Enabled = True
FolderType = ftDefault
ItemCollection = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Events'
IconIndex = 0
Name = 'NIEvents'
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Month view'
IconIndex = 5
Name = 'NIEventsByMonth'
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Week view'
IconIndex = 4
Name = 'NIEventsByWeek'
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Day view'
IconIndex = 3
Name = 'NIEventsByDay'
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Tasks'
Description = 'Show tasks'
IconIndex = 1
@ -763,7 +763,7 @@ object MainForm: TMainForm
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Contacts'
Description = 'Show address book'
IconIndex = 2
@ -775,20 +775,20 @@ object MainForm: TMainForm
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Maintenance'
Enabled = True
FolderType = ftDefault
ItemCollection = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Resources'
IconIndex = 7
Name = 'NIResources'
Tag = 0
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption = 'Settings'
IconIndex = 8
Name = 'NISettings'
@ -825,12 +825,12 @@ object MainForm: TMainForm
Printer.MarginUnits = imPercent
Printer.PrintFormats = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayInc = 0
DayIncUnits = duDay
Elements = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
Caption.Caption = 'Current week'
Caption.Font.Style = [fsItalic]
DayOffset = 0
@ -845,12 +845,12 @@ object MainForm: TMainForm
FormatName = 'Events of current week (Day view)'
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayInc = 0
DayIncUnits = duWeek
Elements = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayOffset = 0
DayOffsetUnits = duDay
ElementName = 'WeekView'
@ -864,12 +864,12 @@ object MainForm: TMainForm
FormatName = 'Events of current week (Week view)'
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayInc = 0
DayIncUnits = duDay
Elements = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayOffset = 0
DayOffsetUnits = duWeek
ElementName = 'TaskList'
@ -883,12 +883,12 @@ object MainForm: TMainForm
FormatName = 'Tasks of current week'
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayInc = 0
DayIncUnits = duDay
Elements = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayOffset = 0
DayOffsetUnits = duDay
ElementName = 'TaskList'
@ -903,12 +903,12 @@ object MainForm: TMainForm
FormatName = 'Tasks of current week (landscape)'
end
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayInc = 1
DayIncUnits = duWeek
Elements = <
item
Version = 'v1.7.0'
Version = 'v1.8.0'
DayOffset = 0
DayOffsetUnits = duDay
ElementName = 'WeekView'
@ -928,7 +928,7 @@ object MainForm: TMainForm
Top = 200
end
object VpResourceEditDialog1: TVpResourceEditDialog
Version = 'v1.7.0'
Version = 'v1.8.0'
Options = []
Placement.Position = mpCenter
Placement.Top = 10
@ -1350,7 +1350,7 @@ object MainForm: TMainForm
Top = 344
end
object VpPrintPreviewDialog1: TVpPrintPreviewDialog
Version = 'v1.7.0'
Version = 'v1.8.0'
ControlLink = VpControlLink1
EndDate = 42561.5151169907
MarginUnits = imPercent
@ -1365,7 +1365,7 @@ object MainForm: TMainForm
Top = 432
end
object VpPrintFormatEditDialog1: TVpPrintFormatEditDialog
Version = 'v1.7.0'
Version = 'v1.8.0'
ControlLink = VpControlLink1
Options = []
Placement.Position = mpCenter

View File

@ -881,8 +881,7 @@ begin
end;
CbLanguages.Items.Assign(po);
// SetLanguage(lang);
SetLanguage(GetDefaultLang);
SetLanguage(lang);
finally
po.Free;

View File

@ -3,7 +3,7 @@ unit VpBasePainter;
interface
uses
Classes, Types, Graphics, LCLType,
LCLIntf, Classes, Types, Graphics, LCLType,
VPBase;
type
@ -49,7 +49,6 @@ type
implementation
uses
LCLIntf,
VpCanvasUtils;
{ TBasePainter }

View File

@ -5,7 +5,7 @@ unit VpCalendarPainter;
interface
uses
SysUtils, Classes, Types, Graphics, Controls,
LCLIntf, SysUtils, Classes, Types, Graphics, Controls,
VpBase, VpMisc, VpBasePainter, VpCalendar;
type
@ -55,7 +55,7 @@ type
implementation
uses
LCLProc, LCLIntf, LazUtf8,
LazUtf8,
{%H-}VpConst, VpCanvasUtils;
type

View File

@ -886,7 +886,7 @@ var
begin
inherited;
FScaledTextMargin := round(FContactGrid.TextMargin * Scale);
FAnchorMargin := round(Scale * MARGIN) + FScaledTextMargin * 2;
FAnchorMargin := round(Scale * MARGIN) {%H-}+ FScaledTextMargin * 2;
numCols := FContactGrid.PrintNumColumns;
if DisplayOnly and (numCols > 0) then

View File

@ -7,6 +7,7 @@ object VpImportPreviewForm: TVpImportPreviewForm
ClientHeight = 295
ClientWidth = 634
OnShow = FormShow
LCLVersion = '2.3.0.0'
object ButtonPanel: TPanel
Left = 6
Height = 25

View File

@ -5,7 +5,7 @@ unit VpImportPreview;
interface
uses
Classes, SysUtils, Graphics, Types,
LCLIntf, LCLType, LCLVersion, Classes, SysUtils, Graphics, Types,
Forms, Controls, Dialogs, Grids, ExtCtrls, StdCtrls, VpBaseDS;
type
@ -67,7 +67,7 @@ implementation
{$R *.lfm}
uses
LCLIntf, LCLType, Themes,
Themes,
VpSR;
{ TVpImportGrid }
@ -97,7 +97,11 @@ begin
begin
R := CellRect(cell.X, cell.Y);
details := ThemeServices.GetElementDetails(tbCheckBoxCheckedNormal);
{$IF LCL_FullVersion >= 2030000}
lSize := ThemeServices.GetDetailSizeForPPI(Details, Font.PixelsPerInch);
{$ELSE}
lSize := ThemeServices.GetDetailSize(Details);
{$ENDIF}
lSize.cx := MulDiv(lSize.cx, Font.PixelsPerInch, Screen.PixelsPerInch);
lSize.cy := MulDiv(lSize.cy, Font.PixelsPerInch, Screen.PixelsPerInch);
OffsetRect(R, (R.Left+R.Right-lSize.CX) div 2, (R.Top+R.Bottom-lSize.CY) div 2);

View File

@ -39,7 +39,7 @@ uses
{$ELSE}
Windows, Consts, Messages,
{$ENDIF}
SysUtils, Graphics, Types, Classes, Controls, StdCtrls, ExtCtrls, Buttons, Forms, Menus,
SysUtils, Graphics, Classes, Controls, StdCtrls, ExtCtrls, Buttons, Forms, Menus,
VpBase, VpData, VpConst;
type
@ -1064,7 +1064,7 @@ begin
end;
{ Returns the coordinate of the control's bottom boundary }
function Bottomof(AControl: TControl): Integer;
function BottomOf(AControl: TControl): Integer;
begin
Result := AControl.Top + AControl.Height;
end;
@ -1072,8 +1072,12 @@ end;
{ Moves a rectangle ARect by ADelta.x in x, and by ADelta.y in y direction }
function MoveRect(const ARect: TRect; const ADelta: TPoint): TRect;
begin
Result := ARect;
OffsetRect(Result, ADelta.x, ADelta.y);
Result := Rect(
ARect.Left + ADelta.X,
ARect.Top + ADelta.Y,
ARect.Right + ADelta.X,
ARect.Bottom + ADelta.Y
);
end;
{ Replaces embedded C-style line endings (\n) by FPC line endings (#13#10, #13,

View File

@ -34,9 +34,6 @@ interface
uses
Classes,
{$IFDEF LCL}
LazUTF8Classes,
{$ENDIF}
VpBase;
@ -58,16 +55,6 @@ type
procedure SetPointer(Ptr: Pointer; Size: Longint);
end;
{$IFDEF LCL}
TVpFileStream = class(TFileStreamUTF8)
{$ELSE}
TVpFileStream = class(TFileStream)
{$ENDIF}
FFileName: string;
public
constructor CreateEx(Mode: Word; const FileName: string);
property Filename: string read FFileName;
end;
{ Utility methods }
function VpPos(const aSubStr, aString: DOMString): Integer;
@ -671,11 +658,4 @@ begin
// inherited SetPointer(Ptr);
end;
{===TVpFileStream====================================================}
constructor TVpFileStream.CreateEx(Mode : Word; const FileName : string);
begin
inherited Create(FileName, Mode);
FFileName := FileName;
end;
end.

View File

@ -892,7 +892,7 @@ end;
function TVpParser.LoadDataSource(sSrcName: string; oErrors: TStringList): Boolean;
var
aFileStream: TVpFileStream;
aFileStream: TFileStream;
begin
begin
{ Must be a local or network file. Eliminate file:// prefix. }
@ -902,7 +902,7 @@ begin
if FileExists(sSrcName) then begin
FCurrentPath := ExtractFilePath(sSrcName);
{the stream and filter are destroyed after the document is parsed}
aFileStream := TVpFileStream.CreateEx(fmOpenRead, sSrcName);
aFileStream := TFileStream.Create(sSrcName, fmOpenRead);
aFileStream.Position := 0;
Result := True;
end else begin