summaryrefslogtreecommitdiffstats
path: root/app/helpers/ifpdf_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-12 17:59:02 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-12 17:59:02 +0000
commit027bf93849e82ef3c60e4a3024db49d65f0fb3c9 (patch)
treec6bc438fcd50370944b94f605b3f34fe54b73248 /app/helpers/ifpdf_helper.rb
parent071f8e18d02f789149071abb8e052bae7ad01003 (diff)
downloadredmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.tar.gz
redmine-027bf93849e82ef3c60e4a3024db49d65f0fb3c9.zip
added svn:eol-style native property on /app files
git-svn-id: http://redmine.rubyforge.org/svn/trunk@333 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/ifpdf_helper.rb')
-rw-r--r--app/helpers/ifpdf_helper.rb138
1 files changed, 69 insertions, 69 deletions
diff --git a/app/helpers/ifpdf_helper.rb b/app/helpers/ifpdf_helper.rb
index 481c2c318..267f96667 100644
--- a/app/helpers/ifpdf_helper.rb
+++ b/app/helpers/ifpdf_helper.rb
@@ -1,70 +1,70 @@
-# redMine - project management software
-# Copyright (C) 2006 Jean-Philippe Lang
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-require 'iconv'
-require 'rfpdf/chinese'
-
-module IfpdfHelper
-
- class IFPDF < FPDF
- include GLoc
- attr_accessor :footer_date
-
- def initialize(lang)
- super()
- set_language_if_valid lang
- case current_language
- when :ja
- extend(PDF_Japanese)
- AddSJISFont()
- @font_for_content = 'SJIS'
- @font_for_footer = 'SJIS'
- else
- @font_for_content = 'Arial'
- @font_for_footer = 'Helvetica'
- end
- SetCreator("redMine #{Redmine::VERSION}")
- SetFont(@font_for_content)
- end
-
- def SetFontStyle(style, size)
- SetFont(@font_for_content, style, size)
- end
-
- def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
- @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
- txt = begin
- @ic.iconv(txt)
- rescue
- txt
- end
- super w,h,txt,border,ln,align,fill,link
- end
-
- def Footer
- SetFont(@font_for_footer, 'I', 8)
- SetY(-15)
- SetX(15)
- Cell(0, 5, @footer_date, 0, 0, 'L')
- SetY(-15)
- SetX(-30)
- Cell(0, 5, PageNo().to_s + '/{nb}', 0, 0, 'C')
- end
-
+# redMine - project management software
+# Copyright (C) 2006 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+require 'iconv'
+require 'rfpdf/chinese'
+
+module IfpdfHelper
+
+ class IFPDF < FPDF
+ include GLoc
+ attr_accessor :footer_date
+
+ def initialize(lang)
+ super()
+ set_language_if_valid lang
+ case current_language
+ when :ja
+ extend(PDF_Japanese)
+ AddSJISFont()
+ @font_for_content = 'SJIS'
+ @font_for_footer = 'SJIS'
+ else
+ @font_for_content = 'Arial'
+ @font_for_footer = 'Helvetica'
+ end
+ SetCreator("redMine #{Redmine::VERSION}")
+ SetFont(@font_for_content)
+ end
+
+ def SetFontStyle(style, size)
+ SetFont(@font_for_content, style, size)
+ end
+
+ def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
+ @ic ||= Iconv.new(l(:general_pdf_encoding), 'UTF-8')
+ txt = begin
+ @ic.iconv(txt)
+ rescue
+ txt
+ end
+ super w,h,txt,border,ln,align,fill,link
+ end
+
+ def Footer
+ SetFont(@font_for_footer, 'I', 8)
+ SetY(-15)
+ SetX(15)
+ Cell(0, 5, @footer_date, 0, 0, 'L')
+ SetY(-15)
+ SetX(-30)
+ Cell(0, 5, PageNo().to_s + '/{nb}', 0, 0, 'C')
+ end
+
end
-
-end
+
+end