MathCell* SubCell::Copy() { SubCell* tmp = new SubCell; CopyData(this, tmp); tmp->SetBase(m_baseCell->CopyList()); tmp->SetIndex(m_indexCell->CopyList()); return tmp; }
MathCell* SubCell::Copy(bool all) { SubCell* tmp = new SubCell; CopyData(this, tmp); tmp->SetBase(m_baseCell->Copy(true)); tmp->SetIndex(m_indexCell->Copy(true)); if (all && m_next != NULL) tmp->AppendCell(m_next->Copy(all)); return tmp; }
MathCell* MathParser::ParseSubTag(wxXmlNode* node) { SubCell *sub = new SubCell; wxXmlNode* child = node->GetChildren(); if (child) { sub->SetBase(ParseTag(child, false)); child = child->GetNext(); if (child) { MathCell* index = ParseTag(child, false); index->SetExponentFlag(); sub->SetIndex(index); sub->SetType(m_ParserStyle); sub->SetStyle(TS_VARIABLE); return sub; } } delete sub; return NULL; }