src/reportlab/platypus/paraparser.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3731 b233dd0577ff
equal deleted inserted replaced
3722:29c11b905751 3723:99aa837b6703
   216 _addAttributeNames(_bulletAttrMap)
   216 _addAttributeNames(_bulletAttrMap)
   217 _addAttributeNames(_anchorAttrMap)
   217 _addAttributeNames(_anchorAttrMap)
   218 _addAttributeNames(_linkAttrMap)
   218 _addAttributeNames(_linkAttrMap)
   219 
   219 
   220 def _applyAttributes(obj, attr):
   220 def _applyAttributes(obj, attr):
   221     for k, v in list(attr.items()):
   221     for k, v in attr.items():
   222         if type(v) is TupleType and v[0]=='relative':
   222         if type(v) is TupleType and v[0]=='relative':
   223             #AR 20/5/2000 - remove 1.5.2-ism
   223             #AR 20/5/2000 - remove 1.5.2-ism
   224             #v = v[1]+getattr(obj,k,0)
   224             #v = v[1]+getattr(obj,k,0)
   225             if hasattr(obj, k):
   225             if hasattr(obj, k):
   226                 v = v[1]+getattr(obj,k)
   226                 v = v[1]+getattr(obj,k)
   970         self._stack.append(frag)
   970         self._stack.append(frag)
   971 
   971 
   972     def _pop(self,**kw):
   972     def _pop(self,**kw):
   973         frag = self._stack[-1]
   973         frag = self._stack[-1]
   974         del self._stack[-1]
   974         del self._stack[-1]
   975         for k, v in list(kw.items()):
   975         for k, v in kw.items():
   976             assert getattr(frag,k)==v
   976             assert getattr(frag,k)==v
   977         return frag
   977         return frag
   978 
   978 
   979     def getAttributes(self,attr,attrMap):
   979     def getAttributes(self,attr,attrMap):
   980         A = {}
   980         A = {}
   981         for k, v in list(attr.items()):
   981         for k, v in attr.items():
   982             if not self.caseSensitive:
   982             if not self.caseSensitive:
   983                 k = string.lower(k)
   983                 k = string.lower(k)
   984             if k in list(attrMap.keys()):
   984             if k in list(attrMap.keys()):
   985                 j = attrMap[k]
   985                 j = attrMap[k]
   986                 func = j[1]
   986                 func = j[1]