You've already forked lazarus-ccr
tvplanit: Cosmetic changes in VpPrtFmt
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8520 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -487,7 +487,6 @@ begin
|
|||||||
FName := '';
|
FName := '';
|
||||||
FValue := '';
|
FValue := '';
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpAttributeItem.Destroy;
|
destructor TVpAttributeItem.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -495,7 +494,6 @@ begin
|
|||||||
FCollection := nil;
|
FCollection := nil;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpAttributes *************************************************************
|
// TVpAttributes *************************************************************
|
||||||
@ -505,33 +503,28 @@ begin
|
|||||||
inherited Create(TVpAttributeItem);
|
inherited Create(TVpAttributeItem);
|
||||||
FOwner := AOwner;
|
FOwner := AOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
{$IFNDEF VERSION5}
|
{$IFNDEF VERSION5}
|
||||||
procedure TVpAttributes.Delete(Item: integer);
|
procedure TVpAttributes.Delete(Item: integer);
|
||||||
begin
|
begin
|
||||||
GetItem(Item).Free;
|
GetItem(Item).Free;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function TVpAttributes.GetItem(Index: Integer): TVpAttributeItem;
|
function TVpAttributes.GetItem(Index: Integer): TVpAttributeItem;
|
||||||
begin
|
begin
|
||||||
Result := TVpAttributeItem(inherited GetItem(Index));
|
Result := TVpAttributeItem(inherited GetItem(Index));
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpAttributes.GetOwner: TPersistent;
|
function TVpAttributes.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpAttributes.SetItem(Index: Integer; Value: TVpAttributeItem);
|
procedure TVpAttributes.SetItem(Index: Integer; Value: TVpAttributeItem);
|
||||||
begin
|
begin
|
||||||
inherited SetItem(Index, Value);
|
inherited SetItem(Index, Value);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintShape *************************************************************
|
// TVpPrintShape *************************************************************
|
||||||
@ -544,7 +537,6 @@ begin
|
|||||||
FBrush := TBrush.Create;
|
FBrush := TBrush.Create;
|
||||||
FShape := ustRectangle;
|
FShape := ustRectangle;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpPrintShape.Destroy;
|
destructor TVpPrintShape.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -554,13 +546,11 @@ begin
|
|||||||
FBrush := nil;
|
FBrush := nil;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintShape.GetOwner: TPersistent;
|
function TVpPrintShape.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintShape.PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
procedure TVpPrintShape.PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
||||||
Angle: TVpRotationAngle; Viewport: TRect);
|
Angle: TVpRotationAngle; Viewport: TRect);
|
||||||
@ -625,19 +615,16 @@ begin
|
|||||||
OldPen.Free;
|
OldPen.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintShape.SetBrush(const v: TBrush);
|
procedure TVpPrintShape.SetBrush(const v: TBrush);
|
||||||
begin
|
begin
|
||||||
FBrush.Assign(v);
|
FBrush.Assign(v);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintShape.SetPen(const v: TPen);
|
procedure TVpPrintShape.SetPen(const v: TPen);
|
||||||
begin
|
begin
|
||||||
FPen.Assign(v);
|
FPen.Assign(v);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintCaption ***********************************************************
|
// TVpPrintCaption ***********************************************************
|
||||||
@ -649,7 +636,6 @@ begin
|
|||||||
FFont := TFont.Create;
|
FFont := TFont.Create;
|
||||||
FCaption := '';
|
FCaption := '';
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpPrintCaption.Destroy;
|
destructor TVpPrintCaption.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -657,13 +643,11 @@ begin
|
|||||||
FFont := nil;
|
FFont := nil;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintCaption.GetOwner: TPersistent;
|
function TVpPrintCaption.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintCaption.PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
procedure TVpPrintCaption.PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
||||||
Angle: TVpRotationAngle; Viewport: TRect; RealString: string);
|
Angle: TVpRotationAngle; Viewport: TRect; RealString: string);
|
||||||
@ -678,13 +662,11 @@ begin
|
|||||||
ACanvas.Font := OldFont;
|
ACanvas.Font := OldFont;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintCaption.SetFont(const v: TFont);
|
procedure TVpPrintCaption.SetFont(const v: TFont);
|
||||||
begin
|
begin
|
||||||
FFont.Assign(v);
|
FFont.Assign(v);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintFormatElementItem *************************************************
|
// TVpPrintFormatElementItem *************************************************
|
||||||
@ -707,7 +689,6 @@ begin
|
|||||||
FDayOffsetUnits := duDay;
|
FDayOffsetUnits := duDay;
|
||||||
FVisible := True;
|
FVisible := True;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpPrintFormatElementItem.Destroy;
|
destructor TVpPrintFormatElementItem.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -719,7 +700,6 @@ begin
|
|||||||
FCaption := nil;
|
FCaption := nil;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintFormatElementItem.GetDisplayName: string;
|
function TVpPrintFormatElementItem.GetDisplayName: string;
|
||||||
begin
|
begin
|
||||||
@ -728,7 +708,6 @@ begin
|
|||||||
else
|
else
|
||||||
Result := inherited GetDisplayName;
|
Result := inherited GetDisplayName;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetCaption(const v: TVpPrintCaption);
|
procedure TVpPrintFormatElementItem.SetCaption(const v: TVpPrintCaption);
|
||||||
begin
|
begin
|
||||||
@ -742,7 +721,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FCaption.Assign(v);
|
FCaption.Assign(v);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetDayOffset(const v: Integer);
|
procedure TVpPrintFormatElementItem.SetDayOffset(const v: Integer);
|
||||||
begin
|
begin
|
||||||
@ -758,7 +736,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FDayOffset := v;
|
FDayOffset := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetDayOffsetUnits(const v: TVpDayUnits);
|
procedure TVpPrintFormatElementItem.SetDayOffsetUnits(const v: TVpDayUnits);
|
||||||
begin
|
begin
|
||||||
@ -774,7 +751,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FDayOffsetUnits := v;
|
FDayOffsetUnits := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetElementName(const v: string);
|
procedure TVpPrintFormatElementItem.SetElementName(const v: string);
|
||||||
begin
|
begin
|
||||||
@ -790,7 +766,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FElementName := v;
|
FElementName := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetHeight(const v: Extended);
|
procedure TVpPrintFormatElementItem.SetHeight(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -806,7 +781,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FHeight := v;
|
FHeight := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetItemType(const v: TVpItemType);
|
procedure TVpPrintFormatElementItem.SetItemType(const v: TVpItemType);
|
||||||
begin
|
begin
|
||||||
@ -822,7 +796,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FItemType := v;
|
FItemType := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetLeft(const v: Extended);
|
procedure TVpPrintFormatElementItem.SetLeft(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -838,7 +811,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FLeft := v;
|
FLeft := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetMeasurement(const v: TVpItemMeasurement);
|
procedure TVpPrintFormatElementItem.SetMeasurement(const v: TVpItemMeasurement);
|
||||||
begin
|
begin
|
||||||
@ -854,7 +826,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FMeasurement := v;
|
FMeasurement := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetRotation(const v: TVpRotationAngle);
|
procedure TVpPrintFormatElementItem.SetRotation(const v: TVpRotationAngle);
|
||||||
begin
|
begin
|
||||||
@ -870,7 +841,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FRotation := v;
|
FRotation := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetShape(const v: TVpPrintShape);
|
procedure TVpPrintFormatElementItem.SetShape(const v: TVpPrintShape);
|
||||||
begin
|
begin
|
||||||
@ -886,7 +856,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FShape.Assign(v);
|
FShape.Assign(v);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetTop(const v: Extended);
|
procedure TVpPrintFormatElementItem.SetTop(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -903,7 +872,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FTop := v;
|
FTop := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetVisible(const v: Boolean);
|
procedure TVpPrintFormatElementItem.SetVisible(const v: Boolean);
|
||||||
begin
|
begin
|
||||||
@ -919,7 +887,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FVisible := v;
|
FVisible := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElementItem.SetWidth(const v: Extended);
|
procedure TVpPrintFormatElementItem.SetWidth(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -935,7 +902,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FWidth := v;
|
FWidth := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintFormatElement *****************************************************
|
// TVpPrintFormatElement *****************************************************
|
||||||
@ -945,7 +911,6 @@ begin
|
|||||||
inherited Create(TVpPrintFormatElementItem);
|
inherited Create(TVpPrintFormatElementItem);
|
||||||
FOwner := AOwner;
|
FOwner := AOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintFormatElement.GetItem(Index: Integer): TVpPrintFormatElementItem;
|
function TVpPrintFormatElement.GetItem(Index: Integer): TVpPrintFormatElementItem;
|
||||||
begin
|
begin
|
||||||
@ -956,7 +921,6 @@ function TVpPrintFormatElement.GetOwner: TPersistent;
|
|||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElement.NotifyAll(Item: TCollectionItem);
|
procedure TVpPrintFormatElement.NotifyAll(Item: TCollectionItem);
|
||||||
var
|
var
|
||||||
@ -994,7 +958,6 @@ begin
|
|||||||
(Notifier as TVpControlLink).Printer.NotifyLinked;
|
(Notifier as TVpControlLink).Printer.NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
{$IFDEF VERSION6}
|
{$IFDEF VERSION6}
|
||||||
procedure TVpPrintFormatElement.Notify(Item: TCollectionItem; Action: TCollectionNotification);
|
procedure TVpPrintFormatElement.Notify(Item: TCollectionItem; Action: TCollectionNotification);
|
||||||
@ -1003,13 +966,11 @@ begin
|
|||||||
NotifyAll(Item);
|
NotifyAll(Item);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElement.SetItem(Index: Integer; Value: TVpPrintFormatElementItem);
|
procedure TVpPrintFormatElement.SetItem(Index: Integer; Value: TVpPrintFormatElementItem);
|
||||||
begin
|
begin
|
||||||
inherited SetItem(Index, Value);
|
inherited SetItem(Index, Value);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatElement.Update(Item: TCollectionItem);
|
procedure TVpPrintFormatElement.Update(Item: TCollectionItem);
|
||||||
var
|
var
|
||||||
@ -1041,7 +1002,6 @@ begin
|
|||||||
(Notifier as TVpControlLink).Printer.NotifyLinked;
|
(Notifier as TVpControlLink).Printer.NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintFormatItem *************************************************
|
// TVpPrintFormatItem *************************************************
|
||||||
@ -1060,7 +1020,6 @@ begin
|
|||||||
FDefaultDayInc := 1;
|
FDefaultDayInc := 1;
|
||||||
FVisible := True;
|
FVisible := True;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpPrintFormatItem.Destroy;
|
destructor TVpPrintFormatItem.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -1072,7 +1031,6 @@ begin
|
|||||||
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintFormatItem.GetDisplayName: string;
|
function TVpPrintFormatItem.GetDisplayName: string;
|
||||||
begin
|
begin
|
||||||
@ -1081,7 +1039,6 @@ begin
|
|||||||
else
|
else
|
||||||
Result := inherited GetDisplayName;
|
Result := inherited GetDisplayName;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetDayInc(const v: Integer);
|
procedure TVpPrintFormatItem.SetDayInc(const v: Integer);
|
||||||
begin
|
begin
|
||||||
@ -1096,7 +1053,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FDayInc := v;
|
FDayInc := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetDayIncUnits(const v: TVpDayUnits);
|
procedure TVpPrintFormatItem.SetDayIncUnits(const v: TVpDayUnits);
|
||||||
begin
|
begin
|
||||||
@ -1111,7 +1067,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FDayIncUnits := v;
|
FDayIncUnits := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetDescription(const v: string);
|
procedure TVpPrintFormatItem.SetDescription(const v: string);
|
||||||
begin
|
begin
|
||||||
@ -1124,7 +1079,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FDescription := v;
|
FDescription := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetElements(const v: TVpPrintFormatElement);
|
procedure TVpPrintFormatItem.SetElements(const v: TVpPrintFormatElement);
|
||||||
begin
|
begin
|
||||||
@ -1132,7 +1086,6 @@ begin
|
|||||||
if Assigned(Collection) then
|
if Assigned(Collection) then
|
||||||
Collection.NotifyAll(Self);
|
Collection.NotifyAll(Self);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetFormatName(const v: string);
|
procedure TVpPrintFormatItem.SetFormatName(const v: string);
|
||||||
begin
|
begin
|
||||||
@ -1147,7 +1100,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FFormatName := v;
|
FFormatName := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormatItem.SetVisible(const v: Boolean);
|
procedure TVpPrintFormatItem.SetVisible(const v: Boolean);
|
||||||
begin
|
begin
|
||||||
@ -1162,7 +1114,6 @@ begin
|
|||||||
end else
|
end else
|
||||||
FVisible := v;
|
FVisible := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrintFormat ************************************************************
|
// TVpPrintFormat ************************************************************
|
||||||
@ -1172,19 +1123,16 @@ begin
|
|||||||
inherited Create(TVpPrintFormatItem);
|
inherited Create(TVpPrintFormatItem);
|
||||||
FOwner := AOwner;
|
FOwner := AOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintFormat.GetItem(Index: Integer): TVpPrintFormatItem;
|
function TVpPrintFormat.GetItem(Index: Integer): TVpPrintFormatItem;
|
||||||
begin
|
begin
|
||||||
Result := TVpPrintFormatItem(inherited GetItem(Index));
|
Result := TVpPrintFormatItem(inherited GetItem(Index));
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrintFormat.GetOwner: TPersistent;
|
function TVpPrintFormat.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormat.NotifyAll(Item: TCollectionItem);
|
procedure TVpPrintFormat.NotifyAll(Item: TCollectionItem);
|
||||||
begin
|
begin
|
||||||
@ -1202,7 +1150,6 @@ begin
|
|||||||
(FOwner as TVpControlLink).Printer.NotifyLinked;
|
(FOwner as TVpControlLink).Printer.NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
{$IFDEF VERSION6}
|
{$IFDEF VERSION6}
|
||||||
procedure TVpPrintFormat.Notify(Item: TCollectionItem; Action: TCollectionNotification);
|
procedure TVpPrintFormat.Notify(Item: TCollectionItem; Action: TCollectionNotification);
|
||||||
@ -1211,13 +1158,11 @@ begin
|
|||||||
NotifyAll(Item);
|
NotifyAll(Item);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormat.SetItem(Index: Integer; Value: TVpPrintFormatItem);
|
procedure TVpPrintFormat.SetItem(Index: Integer; Value: TVpPrintFormatItem);
|
||||||
begin
|
begin
|
||||||
inherited SetItem(Index, Value);
|
inherited SetItem(Index, Value);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrintFormat.Update(Item: TCollectionItem);
|
procedure TVpPrintFormat.Update(Item: TCollectionItem);
|
||||||
begin
|
begin
|
||||||
@ -1234,7 +1179,6 @@ begin
|
|||||||
(FOwner as TVpControlLink).Printer.NotifyLinked;
|
(FOwner as TVpControlLink).Printer.NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
|
|
||||||
// TVpPrinter ****************************************************************
|
// TVpPrinter ****************************************************************
|
||||||
@ -1261,7 +1205,6 @@ begin
|
|||||||
|
|
||||||
CreateWorkControls;
|
CreateWorkControls;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
destructor TVpPrinter.Destroy;
|
destructor TVpPrinter.Destroy;
|
||||||
begin
|
begin
|
||||||
@ -1273,7 +1216,6 @@ begin
|
|||||||
DestroyWorkControls;
|
DestroyWorkControls;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.AddDefaultVariables(Date: TDateTime);
|
procedure TVpPrinter.AddDefaultVariables(Date: TDateTime);
|
||||||
|
|
||||||
@ -1326,7 +1268,6 @@ begin
|
|||||||
|
|
||||||
AddDataStoreVars;
|
AddDataStoreVars;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.AddVariable(VarName: string; Value: string);
|
procedure TVpPrinter.AddVariable(VarName: string; Value: string);
|
||||||
var
|
var
|
||||||
@ -1342,13 +1283,11 @@ begin
|
|||||||
NewVar.Name := VarName;
|
NewVar.Name := VarName;
|
||||||
NewVar.Value := Value;
|
NewVar.Value := Value;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.ChangeVariable(VarName, NewValue: string);
|
procedure TVpPrinter.ChangeVariable(VarName, NewValue: string);
|
||||||
begin
|
begin
|
||||||
AddVariable(VarName, NewValue);
|
AddVariable(VarName, NewValue);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.CheckPrintFormat;
|
procedure TVpPrinter.CheckPrintFormat;
|
||||||
begin
|
begin
|
||||||
@ -1358,13 +1297,11 @@ begin
|
|||||||
if (CurFormat < 0) or (CurFormat >= PrintFormats.Count) then
|
if (CurFormat < 0) or (CurFormat >= PrintFormats.Count) then
|
||||||
raise EVpPrintFormatError.Create(RSBadPrintFormat);
|
raise EVpPrintFormatError.Create(RSBadPrintFormat);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.ClearVariables;
|
procedure TVpPrinter.ClearVariables;
|
||||||
begin
|
begin
|
||||||
FVariables.Clear;
|
FVariables.Clear;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.CreateWorkControls;
|
procedure TVpPrinter.CreateWorkControls;
|
||||||
begin
|
begin
|
||||||
@ -1396,7 +1333,6 @@ begin
|
|||||||
TVpGanttView(FGanttView).Parent := FParent;
|
TVpGanttView(FGanttView).Parent := FParent;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.DestroyWorkControls;
|
procedure TVpPrinter.DestroyWorkControls;
|
||||||
begin
|
begin
|
||||||
@ -1420,7 +1356,6 @@ begin
|
|||||||
FParent.Free;
|
FParent.Free;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.DeleteVariable(VarName: string): Boolean;
|
function TVpPrinter.DeleteVariable(VarName: string): Boolean;
|
||||||
var
|
var
|
||||||
@ -1434,7 +1369,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.DeregisterAllWatchers;
|
procedure TVpPrinter.DeregisterAllWatchers;
|
||||||
var
|
var
|
||||||
@ -1446,7 +1380,6 @@ begin
|
|||||||
FNotifiers.Delete (i);
|
FNotifiers.Delete (i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.DeregisterWatcher(Watcher: THandle);
|
procedure TVpPrinter.DeregisterWatcher(Watcher: THandle);
|
||||||
var
|
var
|
||||||
@ -1460,7 +1393,6 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.HaveVariable(VarName: string): Boolean;
|
function TVpPrinter.HaveVariable(VarName: string): Boolean;
|
||||||
var
|
var
|
||||||
@ -1472,7 +1404,6 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.Find(const v: string): Integer;
|
function TVpPrinter.Find(const v: string): Integer;
|
||||||
var
|
var
|
||||||
@ -1485,13 +1416,11 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.GetOwner: TPersistent;
|
function TVpPrinter.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
Result := FOwner;
|
Result := FOwner;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.LoadFromFile(FileName: string; Append: Boolean);
|
procedure TVpPrinter.LoadFromFile(FileName: string; Append: Boolean);
|
||||||
var
|
var
|
||||||
@ -1518,7 +1447,6 @@ begin
|
|||||||
FElementIndex := -1;
|
FElementIndex := -1;
|
||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.LookupVariable(VarName: string): string;
|
function TVpPrinter.LookupVariable(VarName: string): string;
|
||||||
var
|
var
|
||||||
@ -1531,7 +1459,6 @@ begin
|
|||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.NotifyLinked;
|
procedure TVpPrinter.NotifyLinked;
|
||||||
var
|
var
|
||||||
@ -1541,7 +1468,6 @@ begin
|
|||||||
if Assigned(FNotifiers[i]) then
|
if Assigned(FNotifiers[i]) then
|
||||||
PostMessage(PVpWatcher(FNotifiers[i]).Handle, Vp_PrintFormatChanged, 0, 0);
|
PostMessage(PVpWatcher(FNotifiers[i]).Handle, Vp_PrintFormatChanged, 0, 0);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.PaintToCanvasRect(ACanvas: TCanvas; ARect: TRect;
|
procedure TVpPrinter.PaintToCanvasRect(ACanvas: TCanvas; ARect: TRect;
|
||||||
ADate: TDateTime);
|
ADate: TDateTime);
|
||||||
@ -1816,7 +1742,6 @@ begin
|
|||||||
DebugLn('[TVpPrinter.PaintToCanvas] EXIT');
|
DebugLn('[TVpPrinter.PaintToCanvas] EXIT');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.Print(APrinter: TPrinter; StartDate, EndDate: TDateTime);
|
procedure TVpPrinter.Print(APrinter: TPrinter; StartDate, EndDate: TDateTime);
|
||||||
var
|
var
|
||||||
@ -2010,7 +1935,6 @@ begin
|
|||||||
NewHandle.Handle := Watcher;
|
NewHandle.Handle := Watcher;
|
||||||
FNotifiers.Add(NewHandle);
|
FNotifiers.Add(NewHandle);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.RenderPage(ACanvas: TCanvas; ARect: TRect; PageNum: Integer;
|
procedure TVpPrinter.RenderPage(ACanvas: TCanvas; ARect: TRect; PageNum: Integer;
|
||||||
var ADate: TDateTime; EndDate: TDateTime; var StartContact: Integer;
|
var ADate: TDateTime; EndDate: TDateTime; var StartContact: Integer;
|
||||||
@ -2129,7 +2053,6 @@ begin
|
|||||||
FLastContact := OldContact;
|
FLastContact := OldContact;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.ReplaceVariables(const s: string): string;
|
function TVpPrinter.ReplaceVariables(const s: string): string;
|
||||||
type
|
type
|
||||||
@ -2237,7 +2160,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SaveToFile(FileName: string);
|
procedure TVpPrinter.SaveToFile(FileName: string);
|
||||||
var
|
var
|
||||||
@ -2423,7 +2345,6 @@ begin
|
|||||||
CloseFile(fpOut);
|
CloseFile(fpOut);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetBottomMargin(const v: Extended);
|
procedure TVpPrinter.SetBottomMargin(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -2432,7 +2353,6 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetCurFormat(const v: Integer);
|
procedure TVpPrinter.SetCurFormat(const v: Integer);
|
||||||
begin
|
begin
|
||||||
@ -2446,14 +2366,12 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetDefaultXMLFileName(const v: string);
|
procedure TVpPrinter.SetDefaultXMLFileName(const v: string);
|
||||||
begin
|
begin
|
||||||
if v <> FDefaultXMLFileName then
|
if v <> FDefaultXMLFileName then
|
||||||
FDefaultXMLFileName := v;
|
FDefaultXMLFileName := v;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetLeftMargin(const v: Extended);
|
procedure TVpPrinter.SetLeftMargin(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -2462,7 +2380,6 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetMarginUnits(const v: TVpItemMeasurement);
|
procedure TVpPrinter.SetMarginUnits(const v: TVpItemMeasurement);
|
||||||
begin
|
begin
|
||||||
@ -2471,14 +2388,12 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetPrintFormats(const v: TVpPrintFormat);
|
procedure TVpPrinter.SetPrintFormats(const v: TVpPrintFormat);
|
||||||
begin
|
begin
|
||||||
FPrintFormats.Assign(v);
|
FPrintFormats.Assign(v);
|
||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetRightMargin(const v: Extended);
|
procedure TVpPrinter.SetRightMargin(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -2487,7 +2402,6 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetTopMargin(const v: Extended);
|
procedure TVpPrinter.SetTopMargin(const v: Extended);
|
||||||
begin
|
begin
|
||||||
@ -2496,7 +2410,6 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.SetUseFormComponents(const v: Boolean);
|
procedure TVpPrinter.SetUseFormComponents(const v: Boolean);
|
||||||
begin
|
begin
|
||||||
@ -2510,7 +2423,6 @@ begin
|
|||||||
NotifyLinked;
|
NotifyLinked;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.UpdateDateVariables(Date: TDateTime);
|
procedure TVpPrinter.UpdateDateVariables(Date: TDateTime);
|
||||||
begin
|
begin
|
||||||
@ -2549,13 +2461,11 @@ begin
|
|||||||
AddVariable('yyyy', FormatDateTime('yyyy', Date));
|
AddVariable('yyyy', FormatDateTime('yyyy', Date));
|
||||||
AddVariable('/', FormatDateTime('/', Date));
|
AddVariable('/', FormatDateTime('/', Date));
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
function TVpPrinter.ValidFormat(const v: Integer): Boolean;
|
function TVpPrinter.ValidFormat(const v: Integer): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (v >= 0) and (v < FPrintFormats.Count);
|
Result := (v >= 0) and (v < FPrintFormats.Count);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.xmlPrintFormatAttribute(oOwner: TObject;
|
procedure TVpPrinter.xmlPrintFormatAttribute(oOwner: TObject;
|
||||||
sName, sValue: DOMString; bSpecified: Boolean);
|
sName, sValue: DOMString; bSpecified: Boolean);
|
||||||
@ -2568,7 +2478,6 @@ begin
|
|||||||
Item.Name := UTF8Encode(sName);
|
Item.Name := UTF8Encode(sName);
|
||||||
Item.Value := UTF8Encode(sValue);
|
Item.Value := UTF8Encode(sValue);
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.xmlPrintFormatEndElement(oOwner: TObject;
|
procedure TVpPrinter.xmlPrintFormatEndElement(oOwner: TObject;
|
||||||
sValue: DOMString);
|
sValue: DOMString);
|
||||||
@ -2581,7 +2490,6 @@ begin
|
|||||||
FElementIndex := -1;
|
FElementIndex := -1;
|
||||||
FAttributes.Clear;
|
FAttributes.Clear;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TVpPrinter.xmlPrintFormatStartElement(oOwner: TObject;
|
procedure TVpPrinter.xmlPrintFormatStartElement(oOwner: TObject;
|
||||||
sValue: DOMString);
|
sValue: DOMString);
|
||||||
@ -3009,6 +2917,5 @@ begin
|
|||||||
end;
|
end;
|
||||||
FAttributes.Clear;
|
FAttributes.Clear;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user