Project

General

Profile

Defect #13630 » pdf.rb.patch

F Schroedter, 2013-03-28 19:27

View differences:

lib/redmine/export/pdf.rb (working copy)
base_x = pdf.GetX
base_y = pdf.GetY
max_height = issues_to_pdf_write_cells(pdf, query.inline_columns, col_width, row_height, true)
pdf.Rect(base_x, base_y, table_width + col_id_width, max_height, 'FD');
pdf.Rect(base_x, base_y, table_width, max_height, 'FD');
pdf.SetXY(base_x, base_y);
# write the cells on page
pdf.RDMCell(col_id_width, row_height, "#", "T", 0, 'C', 1)
issues_to_pdf_write_cells(pdf, query.inline_columns, col_width, row_height, true)
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_id_width, col_width)
pdf.SetY(base_y + max_height);
......
group_label = group.blank? ? 'None' : group.to_s.dup
group_label << " (#{query.issue_count_by_group[group]})"
pdf.Bookmark group_label, 0, -1
pdf.RDMCell(table_width + col_id_width, row_height * 2, group_label, 1, 1, 'L')
pdf.RDMCell(table_width, row_height * 2, group_label, 1, 1, 'L')
pdf.SetFontStyle('',8)
previous_group = group
end
......
end
# write the cells on page
pdf.RDMCell(col_id_width, row_height, issue.id.to_s, "T", 0, 'C', 1)
issues_to_pdf_write_cells(pdf, col_values, col_width, row_height)
issues_to_pdf_draw_borders(pdf, base_x, base_y, base_y + max_height, col_id_width, col_width)
pdf.SetY(base_y + max_height);
......
# Draw lines to close the row (MultiCell border drawing in not uniform)
def issues_to_pdf_draw_borders(pdf, top_x, top_y, lower_y,
id_width, col_widths)
col_x = top_x + id_width
col_x = top_x
pdf.Line(col_x, top_y, col_x, lower_y) # id right border
col_widths.each do |width|
col_x += width
(2-2/4)