! adds a new Matrix to the project. */
| 1998 | adds a new Matrix to the project. |
| 1999 | */ |
| 2000 | void MainWin::newMatrix() { |
| 2001 | Matrix* matrix = new Matrix(i18n("Matrix")); |
| 2002 | |
| 2003 | // if the current active window is a workbook or one of its children, |
| 2004 | // add the new matrix to the workbook |
| 2005 | auto* workbook = dynamic_cast<Workbook*>(m_currentAspect); |
| 2006 | if (!workbook) |
| 2007 | workbook = static_cast<Workbook*>(m_currentAspect->parent(AspectType::Workbook)); |
| 2008 | |
| 2009 | if (workbook) |
| 2010 | workbook->addChild(matrix); |
| 2011 | else |
| 2012 | this->addAspectToProject(matrix); |
| 2013 | } |
| 2014 | |
| 2015 | /*! |
| 2016 | adds a new Worksheet to the project. |
nothing calls this directly
no test coverage detected