[Spreadsheet] Remove prepended apostrophe if cell content is copied into clipboard (#19781)

* [Spreadsheet] Remove prepended apostrophe if cell content is copied into
clipboard

Closes #10058.
This commit is contained in:
xtemp09
2025-02-27 10:27:55 +07:00
committed by GitHub
parent f2b43399ff
commit 0f68c0403a

View File

@@ -714,6 +714,10 @@ void SheetTableView::_copySelection(const std::vector<App::Range>& ranges, bool
for (int j = minCol; j <= maxCol; j++) {
QModelIndex index = model()->index(i, j);
QString cell = index.data(Qt::EditRole).toString();
if (!cell.isEmpty() && cell.at(0) == QLatin1Char('\'')) {
cell.remove(0, 1);
}
if (j < maxCol) {
cell.append(QChar::fromLatin1('\t'));
}