mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 19:07:38 +00:00
* Source/NSPrintOperation.m (-_print): Remove locale change (now
handled correctly in backend stream context. * Source/NSScrollView.m (-initWithFrame:): Change default border to none. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16020 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3abfc263a0
commit
1b0e112697
5 changed files with 17 additions and 30 deletions
|
@ -53,9 +53,6 @@
|
|||
#include <AppKit/NSWorkspace.h>
|
||||
#include <AppKit/PSOperators.h>
|
||||
|
||||
#include <gnustep/base/GSLocale.h>
|
||||
#include <locale.h>
|
||||
|
||||
#define NSNUMBER(a) [NSNumber numberWithInt: (a)]
|
||||
#define NSFNUMBER(a) [NSNumber numberWithFloat: (a)]
|
||||
|
||||
|
@ -880,7 +877,6 @@ scaleRect(NSRect rect, double scale)
|
|||
int i, dir;
|
||||
BOOL knowsPageRange, allPages;
|
||||
NSRange viewPageRange;
|
||||
NSString *clocale;
|
||||
NSMutableDictionary *dict;
|
||||
page_info_t info;
|
||||
|
||||
|
@ -941,12 +937,6 @@ scaleRect(NSRect rect, double scale)
|
|||
info: &info];
|
||||
}
|
||||
|
||||
/* Reset the current locale to a generic C locale so numbers
|
||||
get printed correctly for PostScriptl
|
||||
Save the current locale for later. */
|
||||
clocale = GSSetLocale(LC_NUMERIC, nil);
|
||||
GSSetLocale(LC_NUMERIC, @"C");
|
||||
|
||||
/* Print the header information */
|
||||
[_view beginDocument];
|
||||
|
||||
|
@ -1013,7 +1003,6 @@ scaleRect(NSRect rect, double scale)
|
|||
[_view _endSheet];
|
||||
}
|
||||
[_view endDocument];
|
||||
GSSetLocale(LC_NUMERIC, clocale);
|
||||
|
||||
/* Setup/reset for next time */
|
||||
[dict setObject: NSNUMBER(info.last) forKey: NSPrintLastPage];
|
||||
|
@ -1286,13 +1275,6 @@ scaleRect(NSRect rect, double scale)
|
|||
|
||||
- (void) _print
|
||||
{
|
||||
NSString *clocale;
|
||||
/* Reset the current locale to a generic C locale so numbers
|
||||
get printed correctly for PostScript (maybe we should only
|
||||
set the numeric locale?). Save the current locale for later. */
|
||||
clocale = GSSetLocale(LC_NUMERIC, nil);
|
||||
GSSetLocale(LC_NUMERIC, @"C");
|
||||
|
||||
/* Save this for the view to look at. Seems like there should
|
||||
be a better way to pass it to beginDocument */
|
||||
[[_printInfo dictionary] setObject: [NSValue valueWithRect: _rect]
|
||||
|
@ -1301,8 +1283,6 @@ scaleRect(NSRect rect, double scale)
|
|||
[_view beginPageInRect: _rect atPlacement: NSMakePoint(0,0)];
|
||||
[_view displayRectIgnoringOpacity: _rect];
|
||||
[_view endDocument];
|
||||
|
||||
GSSetLocale(LC_NUMERIC, clocale);
|
||||
}
|
||||
|
||||
- (BOOL)isEPSOperation
|
||||
|
@ -1382,16 +1362,7 @@ scaleRect(NSRect rect, double scale)
|
|||
|
||||
- (void) _print
|
||||
{
|
||||
NSString *clocale;
|
||||
/* Reset the current locale to a generic C locale so numbers
|
||||
get printed correctly for PostScript (maybe we should only
|
||||
set the numeric locale?). Save the current locale for later. */
|
||||
clocale = GSSetLocale(LC_NUMERIC, nil);
|
||||
GSSetLocale(LC_NUMERIC, @"C");
|
||||
|
||||
[_view displayRectIgnoringOpacity: _rect];
|
||||
|
||||
GSSetLocale(LC_NUMERIC, clocale);
|
||||
}
|
||||
|
||||
- (BOOL)deliverResult
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue