! insert one column with whitespaces surrounding the actual values. the whitespaces have to be removed, one single column is processed only. */
| 312 | the whitespaces have to be removed, one single column is processed only. |
| 313 | */ |
| 314 | void SpreadsheetTest::testCopyPasteColumnMode07() { |
| 315 | QLocale::setDefault(QLocale::C); // . as decimal separator |
| 316 | Spreadsheet sheet(QStringLiteral("test"), false); |
| 317 | sheet.setColumnCount(1); |
| 318 | sheet.setRowCount(100); |
| 319 | |
| 320 | const QString str = QStringLiteral(" 10 \n 20 \n"); |
| 321 | QApplication::clipboard()->setText(str); |
| 322 | |
| 323 | SpreadsheetView view(&sheet, false); |
| 324 | view.pasteIntoSelection(); |
| 325 | |
| 326 | // spreadsheet size and column mode |
| 327 | QCOMPARE(sheet.columnCount(), 1); |
| 328 | QCOMPARE(sheet.rowCount(), 100); |
| 329 | QCOMPARE(sheet.column(0)->columnMode(), AbstractColumn::ColumnMode::Integer); |
| 330 | |
| 331 | // values |
| 332 | QCOMPARE(sheet.column(0)->integerAt(0), 10); |
| 333 | QCOMPARE(sheet.column(0)->integerAt(1), 20); |
| 334 | } |
| 335 | |
| 336 | //********************************************************** |
| 337 | //********* Handling of spreadsheet size changes *********** |
nothing calls this directly
no test coverage detected