Partial fix for bug #32845

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33038 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-05-14 18:00:13 +00:00
parent 28e0200ed8
commit 51a3070bf7
2 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,9 @@
2011-05-11 Fred Kiefer <FredKiefer@gmx.de> 2011-05-14 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPrintOperation.m: Add an extra context save and restore
at the sheet level. This is a partial fix for bug #32845.
2011-05-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSXibLoader.m: Add support for the "array" and * Source/GSXibLoader.m: Add support for the "array" and
"dictionary" elements found in newer XIB files (Version >= 8). "dictionary" elements found in newer XIB files (Version >= 8).

View file

@ -1100,6 +1100,7 @@ scaleRect(NSRect rect, double scale)
{ {
[_view drawSheetBorderWithSize: info.sheetBounds.size]; [_view drawSheetBorderWithSize: info.sheetBounds.size];
[_view _endSheet]; [_view _endSheet];
DPSgrestore([self context]);
} }
[_view endDocument]; [_view endDocument];
@ -1138,7 +1139,7 @@ scaleRect(NSRect rect, double scale)
NSString *label; NSString *label;
NSRect boundsForPage = info.sheetBounds; NSRect boundsForPage = info.sheetBounds;
if(knowsPageRange) if (knowsPageRange)
{ {
boundsForPage = pageRect; boundsForPage = pageRect;
} }
@ -1147,6 +1148,7 @@ scaleRect(NSRect rect, double scale)
if (info.nup == 1) if (info.nup == 1)
label = [NSString stringWithFormat: @"%d", currentPage]; label = [NSString stringWithFormat: @"%d", currentPage];
DPSgsave(ctxt);
[self beginPage: floor((currentPage - info.first)/info.nup)+1 [self beginPage: floor((currentPage - info.first)/info.nup)+1
label: label label: label
bBox: boundsForPage bBox: boundsForPage
@ -1157,7 +1159,7 @@ scaleRect(NSRect rect, double scale)
DPStranslate(ctxt, 0, -info.paperSize.height); DPStranslate(ctxt, 0, -info.paperSize.height);
} }
if(!knowsPageRange) if (!knowsPageRange)
{ {
/* Also offset by margins */ /* Also offset by margins */
DPStranslate(ctxt, NSMinX(info.paperBounds), NSMinY(info.paperBounds)); DPStranslate(ctxt, NSMinX(info.paperBounds), NSMinY(info.paperBounds));
@ -1232,6 +1234,7 @@ scaleRect(NSRect rect, double scale)
{ {
[self drawSheetBorderWithSize: info.sheetBounds.size]; [self drawSheetBorderWithSize: info.sheetBounds.size];
[self _endSheet]; [self _endSheet];
DPSgrestore(ctxt);
} }
} }