##// END OF EJS Templates
Fixes Chinese pdf export when the issue description is too long (#1170)....
Jean-Philippe Lang -
r1483:f4aa04b96e4b
parent child
Show More
@@ -189,7 +189,7 module PDF_Chinese
189 c=s[i]
189 c=s[i]
190 #Check if ASCII or MB
190 #Check if ASCII or MB
191 ascii=(c<128)
191 ascii=(c<128)
192 if(c=="\n")
192 if(c.chr=="\n")
193 #Explicit line break
193 #Explicit line break
194 Cell(w,h,s[j,i-j],b,2,align,fill)
194 Cell(w,h,s[j,i-j],b,2,align,fill)
195 i+=1
195 i+=1
@@ -209,12 +209,12 module PDF_Chinese
209 sep=i
209 sep=i
210 ls=l
210 ls=l
211 end
211 end
212 l+=ascii ? (cw[c.chr] || 0) : 1000
212 l+=ascii ? (cw[c.chr] || 0) : 1100
213 if(l>wmax)
213 if(l>wmax)
214 #Automatic line break
214 #Automatic line break
215 if(sep==-1 or i==j)
215 if(sep==-1 or i==j)
216 if(i==j)
216 if(i==j)
217 i+=ascii ? 1 : 2
217 i+=ascii ? 1 : 3
218 end
218 end
219 Cell(w,h,s[j,i-j],b,2,align,fill)
219 Cell(w,h,s[j,i-j],b,2,align,fill)
220 else
220 else
@@ -229,7 +229,7 module PDF_Chinese
229 b=b2
229 b=b2
230 end
230 end
231 else
231 else
232 i+=ascii ? 1 : 2
232 i+=ascii ? 1 : 3
233 end
233 end
234 end
234 end
235 #Last chunk
235 #Last chunk
@@ -265,7 +265,7 module PDF_Chinese
265 c=s[i]
265 c=s[i]
266 #Check if ASCII or MB
266 #Check if ASCII or MB
267 ascii=(c<128)
267 ascii=(c<128)
268 if(c=="\n")
268 if(c.chr=="\n")
269 #Explicit line break
269 #Explicit line break
270 Cell(w,h,s[j,i-j],0,2,'',0,link)
270 Cell(w,h,s[j,i-j],0,2,'',0,link)
271 i+=1
271 i+=1
@@ -283,7 +283,7 module PDF_Chinese
283 if(!ascii or c==' ')
283 if(!ascii or c==' ')
284 sep=i
284 sep=i
285 end
285 end
286 l+=ascii ? cw[c.chr] : 1000
286 l+=ascii ? cw[c.chr] : 1100
287 if(l>wmax)
287 if(l>wmax)
288 #Automatic line break
288 #Automatic line break
289 if(sep==-1 or i==j)
289 if(sep==-1 or i==j)
@@ -298,7 +298,7 module PDF_Chinese
298 next
298 next
299 end
299 end
300 if(i==j)
300 if(i==j)
301 i+=ascii ? 1 : 2
301 i+=ascii ? 1 : 3
302 end
302 end
303 Cell(w,h,s[j,i-j],0,2,'',0,link)
303 Cell(w,h,s[j,i-j],0,2,'',0,link)
304 else
304 else
@@ -315,7 +315,7 module PDF_Chinese
315 end
315 end
316 nl+=1
316 nl+=1
317 else
317 else
318 i+=ascii ? 1 : 2
318 i+=ascii ? 1 : 3
319 end
319 end
320 end
320 end
321 #Last chunk
321 #Last chunk
General Comments 0
You need to be logged in to leave comments. Login now