5317: Multi-line photo captions are not rendered correctly in output reports

patch from Adam Stein <adam@csh.rit.edu>


svn: r18760
This commit is contained in:
Paul Franklin 2012-01-22 04:03:29 +00:00
parent 927ea35db7
commit e5a490d5da
4 changed files with 6 additions and 3 deletions

View File

@ -546,6 +546,9 @@ class HtmlDoc(BaseDoc, TextDoc):
{'name' : name}) {'name' : name})
return return
if len(alt):
alt = '<br />'.join(alt)
if pos not in ["right", "left"] : if pos not in ["right", "left"] :
if len(alt): if len(alt):
self.htmllist[-1] += Html('div') + ( self.htmllist[-1] += Html('div') + (

View File

@ -1064,7 +1064,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
if len(alt): if len(alt):
self.cntnt.write( self.cntnt.write(
'%s' % alt + '%s' % '<text:line-break/>'.join(alt) +
'</text:p>' + '</text:p>' +
'</draw:text-box>' + '</draw:text-box>' +
'</draw:frame>' '</draw:frame>'

View File

@ -409,7 +409,7 @@ class RTFDoc(BaseDoc,TextDoc):
self.f.write('}}\\par\n') self.f.write('}}\\par\n')
if len(alt): if len(alt):
self.f.write('%s\n\\par\n' % alt) self.f.write('%s\n\\par\n' % '\\par'.join(alt))
def write_styled_note(self, styledtext, format, style_name, def write_styled_note(self, styledtext, format, style_name,
contains_html=False, links=False): contains_html=False, links=False):

View File

@ -1413,7 +1413,7 @@ links (like ODF) and write PDF from that format.
else: else:
style.set_right_margin(self.get_usable_width() - new_image._width) style.set_right_margin(self.get_usable_width() - new_image._width)
new_paragraph = GtkDocParagraph(style) new_paragraph = GtkDocParagraph(style)
new_paragraph.add_text(alt) new_paragraph.add_text('\n'.join(alt))
self._active_element.add_child(new_paragraph) self._active_element.add_child(new_paragraph)
# DrawDoc implementation # DrawDoc implementation