From fb560e9128d8376292b9dbe06a203c39d9d9050e Mon Sep 17 00:00:00 2001 From: dmitry Date: Sat, 12 Feb 2011 04:36:48 +0000 Subject: [PATCH] carbon: no-printer failure patch by Patrick Chevalley, #17120 git-svn-id: trunk@29475 - --- components/printers/carbon/carbonprinters.inc | 7 ++++++- components/printers/carbon/carbonprndialogs.inc | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/printers/carbon/carbonprinters.inc b/components/printers/carbon/carbonprinters.inc index 86b250320c..5d949bd0eb 100644 --- a/components/printers/carbon/carbonprinters.inc +++ b/components/printers/carbon/carbonprinters.inc @@ -297,8 +297,13 @@ begin end; procedure TCarbonPrinter.UpdatePrinter; +var + s: string; begin - SetPrinter(GetCurrentPrinterName); + s := GetCurrentPrinterName; + if trim(s) = '' then // Observed if Default printer set to "Use last printer", and no printing done + s := '*'; // so select lcl default + SetPrinter(s); Validate; end; diff --git a/components/printers/carbon/carbonprndialogs.inc b/components/printers/carbon/carbonprndialogs.inc index f0836cc6b1..dadf86ec9e 100644 --- a/components/printers/carbon/carbonprndialogs.inc +++ b/components/printers/carbon/carbonprndialogs.inc @@ -14,7 +14,6 @@ begin // TODO: set and get paper margins, title if not Assigned(Printer) then Exit; - if Printer.Printers.Count <= 0 then Exit; CarbonPrinter := Printer as TCarbonPrinter;