##// END OF EJS Templates
Merged r9853 from trunk (#10688)...
Toshi MARUYAMA -
r9672:668981b8cd0e
parent child
Show More
@@ -6,6 +6,7 http://www.redmine.org/
6
6
7 == TBD v1.4.4
7 == TBD v1.4.4
8
8
9 * Defect #10688: PDF export from Wiki - Problems with tables
9 * Defect #11160: SQL Error on time report if a custom field has multiple values for an entry
10 * Defect #11160: SQL Error on time report if a custom field has multiple values for an entry
10 * Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view
11 * Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view
11 * Defect #11112: REST API - custom fields in POST/PUT ignored for time_entries
12 * Defect #11112: REST API - custom fields in POST/PUT ignored for time_entries
@@ -283,6 +283,7 class TCPDF
283 @state ||= 0
283 @state ||= 0
284 @tableborder ||= 0
284 @tableborder ||= 0
285 @tdbegin ||= false
285 @tdbegin ||= false
286 @tdtext ||= ''
286 @tdwidth ||= 0
287 @tdwidth ||= 0
287 @tdheight ||= 0
288 @tdheight ||= 0
288 @tdalign ||= "L"
289 @tdalign ||= "L"
@@ -3510,28 +3511,12 class TCPDF
3510
3511
3511 else
3512 else
3512 #Text
3513 #Text
3513 if (@href)
3514 if (@tdbegin)
3514 element.gsub!(/[\t\r\n\f]/, "");
3515 element.gsub!(/[\t\r\n\f]/, "");
3515 addHtmlLink(@href, element, fill);
3516 @tdtext << element.gsub(/&nbsp;/, " ");
3516 elsif (@tdbegin)
3517 elsif (@href)
3517 element.gsub!(/[\t\r\n\f]/, "");
3518 element.gsub!(/[\t\r\n\f]/, "");
3518 element.gsub!(/&nbsp;/, " ");
3519 addHtmlLink(@href, element, fill);
3519 base_page = @page;
3520 base_x = @x;
3521 base_y = @y;
3522
3523 MultiCell(@tdwidth, @tdheight, unhtmlentities(element.strip), @tableborder, @tdalign, @tdfill, 1);
3524 tr_end = @t_cells[@table_id][@tr_id][@td_id]['j1'] + 1;
3525 if @max_td_page[tr_end].nil? or (@max_td_page[tr_end] < @page)
3526 @max_td_page[tr_end] = @page
3527 @max_td_y[tr_end] = @y
3528 elsif (@max_td_page[tr_end] == @page)
3529 @max_td_y[tr_end] = @y if @max_td_y[tr_end].nil? or (@max_td_y[tr_end] < @y)
3530 end
3531
3532 @page = base_page;
3533 @x = base_x + @tdwidth;
3534 @y = base_y;
3535 elsif (@pre_state == true and element.length > 0)
3520 elsif (@pre_state == true and element.length > 0)
3536 Write(@lasth, unhtmlentities(element), '', fill);
3521 Write(@lasth, unhtmlentities(element), '', fill);
3537 elsif (element.strip.length > 0)
3522 elsif (element.strip.length > 0)
@@ -3825,6 +3810,7 class TCPDF
3825 @x += 5;
3810 @x += 5;
3826
3811
3827 when 'table'
3812 when 'table'
3813 Ln();
3828 if @default_table_columns < @max_table_columns[@table_id]
3814 if @default_table_columns < @max_table_columns[@table_id]
3829 @table_columns = @max_table_columns[@table_id];
3815 @table_columns = @max_table_columns[@table_id];
3830 else
3816 else
@@ -3921,6 +3907,11 class TCPDF
3921
3907
3922 when 'img'
3908 when 'img'
3923 if (!attrs['src'].nil?)
3909 if (!attrs['src'].nil?)
3910 # Don't generates image inside table tag
3911 if (@tdbegin)
3912 @tdtext << attrs['src'];
3913 return
3914 end
3924 # Only generates image include a pdf if RMagick is avalaible
3915 # Only generates image include a pdf if RMagick is avalaible
3925 unless Object.const_defined?(:Magick)
3916 unless Object.const_defined?(:Magick)
3926 Write(@lasth, attrs['src'], '', fill);
3917 Write(@lasth, attrs['src'], '', fill);
@@ -4079,6 +4070,23 class TCPDF
4079 Ln();
4070 Ln();
4080
4071
4081 when 'td','th'
4072 when 'td','th'
4073 base_page = @page;
4074 base_x = @x;
4075 base_y = @y;
4076
4077 MultiCell(@tdwidth, @tdheight, unhtmlentities(@tdtext.strip), @tableborder, @tdalign, @tdfill, 1);
4078 tr_end = @t_cells[@table_id][@tr_id][@td_id]['j1'] + 1;
4079 if @max_td_page[tr_end].nil? or (@max_td_page[tr_end] < @page)
4080 @max_td_page[tr_end] = @page
4081 @max_td_y[tr_end] = @y
4082 elsif (@max_td_page[tr_end] == @page)
4083 @max_td_y[tr_end] = @y if @max_td_y[tr_end].nil? or (@max_td_y[tr_end] < @y)
4084 end
4085
4086 @page = base_page;
4087 @x = base_x + @tdwidth;
4088 @y = base_y;
4089 @tdtext = '';
4082 @tdbegin = false;
4090 @tdbegin = false;
4083 @tdwidth = 0;
4091 @tdwidth = 0;
4084 @tdheight = 0;
4092 @tdheight = 0;
@@ -4126,7 +4134,6 class TCPDF
4126 @l_margin -= 5;
4134 @l_margin -= 5;
4127 @r_margin -= 5;
4135 @r_margin -= 5;
4128 @tableborder=0;
4136 @tableborder=0;
4129 Ln();
4130 @table_id += 1;
4137 @table_id += 1;
4131
4138
4132 when 'strong'
4139 when 'strong'
General Comments 0
You need to be logged in to leave comments. Login now