1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

Spreadsheet: Remove unused Workbook::load() function

This commit is contained in:
Karol Kosek 2022-05-22 12:09:14 +02:00 committed by Ali Mohammad Pur
parent 01824fd19a
commit d877c2fcd6
2 changed files with 0 additions and 16 deletions

View file

@ -64,21 +64,6 @@ Result<bool, String> Workbook::open_file(Core::File& file)
return true; return true;
} }
Result<bool, String> Workbook::load(StringView filename)
{
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(&m_parent_window, filename);
if (response.is_error()) {
StringBuilder sb;
sb.append("Failed to open ");
sb.append(filename);
sb.append(" for reading. Error: ");
sb.appendff("{}", response.error());
return sb.to_string();
}
return open_file(*response.value());
}
Result<bool, String> Workbook::save(StringView filename) Result<bool, String> Workbook::save(StringView filename)
{ {
auto mime = Core::guess_mime_type_based_on_filename(filename); auto mime = Core::guess_mime_type_based_on_filename(filename);

View file

@ -18,7 +18,6 @@ public:
Workbook(NonnullRefPtrVector<Sheet>&& sheets, GUI::Window& parent_window); Workbook(NonnullRefPtrVector<Sheet>&& sheets, GUI::Window& parent_window);
Result<bool, String> save(StringView filename); Result<bool, String> save(StringView filename);
Result<bool, String> load(StringView filename);
Result<bool, String> open_file(Core::File&); Result<bool, String> open_file(Core::File&);
String const& current_filename() const { return m_current_filename; } String const& current_filename() const { return m_current_filename; }