[REM] unreachable code
authorXavier Morel <xmo@openerp.com>
Fri, 14 Dec 2012 12:46:06 +0000 (13:46 +0100)
committerXavier Morel <xmo@openerp.com>
Fri, 14 Dec 2012 12:46:06 +0000 (13:46 +0100)
bzr revid: xmo@openerp.com-20121214124606-nccvun2sf12gu7c7

openerp/report/pyPdf/pdf.py
openerp/report/render/rml2txt/rml2txt.py

index 5258e43..50317ef 100644 (file)
@@ -838,7 +838,6 @@ class PdfFileReader(object):
                 else:
                     # no xref table found at specified location
                     assert False
-                    break
 
     def _pairs(self, array):
         i = 0
index f86fee0..0237a2a 100755 (executable)
@@ -256,12 +256,10 @@ class _rml_tmpl_frame(_rml_tmpl_tag):
         self.posx = posx
     def tag_start(self):
         return "frame start"
-        return '<table border="0" width="%d"><tr><td width="%d">&nbsp;</td><td>' % (self.width+self.posx,self.posx)
     def tag_end(self):
         return True
     def tag_stop(self):
         return "frame stop"
-        return '</td></tr></table><br/>'
     def tag_mergeable(self):
         return False
 
@@ -283,24 +281,7 @@ class _rml_tmpl_draw_string(_rml_tmpl_tag):
 
     def tag_start(self):
         return "draw string \"%s\" @(%d,%d)..\n" %("txt",self.posx,self.posy)
-        self.pos.sort()
-        res = '\\table ...'
-        posx = 0
-        i = 0
-        for (x,y,align,txt, style, fs) in self.pos:
-            if align=="left":
-                pos2 = len(txt)*fs
-                res+='<td width="%d"></td><td style="%s" width="%d">%s</td>' % (x - posx, style, pos2, txt)
-                posx = x+pos2
-            if align=="right":
-                res+='<td width="%d" align="right" style="%s">%s</td>' % (x - posx, style, txt)
-                posx = x
-            if align=="center":
-                res+='<td width="%d" align="center" style="%s">%s</td>' % ((x - posx)*2, style, txt)
-                posx = 2*x-posx
-            i+=1
-        res+='\\table end'
-        return res
+
     def merge(self, ds):
         self.pos+=ds.pos
 
@@ -317,10 +298,6 @@ class _rml_tmpl_draw_lines(_rml_tmpl_tag):
 
     def tag_start(self):
         return "draw lines..\n"
-        if self.ok:
-            return '<table border="0" cellpadding="0" cellspacing="0" width="%d"><tr><td width="%d"></td><td><hr width="100%%" style="margin:0px; %s"></td></tr></table>' % (self.posx+self.width,self.posx,self.style)
-        else:
-            return ''
 
 class _rml_stylesheet(object):
     def __init__(self, stylesheet, doc):
@@ -457,11 +434,6 @@ class _rml_template(object):
     
     def end(self):
         return "template end\n"
-        result = ''
-        while not self.loop:
-            result += self.frame_start()
-            result += self.frame_stop()
-        return result
 
 class _rml_doc(object):
     def __init__(self, node, localcontext=None, images=None, path='.', title=None):