=== modified file 'pod/actions.py' --- pod/actions.py 2009-07-10 13:01:50 +0000 +++ pod/actions.py 2009-11-18 17:20:33 +0000 @@ -91,6 +91,12 @@ self.writeError(FROM_EVAL_ERROR % self.fromExpr) errorOccurred = True if not errorOccurred: + if isinstance(self.elem, Text) and \ + 'text:style-name' in self.elem.attrs and \ + self.fromExprResult.startswith(''): + self.fromExprResult = self.fromExprResult.replace( + '', + '' % self.elem.attrs.get('text:style-name')) self.result.write(self.fromExprResult) class IfAction(BufferAction): === modified file 'pod/elements.py' --- pod/elements.py 2009-06-29 12:06:01 +0000 +++ pod/elements.py 2009-11-18 17:10:17 +0000 @@ -32,7 +32,11 @@ def create(elem): '''Used to create any POD elem that has a equivalent OD element. Not for creating expressions, for example.''' - return eval(PodElement.OD_TO_POD[elem])() + t = eval(PodElement.OD_TO_POD[elem.name])() + t.attrs = {} + for attr_name, attr_value in elem.attrs.items(): + t.attrs[attr_name] = attr_value + return t create = staticmethod(create) class Text(PodElement): === modified file 'pod/pod_parser.py' --- pod/pod_parser.py 2009-06-29 12:06:01 +0000 +++ pod/pod_parser.py 2009-11-18 17:03:03 +0000 @@ -218,7 +218,7 @@ if elem in e.impactableElements: if e.mode == e.ADD_IN_SUBBUFFER: e.addSubBuffer() - e.currentBuffer.addElement(e.currentElem.name) + e.currentBuffer.addElement(e.currentElem) e.currentBuffer.dumpStartElement(elem, attrs) elif e.state == e.READING_STATEMENT: pass