summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-30 23:44:20 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-30 23:44:20 +0000
commitdbe71b4f3baea4f4b05d3d2a228f76a1fbed3926 (patch)
tree3133f074b4c369fe5dccebf5899cd19aa40e5d60 /vendor
parent3ec97f951e9f8f4970313b5d7a2662b25895bd2e (diff)
downloadredmine-dbe71b4f3baea4f4b05d3d2a228f76a1fbed3926.tar.gz
redmine-dbe71b4f3baea4f4b05d3d2a228f76a1fbed3926.zip
PDF: fix syntax errors at vendor/plugins/rfpdf/lib/tcpdf.rb on Ruby 1.9 (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5267 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rwxr-xr-xvendor/plugins/rfpdf/lib/tcpdf.rb106
1 files changed, 53 insertions, 53 deletions
diff --git a/vendor/plugins/rfpdf/lib/tcpdf.rb b/vendor/plugins/rfpdf/lib/tcpdf.rb
index d5b0672af..da7d556f7 100755
--- a/vendor/plugins/rfpdf/lib/tcpdf.rb
+++ b/vendor/plugins/rfpdf/lib/tcpdf.rb
@@ -293,10 +293,10 @@ class TCPDF
#Scale factor
case unit.downcase
- when 'pt': @k=1
- when 'mm': @k=72/25.4
- when 'cm': @k=72/2.54
- when 'in': @k=72
+ when 'pt' ; @k=1
+ when 'mm' ; @k=72/25.4
+ when 'cm' ; @k=72/2.54
+ when 'in' ; @k=72
else Error("Incorrect unit: #{unit}")
end
@@ -305,55 +305,55 @@ class TCPDF
# Page formats (45 standard ISO paper formats and 4 american common formats).
# Paper cordinates are calculated in this way: (inches# 72) where (1 inch = 2.54 cm)
case (format.upcase)
- when '4A0': format = [4767.87,6740.79]
- when '2A0': format = [3370.39,4767.87]
- when 'A0': format = [2383.94,3370.39]
- when 'A1': format = [1683.78,2383.94]
- when 'A2': format = [1190.55,1683.78]
- when 'A3': format = [841.89,1190.55]
- when 'A4': format = [595.28,841.89] #: default
- when 'A5': format = [419.53,595.28]
- when 'A6': format = [297.64,419.53]
- when 'A7': format = [209.76,297.64]
- when 'A8': format = [147.40,209.76]
- when 'A9': format = [104.88,147.40]
- when 'A10': format = [73.70,104.88]
- when 'B0': format = [2834.65,4008.19]
- when 'B1': format = [2004.09,2834.65]
- when 'B2': format = [1417.32,2004.09]
- when 'B3': format = [1000.63,1417.32]
- when 'B4': format = [708.66,1000.63]
- when 'B5': format = [498.90,708.66]
- when 'B6': format = [354.33,498.90]
- when 'B7': format = [249.45,354.33]
- when 'B8': format = [175.75,249.45]
- when 'B9': format = [124.72,175.75]
- when 'B10': format = [87.87,124.72]
- when 'C0': format = [2599.37,3676.54]
- when 'C1': format = [1836.85,2599.37]
- when 'C2': format = [1298.27,1836.85]
- when 'C3': format = [918.43,1298.27]
- when 'C4': format = [649.13,918.43]
- when 'C5': format = [459.21,649.13]
- when 'C6': format = [323.15,459.21]
- when 'C7': format = [229.61,323.15]
- when 'C8': format = [161.57,229.61]
- when 'C9': format = [113.39,161.57]
- when 'C10': format = [79.37,113.39]
- when 'RA0': format = [2437.80,3458.27]
- when 'RA1': format = [1729.13,2437.80]
- when 'RA2': format = [1218.90,1729.13]
- when 'RA3': format = [864.57,1218.90]
- when 'RA4': format = [609.45,864.57]
- when 'SRA0': format = [2551.18,3628.35]
- when 'SRA1': format = [1814.17,2551.18]
- when 'SRA2': format = [1275.59,1814.17]
- when 'SRA3': format = [907.09,1275.59]
- when 'SRA4': format = [637.80,907.09]
- when 'LETTER': format = [612.00,792.00]
- when 'LEGAL': format = [612.00,1008.00]
- when 'EXECUTIVE': format = [521.86,756.00]
- when 'FOLIO': format = [612.00,936.00]
+ when '4A0' ; format = [4767.87,6740.79]
+ when '2A0' ; format = [3370.39,4767.87]
+ when 'A0' ; format = [2383.94,3370.39]
+ when 'A1' ; format = [1683.78,2383.94]
+ when 'A2' ; format = [1190.55,1683.78]
+ when 'A3' ; format = [841.89,1190.55]
+ when 'A4' ; format = [595.28,841.89] # ; default
+ when 'A5' ; format = [419.53,595.28]
+ when 'A6' ; format = [297.64,419.53]
+ when 'A7' ; format = [209.76,297.64]
+ when 'A8' ; format = [147.40,209.76]
+ when 'A9' ; format = [104.88,147.40]
+ when 'A10' ; format = [73.70,104.88]
+ when 'B0' ; format = [2834.65,4008.19]
+ when 'B1' ; format = [2004.09,2834.65]
+ when 'B2' ; format = [1417.32,2004.09]
+ when 'B3' ; format = [1000.63,1417.32]
+ when 'B4' ; format = [708.66,1000.63]
+ when 'B5' ; format = [498.90,708.66]
+ when 'B6' ; format = [354.33,498.90]
+ when 'B7' ; format = [249.45,354.33]
+ when 'B8' ; format = [175.75,249.45]
+ when 'B9' ; format = [124.72,175.75]
+ when 'B10' ; format = [87.87,124.72]
+ when 'C0' ; format = [2599.37,3676.54]
+ when 'C1' ; format = [1836.85,2599.37]
+ when 'C2' ; format = [1298.27,1836.85]
+ when 'C3' ; format = [918.43,1298.27]
+ when 'C4' ; format = [649.13,918.43]
+ when 'C5' ; format = [459.21,649.13]
+ when 'C6' ; format = [323.15,459.21]
+ when 'C7' ; format = [229.61,323.15]
+ when 'C8' ; format = [161.57,229.61]
+ when 'C9' ; format = [113.39,161.57]
+ when 'C10' ; format = [79.37,113.39]
+ when 'RA0' ; format = [2437.80,3458.27]
+ when 'RA1' ; format = [1729.13,2437.80]
+ when 'RA2' ; format = [1218.90,1729.13]
+ when 'RA3' ; format = [864.57,1218.90]
+ when 'RA4' ; format = [609.45,864.57]
+ when 'SRA0' ; format = [2551.18,3628.35]
+ when 'SRA1' ; format = [1814.17,2551.18]
+ when 'SRA2' ; format = [1275.59,1814.17]
+ when 'SRA3' ; format = [907.09,1275.59]
+ when 'SRA4' ; format = [637.80,907.09]
+ when 'LETTER' ; format = [612.00,792.00]
+ when 'LEGAL' ; format = [612.00,1008.00]
+ when 'EXECUTIVE' ; format = [521.86,756.00]
+ when 'FOLIO' ; format = [612.00,936.00]
#else then Error("Unknown page format: #{format}"
end
@fw_pt = format[0]