summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-05 14:13:03 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-05 14:13:03 +0000
commit47dccc53b36265a9b552a2c15e44e4d8b0b89acd (patch)
treeda0a9a32427803b8ffa6283efb690f7a39e66941 /vendor
parentc41a3ace07cb5dfebd1e44646ff4786f3fe69692 (diff)
downloadredmine-47dccc53b36265a9b552a2c15e44e4d8b0b89acd.tar.gz
redmine-47dccc53b36265a9b552a2c15e44e4d8b0b89acd.zip
PDF: Ruby 1.9 compatibility for FPDF ANSI (#61).
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5331 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/chinese.rb6
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/japanese.rb6
-rw-r--r--vendor/plugins/rfpdf/lib/fpdf/korean.rb6
3 files changed, 9 insertions, 9 deletions
diff --git a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
index 94f8ee49d..dca53c556 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/chinese.rb
@@ -130,7 +130,7 @@ module PDF_Chinese
nb=s.length
i=0
while(i<nb)
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@@ -182,7 +182,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@@ -258,7 +258,7 @@ module PDF_Chinese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
diff --git a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
index 93bc283cc..78f6ce932 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/japanese.rb
@@ -100,7 +100,7 @@ module PDF_Japanese
nb=s.length
i=0
while(i<nb)
- o=s[i]
+ o = s[i].is_a?(String) ? s[i].ord : s[i]
if(o<128)
#ASCII
l+=cw[o.chr] if cw[o.chr]
@@ -158,7 +158,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c #o=ord(c)
if(o==10)
#Explicit line break
@@ -246,7 +246,7 @@ module PDF_Japanese
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c
if(o==10)
#Explicit line break
diff --git a/vendor/plugins/rfpdf/lib/fpdf/korean.rb b/vendor/plugins/rfpdf/lib/fpdf/korean.rb
index 0d4ee3f6e..1777ab09a 100644
--- a/vendor/plugins/rfpdf/lib/fpdf/korean.rb
+++ b/vendor/plugins/rfpdf/lib/fpdf/korean.rb
@@ -99,7 +99,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nb=s.length
i=0
while(i<nb)
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
@@ -151,7 +151,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
@@ -227,7 +227,7 @@ UHC_widths={' ' => 333, '!' => 416, '"' => 416, '#' => 833, '$' => 625, '%' => 9
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")