[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix, NSPrintOperation (-_print)
From: |
Fred Kiefer |
Subject: |
Re: Fix, NSPrintOperation (-_print) |
Date: |
Tue, 14 Jul 2009 11:31:11 +0200 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Georg Fleischmann schrieb:
>
> here is a small fix for printing of more than the first page. A MIN
> needs to be turned into a MAX.
>
> Best Wishes,
> Georg Fleischmann
>
>
> *** Source/NSPrintOperation.m.old 2009-03-13 14:31:29.000000000 +0800
> --- Source/NSPrintOperation.m 2009-07-14 11:46:42.000000000 +0800
> ***************
> *** 972,978 ****
> info.first = MAX(info.first, (int)viewPageRange.location);
> info.first = MIN(info.first, (int)(NSMaxRange(viewPageRange) - 1));
> info.last = MAX(info.last, info.first);
> ! info.last = MIN(info.last, (int)(NSMaxRange(viewPageRange) - 1));
> viewPageRange = NSMakeRange(info.first, (info.last-info.first)+1);
> }
> [dict setObject: NSFNUMBER(info.nupScale) forKey: @"NSNupScale"];
> --- 972,978 ----
> info.first = MAX(info.first, (int)viewPageRange.location);
> info.first = MIN(info.first, (int)(NSMaxRange(viewPageRange) - 1));
> info.last = MAX(info.last, info.first);
> ! info.last = MAX(info.last, (int)(NSMaxRange(viewPageRange) - 1));
> viewPageRange = NSMakeRange(info.first, (info.last-info.first)+1);
> }
> [dict setObject: NSFNUMBER(info.nupScale) forKey: @"NSNupScale"];
>
Sorry, I don't quite understadn this fix. As far as I see this code
tries to make sure that the last printed page is still smaller than the
known available pages. In which case is this value wrong?