Project

General

Profile

Feature #69 » pdf.rb_r6129.patch

Jun NAITOH, 2011-06-29 16:43

View differences:

lib/redmine/export/pdf.rb (working copy)
111 111
          Cell(w,h,fix_text_encoding(txt),border,ln,align,fill,link)
112 112
        end
113 113

  
114
        def RDMMultiCell(w,h=0,txt='',border=0,align='',fill=0)
115
          MultiCell(w,h,fix_text_encoding(txt),border,align,fill)
114
        def RDMMultiCell(w,h=0,txt='',border=0,align='',fill=0,ln=1)
115
          MultiCell(w,h,fix_text_encoding(txt),border,align,fill,ln)
116 116
        end
117 117

  
118
        def RDMwriteHTMLCell(w, h, x, y, html='', border=0, ln=1, fill=0)
119
          writeHTMLCell(w, h, x, y, fix_text_encoding(html), border, ln, fill)
120
        end
121

  
118 122
        def Footer
119 123
          SetFont(@font_for_footer, 'I', 8)
120 124
          SetY(-15)
......
282 286
             "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
283 287
        pdf.Ln
284 288

  
285
        y0 = pdf.GetY
286

  
287 289
        pdf.SetFontStyle('B',9)
288 290
        pdf.RDMCell(35,5, l(:field_status) + ":","LT")
289 291
        pdf.SetFontStyle('',9)
......
331 333
          pdf.RDMMultiCell(155,5, (show_value custom_value),"R")
332 334
        end
333 335

  
336
        y0 = pdf.GetY;
334 337
        pdf.SetFontStyle('B',9)
335 338
        pdf.RDMCell(35,5, l(:field_subject) + ":","LT")
336 339
        pdf.SetFontStyle('',9)
337 340
        pdf.RDMMultiCell(155,5, issue.subject,"RT")
341
        pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
338 342

  
339 343
        pdf.SetFontStyle('B',9)
340
        pdf.RDMCell(35,5, l(:field_description) + ":","LT")
344
        pdf.RDMCell(35 + 155,5, l(:field_description),"LRT", 1)
341 345
        pdf.SetFontStyle('',9)
342
        pdf.RDMMultiCell(155,5, issue.description.to_s,"RT")
346
        pdf.RDMwriteHTMLCell(35 + 155,5,0,0, Redmine::WikiFormatting.to_html(Setting.text_formatting, issue.description.to_s),"LRB")
343 347

  
344
        pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
345
        pdf.Line(pdf.GetX, pdf.GetY, pdf.GetX + 190, pdf.GetY)
346 348
        pdf.Ln
347 349

  
348 350
        if issue.changesets.any? &&
......
380 382
          if journal.notes?
381 383
            pdf.Ln unless journal.details.empty?
382 384
            pdf.SetFontStyle('',8)
383
            pdf.RDMMultiCell(190,5, journal.notes.to_s)
385
            pdf.RDMwriteHTMLCell(190,5,0,0, Redmine::WikiFormatting.to_html(Setting.text_formatting, journal.notes.to_s), "")
384 386
          end
385 387
          pdf.Ln
386 388
        end
(4-4/9)