You've already forked lazarus-ccr
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:
@ -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 }
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user