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

Spreadsheet: Port ExportDialog to Core::Stream

This commit is contained in:
Karol Kosek 2022-12-26 23:55:00 +01:00 committed by Ali Mohammad Pur
parent 3a8450ae11
commit e9d73a6256
3 changed files with 8 additions and 13 deletions

View file

@ -68,8 +68,10 @@ ErrorOr<void> Workbook::write_to_file(Core::File& file)
{
auto mime = Core::guess_mime_type_based_on_filename(file.filename());
auto file_stream = TRY(Core::Stream::File::adopt_fd(file.leak_fd(), Core::Stream::OpenMode::Write));
// Make an export dialog, we might need to import it.
TRY(ExportDialog::make_and_run_for(mime, file, *this));
TRY(ExportDialog::make_and_run_for(mime, move(file_stream), file.filename(), *this));
set_filename(file.filename());
set_dirty(false);