1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

Spreadsheet: Make file export functions return ErrorOr<>

This commit is contained in:
Karol Kosek 2022-12-31 15:38:12 +01:00 committed by Ali Mohammad Pur
parent 29a3cdcfb7
commit 5793f7749c
5 changed files with 59 additions and 68 deletions

View file

@ -64,7 +64,7 @@ Result<bool, DeprecatedString> Workbook::open_file(Core::File& file)
return true;
}
Result<bool, DeprecatedString> Workbook::write_to_file(Core::File& file)
ErrorOr<void> Workbook::write_to_file(Core::File& file)
{
auto mime = Core::guess_mime_type_based_on_filename(file.filename());
@ -73,7 +73,7 @@ Result<bool, DeprecatedString> Workbook::write_to_file(Core::File& file)
set_filename(file.filename());
set_dirty(false);
return true;
return {};
}
Result<bool, DeprecatedString> Workbook::import_file(Core::File& file)