commit | 26df36619b61cc240bb234d95ac5b3a0216fb7bf | [log] [tgz] |
---|---|---|
author | Silenio Quarti <silenio> | Fri Aug 07 19:42:10 2009 +0000 |
committer | Silenio Quarti <silenio> | Fri Aug 07 19:42:10 2009 +0000 |
tree | a5a6092458ba26db944a583bae8c8868f3db5ba6 | |
parent | 8071d4ccecd42d1a2d92a1205a97781c4bcd2147 [diff] |
271703 - Cannot print from 64 bit eclipse (back port to 3.5.x)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java index 91e63fd..e2e7c5b 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java
@@ -341,7 +341,8 @@ } float scalingFactor() { - return new NSNumber(printInfo.dictionary().objectForKey(OS.NSPrintScalingFactor)).floatValue(); + NSNumber scale = new NSNumber(printInfo.dictionary().objectForKey(OS.NSPrintScalingFactor)); + return OS.PTR_SIZEOF == 4 ? scale.floatValue() : (float)scale.doubleValue(); } /**