Esempio n. 1
0
bool UnderOverElement::readMathMLContent( const KoXmlElement& parent )
{
    QString name = parent.tagName().toLower();
    BasicElement* tmpElement = 0;
    KoXmlElement tmp;
    forEachElement( tmp, parent ) { 
        tmpElement = ElementFactory::createElement( tmp.tagName(), this );
        if( !tmpElement->readMathML( tmp ) )
            return false;

        if( m_baseElement->elementType() == Basic ) {
            delete m_baseElement; 
            m_baseElement = tmpElement;
        }
        else if( name.contains( "under" ) && m_underElement->elementType() == Basic ) {
            delete m_underElement;
            m_underElement = tmpElement;
        }
        else if( name.contains( "over" ) && m_overElement->elementType() == Basic ) {
            delete m_overElement;
            m_overElement = tmpElement;
        }
        else
            return false;
    }
Esempio n. 2
0
bool TableRowElement::readMathMLContent( const KoXmlElement& element )
{
    BasicElement* tmpElement = 0;
    KoXmlElement tmp;
    forEachElement( tmp, element ) {
        tmpElement = ElementFactory::createElement( tmp.tagName(), this );
        if (tmpElement->elementType() != TableData)
            return false;

        m_data << static_cast<TableDataElement*>( tmpElement );
        tmpElement->readMathML( tmp );
    }