diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-05-21 19:36:28 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-05-22 03:08:53 +0430 |
commit | 169498f9db0aa5c8808edefe49c2e7bcb2fb3b71 (patch) | |
tree | de149fc96f14b17b3526744f351bf718047ab6d7 /Userland/Applications/Spreadsheet | |
parent | f47bcddb5bf0f5edf3abffb2f0604a2f79a83ec6 (diff) | |
download | serenity-169498f9db0aa5c8808edefe49c2e7bcb2fb3b71.zip |
Spreadsheet: Recognize sheets files by mime type, not by file extension
These conditions weren't executed since 933a717f3b and always showed
a file import/export wizard.
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r-- | Userland/Applications/Spreadsheet/ExportDialog.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Spreadsheet/ImportDialog.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Spreadsheet/ExportDialog.cpp b/Userland/Applications/Spreadsheet/ExportDialog.cpp index 6139060904..37c8f2e72d 100644 --- a/Userland/Applications/Spreadsheet/ExportDialog.cpp +++ b/Userland/Applications/Spreadsheet/ExportDialog.cpp @@ -292,7 +292,7 @@ Result<void, String> ExportDialog::make_and_run_for(StringView mime, Core::File& if (mime == "text/csv") { return export_xsv(); - } else if (mime == "text/plain" && file.filename().ends_with(".sheets")) { + } else if (mime == "application/x-sheets+json") { return export_worksheet(); } else { auto page = GUI::WizardPage::construct( diff --git a/Userland/Applications/Spreadsheet/ImportDialog.cpp b/Userland/Applications/Spreadsheet/ImportDialog.cpp index 50d74c7089..3b5c794f65 100644 --- a/Userland/Applications/Spreadsheet/ImportDialog.cpp +++ b/Userland/Applications/Spreadsheet/ImportDialog.cpp @@ -245,7 +245,7 @@ Result<NonnullRefPtrVector<Sheet>, String> ImportDialog::make_and_run_for(GUI::W if (mime == "text/csv") { return import_xsv(); - } else if (mime == "text/plain" && file.filename().ends_with(".sheets")) { + } else if (mime == "application/x-sheets+json") { return import_worksheet(); } else { auto page = GUI::WizardPage::construct( |