Exemplo n.º 1
0
 def do_xf(self, elem):
     if self.xf_type != 1:
         #### ignoring style XFs for the moment
         return
     xfx = self.xf_counts[self.xf_type]
     self.xf_counts[self.xf_type] = xfx + 1
     xf = XF()
     self.bk.xf_list.append(xf)
     self.bk.xfcount += 1
     numFmtId = int(elem.get("numFmtId", "0"))
     xf.format_key = numFmtId
     is_date = self.fmt_is_date.get(numFmtId, 0)
     self.bk._xf_index_to_xl_type_map[xfx] = is_date + 2
     if self.verbosity >= 3:
         self.dumpout("xfx=%d numFmtId=%d", xfx, numFmtId)
         self.dumpout(repr(self.bk._xf_index_to_xl_type_map))
Exemplo n.º 2
0
 def __init__(self,
              formatting_info=0,
              ragged_rows=False,
              ):
     Book.__init__(self)
     self.ragged_rows = ragged_rows
     self.formatting_info=formatting_info
     self.initialise_format_info()
     if formatting_info:
         f = Font()
         self.font_list.append(f)
         self.format_map[0]= Format(0,FUN,u'General')
         xf = XF()
         xf.alignment = XFAlignment()
         xf.border = XFBorder()
         xf.background = XFBackground()
         xf.protection = XFProtection()
         self.xf_list.append(xf)
Exemplo n.º 3
0
 def do_xf(self, elem):
     if self.xf_type != 1:
         #### ignoring style XFs for the moment
         return
     xfx = self.xf_counts[self.xf_type]
     self.xf_counts[self.xf_type] = xfx + 1
     xf = XF()
     self.bk.xf_list.append(xf)
     self.bk.xfcount += 1
     numFmtId = int(elem.get('numFmtId', '0'))
     xf.format_key = numFmtId
     is_date = self.fmt_is_date.get(numFmtId, 0)
     self.bk._xf_index_to_xl_type_map[xfx] = is_date + 2
     if self.verbosity >= 3:
         self.dumpout(
             'xfx=%d numFmtId=%d',
             xfx, numFmtId,
             )
         self.dumpout(repr(self.bk._xf_index_to_xl_type_map))
Exemplo n.º 4
0
 def __init__(self,
              formatting_info=0,
              ragged_rows=False,
              ):
     Book.__init__(self)
     self.ragged_rows = ragged_rows
     self.formatting_info=formatting_info
     self.initialise_format_info()
     if formatting_info:
         f = Font()
         self.font_list.append(f)
         self.format_map[0]= Format(0,FUN,u'General')
         xf = XF()
         xf.alignment = XFAlignment()
         xf.border = XFBorder()
         xf.background = XFBackground()
         xf.protection = XFProtection()
         self.xf_list.append(xf)