1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

Spreadsheet: Show the error (if any) in csv import dialog's preview

...and don't try to read from a CSV that has errors.
Fixes #5942.
This commit is contained in:
AnotherTest 2021-03-25 10:25:24 +04:30 committed by Andreas Kling
parent bbf6847d50
commit 102065a8a9
6 changed files with 43 additions and 14 deletions

View file

@ -97,12 +97,7 @@ CSVExportDialogPage::CSVExportDialogPage(const Sheet& sheet)
m_data_preview_text_editor->set_should_hide_unnecessary_scrollbars(true);
Vector<String> quote_escape_items {
// Note: Keep in sync with Writer::WriterTraits::QuoteEscape.
"Repeat",
"Backslash",
};
m_quote_escape_combo_box->set_model(GUI::ItemListModel<String>::create(quote_escape_items));
m_quote_escape_combo_box->set_model(GUI::ItemListModel<String>::create(m_quote_escape_items));
// By default, use commas, double quotes with repeat, disable headers, and quote only the fields that require quoting.
m_delimiter_comma_radio->set_checked(true);