MathCell* MathParser::ParseIntTag(wxXmlNode* node) { IntCell *in = new IntCell; wxXmlNode* child = node->GetChildren(); in->SetHighlight(m_highlight); #if wxCHECK_VERSION(2,9,0) if (node->GetAttributes() == NULL) #else if (node->GetProperties() == NULL) #endif { in->SetIntStyle(INT_DEF); if (child) { in->SetUnder(ParseTag(child, false)); child = child->GetNext(); if (child) { in->SetOver(ParseTag(child, false)); child = child->GetNext(); if (child) { in->SetBase(ParseTag(child, false)); child = child->GetNext(); if (child) { in->SetVar(ParseTag(child, true)); in->SetType(m_ParserStyle); in->SetStyle(TS_VARIABLE); return in; } } } } } else { if (child) { in->SetBase(ParseTag(child, false)); child = child->GetNext(); if (child) { in->SetVar(ParseTag(child, true)); in->SetType(m_ParserStyle); in->SetStyle(TS_VARIABLE); return in; } } } delete in; return NULL; }
MathCell* IntCell::Copy() { IntCell *tmp = new IntCell; CopyData(this, tmp); tmp->SetBase(m_base->CopyList()); tmp->SetUnder(m_under->CopyList()); tmp->SetOver(m_over->CopyList()); tmp->SetVar(m_var->CopyList()); tmp->m_intStyle = m_intStyle; return tmp; }
MathCell* IntCell::Copy(bool all) { IntCell *tmp = new IntCell; CopyData(this, tmp); tmp->SetBase(m_base->Copy(true)); tmp->SetUnder(m_under->Copy(true)); tmp->SetOver(m_over->Copy(true)); tmp->SetVar(m_var->Copy(true)); tmp->m_intStyle = m_intStyle; if (all && m_next != NULL) tmp->AppendCell(m_next->Copy(all)); return tmp; }