mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 15:39:31 +02:00
LCL, printers: fix typos in Exception messages and comments, fixes bug #18950
git-svn-id: trunk@29918 -
This commit is contained in:
parent
f1dbbf861a
commit
c1bf5ff2e4
@ -465,7 +465,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
i:=DoSetPrinter(aName);
|
i:=DoSetPrinter(aName);
|
||||||
if i<0 then
|
if i<0 then
|
||||||
raise EPrinter.Create(Format('Printer "%s" does''t exists.',[aName]));
|
raise EPrinter.Create(Format('Printer "%s" doesn''t exist.',[aName]));
|
||||||
fPrinterIndex:=i;
|
fPrinterIndex:=i;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -502,9 +502,9 @@ begin
|
|||||||
if Printing<>Value then
|
if Printing<>Value then
|
||||||
begin
|
begin
|
||||||
if Value then
|
if Value then
|
||||||
raise EPrinter.Create('Printer not printing')
|
raise EPrinter.Create('Printer is not printing')
|
||||||
else
|
else
|
||||||
raise Eprinter.Create('Printer print');
|
raise Eprinter.Create('Printer is printing');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -641,7 +641,7 @@ begin
|
|||||||
Result:=1;
|
Result:=1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Set the copies numbers
|
//Set copies number
|
||||||
procedure TPrinter.SetCopies(AValue: Integer);
|
procedure TPrinter.SetCopies(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
CheckPrinting(False);
|
CheckPrinting(False);
|
||||||
@ -649,7 +649,7 @@ begin
|
|||||||
if Printers.Count>0 then
|
if Printers.Count>0 then
|
||||||
DoSetCopies(aValue)
|
DoSetCopies(aValue)
|
||||||
else
|
else
|
||||||
raise EPrinter.Create('No printer found.');
|
raise EPrinter.Create('No printers found.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.SetOrientation(const AValue: TPrinterOrientation);
|
procedure TPrinter.SetOrientation(const AValue: TPrinterOrientation);
|
||||||
@ -658,7 +658,7 @@ begin
|
|||||||
DoSetOrientation(aValue);
|
DoSetOrientation(aValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Set the selected printer
|
//Set selected printer
|
||||||
procedure TPrinter.SetPrinterIndex(AValue: integer);
|
procedure TPrinter.SetPrinterIndex(AValue: integer);
|
||||||
Var aName : String;
|
Var aName : String;
|
||||||
begin
|
begin
|
||||||
@ -672,11 +672,11 @@ begin
|
|||||||
if (AValue>=0) and (AValue<Printers.Count) then
|
if (AValue>=0) and (AValue<Printers.Count) then
|
||||||
aName:=Printers.Strings[AValue]
|
aName:=Printers.Strings[AValue]
|
||||||
else
|
else
|
||||||
raise EPrinter.Create('Printer index out of range !');
|
raise EPrinter.Create('Printer index out of range!');
|
||||||
SetPrinter(aName);
|
SetPrinter(aName);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise EPrinter.Create('No printers defined !');
|
raise EPrinter.Create('No printers defined!');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.SetRawMode(const AValue: boolean);
|
procedure TPrinter.SetRawMode(const AValue: boolean);
|
||||||
@ -697,47 +697,47 @@ end;
|
|||||||
|
|
||||||
procedure TPrinter.DoBeginDoc;
|
procedure TPrinter.DoBeginDoc;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoNewPage;
|
procedure TPrinter.DoNewPage;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoEndDoc(aAborded : Boolean);
|
procedure TPrinter.DoEndDoc(aAborded : Boolean);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoAbort;
|
procedure TPrinter.DoAbort;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoResetPrintersList;
|
procedure TPrinter.DoResetPrintersList;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
fPrintersValid:=false;
|
fPrintersValid:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoResetFontsList;
|
procedure TPrinter.DoResetFontsList;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Initialize the Lst with all definied printers
|
//Initialize the Lst with all definied printers
|
||||||
procedure TPrinter.DoEnumPrinters(Lst: TStrings);
|
procedure TPrinter.DoEnumPrinters(Lst: TStrings);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
//Warning : The default printer must be the first printer
|
//Warning: The default printer must be the first printer
|
||||||
// (fPrinters[0])
|
// (fPrinters[0])
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Initialize the Lst with all supported fonts
|
//Initialize the Lst with all supported fonts
|
||||||
procedure TPrinter.DoEnumFonts(Lst: TStrings);
|
procedure TPrinter.DoEnumFonts(Lst: TStrings);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Initialize the Lst with all supported papers names
|
//Initialize the Lst with all supported papers names
|
||||||
@ -745,7 +745,7 @@ procedure TPrinter.DoEnumPapers(Lst: TStrings);
|
|||||||
begin
|
begin
|
||||||
//DebugLn(['TPrinter.DoEnumPapers ',dbgsName(Self)]);
|
//DebugLn(['TPrinter.DoEnumPapers ',dbgsName(Self)]);
|
||||||
|
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// This method is called once after the printer list
|
// This method is called once after the printer list
|
||||||
@ -759,36 +759,36 @@ end;
|
|||||||
//Set the current printer
|
//Set the current printer
|
||||||
function TPrinter.DoSetPrinter(aName : string): Integer;
|
function TPrinter.DoSetPrinter(aName : string): Integer;
|
||||||
begin
|
begin
|
||||||
//Override this methode. The result must be
|
//Override this method. The result must be
|
||||||
//the index of aName printer in Printers list
|
//the index of aName printer in Printers list
|
||||||
//if the aName doesn't exists, return -1
|
//if the aName doesn't exist, return -1
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Get the current copies nulbers
|
//Get the current copies nulbers
|
||||||
function TPrinter.DoGetCopies: Integer;
|
function TPrinter.DoGetCopies: Integer;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
Result:=1;
|
Result:=1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Set the copies numbers
|
//Set copies number
|
||||||
procedure TPrinter.DoSetCopies(aValue: Integer);
|
procedure TPrinter.DoSetCopies(aValue: Integer);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Return the current paper orientation
|
//Return current paper orientation
|
||||||
function TPrinter.DoGetOrientation: TPrinterOrientation;
|
function TPrinter.DoGetOrientation: TPrinterOrientation;
|
||||||
begin
|
begin
|
||||||
Result:=poPortrait;
|
Result:=poPortrait;
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Set the paper Orientation
|
//Set paper Orientation
|
||||||
procedure TPrinter.DoSetOrientation(aValue: TPrinterOrientation);
|
procedure TPrinter.DoSetOrientation(aValue: TPrinterOrientation);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Return the default paper name for the selected printer
|
//Return the default paper name for the selected printer
|
||||||
@ -798,16 +798,16 @@ begin
|
|||||||
//Override this methode
|
//Override this methode
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Return the selected paper name for the current printer
|
//Return selected paper name for the current printer
|
||||||
function TPrinter.DoGetPaperName: string;
|
function TPrinter.DoGetPaperName: string;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPrinter.DoSetPaperName(aName: string);
|
procedure TPrinter.DoSetPaperName(aName: string);
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Initialise aPaperRc with the aName paper rect
|
//Initialise aPaperRc with the aName paper rect
|
||||||
@ -817,13 +817,13 @@ end;
|
|||||||
function TPrinter.DoGetPaperRect(aName : string; var aPaperRc: TPaperRect): Integer;
|
function TPrinter.DoGetPaperRect(aName : string; var aPaperRc: TPaperRect): Integer;
|
||||||
begin
|
begin
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
//Override this methode
|
//Override this method
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Get a state of current printer
|
//Get a state of current printer
|
||||||
function TPrinter.DoGetPrinterState: TPrinterState;
|
function TPrinter.DoGetPrinterState: TPrinterState;
|
||||||
begin
|
begin
|
||||||
//Override this methode
|
//Override this method
|
||||||
Result:=psNoDefine;
|
Result:=psNoDefine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -833,7 +833,7 @@ begin
|
|||||||
Result:=ptLocal;
|
Result:=ptLocal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Return True if selected printer can printing
|
//Return True if selected printer is able to print
|
||||||
function TPrinter.GetCanPrint: Boolean;
|
function TPrinter.GetCanPrint: Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=True;
|
Result:=True;
|
||||||
@ -981,7 +981,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise EPrinter.Create(Format('Paper "%s" not supported !',[aName]));
|
raise EPrinter.Create(Format('Paper "%s" not supported!',[aName]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//Return an TPaperRect corresponding at an paper name
|
//Return an TPaperRect corresponding at an paper name
|
||||||
@ -1002,10 +1002,10 @@ begin
|
|||||||
if Margins>=0 then
|
if Margins>=0 then
|
||||||
Result := TmpPaperRect
|
Result := TmpPaperRect
|
||||||
else
|
else
|
||||||
raise EPrinter.Create(Format('The paper "%s" has no defined rectangle ! ',[aName]));
|
raise EPrinter.Create(Format('The paper "%s" has no defined rectangle!',[aName]));
|
||||||
|
|
||||||
end
|
end
|
||||||
else raise EPrinter.Create(Format('Paper "%s" not supported !',[aName]));
|
else raise EPrinter.Create(Format('Paper "%s" not supported!',[aName]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPaperSize.CheckSupportedPapers;
|
procedure TPaperSize.CheckSupportedPapers;
|
||||||
@ -1030,7 +1030,7 @@ end;
|
|||||||
constructor TPaperSize.Create(aOwner: TPrinter);
|
constructor TPaperSize.Create(aOwner: TPrinter);
|
||||||
begin
|
begin
|
||||||
if not assigned(aOwner) then
|
if not assigned(aOwner) then
|
||||||
raise Exception.Create('TMediaSize.Create, aOwner must be defined !');
|
raise Exception.Create('TMediaSize.Create, aOwner must be defined!');
|
||||||
Inherited Create;
|
Inherited Create;
|
||||||
|
|
||||||
fLastPrinterIndex:=-2;
|
fLastPrinterIndex:=-2;
|
||||||
|
Loading…
Reference in New Issue
Block a user