| 141 | } |
| 142 | |
| 143 | void WorkbookView::showTabContextMenu(QPoint point) { |
| 144 | QMenu* menu = nullptr; |
| 145 | auto* aspect = m_workbook->child<AbstractAspect>(m_tabWidget->currentIndex()); |
| 146 | auto* spreadsheet = dynamic_cast<Spreadsheet*>(aspect); |
| 147 | if (spreadsheet) { |
| 148 | menu = spreadsheet->createContextMenu(); |
| 149 | } else { |
| 150 | Matrix* matrix = dynamic_cast<Matrix*>(aspect); |
| 151 | if (matrix) |
| 152 | menu = matrix->createContextMenu(); |
| 153 | } |
| 154 | |
| 155 | if (menu) |
| 156 | menu->exec(m_tabWidget->mapToGlobal(point)); |
| 157 | } |
| 158 | |
| 159 | void WorkbookView::addMatrix() { |
| 160 | Matrix* matrix = new Matrix(i18n("Matrix")); |
nothing calls this directly
no test coverage detected