'Extracts text properties from a style element.'

def extractTextProperties(self, style, parent=None):

    textProps = TextProps()
    if parent:
        parentProp = self.textStyles.get(parent, None)
        if parentProp:
            textProp = parentProp
    textPropEl = style.getElementsByTagName('style:text-properties')
    if (not textPropEl):
        return textProps
    textPropEl = textPropEl[0]
    textProps.setItalic(textPropEl.getAttribute('fo:font-style'))
    textProps.setBold(textPropEl.getAttribute('fo:font-weight'))
    textProps.setUnderlined(textPropEl.getAttribute('style:text-underline-style'))
    textProps.setStrikethrough(textPropEl.getAttribute('style:text-line-through-style'))
    textProps.setPosition(textPropEl.getAttribute('style:text-position'))
    if (textPropEl.getAttribute('style:font-name') in self.fixedFonts):
        textProps.setFixed(True)
    return textProps
