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

Spreadsheet: Move to a non-owning model for Stream in Writer::XSV

This commit is contained in:
Lucas CHOLLET 2023-01-14 12:11:29 -05:00 committed by Ali Mohammad Pur
parent fc413711ee
commit 4952cdfe2b
5 changed files with 75 additions and 59 deletions

View file

@ -18,12 +18,16 @@ class Sheet;
class Workbook;
struct CSVExportDialogPage {
using XSV = Writer::XSV<Vector<Vector<DeprecatedString>>, Vector<DeprecatedString>>;
explicit CSVExportDialogPage(Sheet const&);
NonnullRefPtr<GUI::WizardPage> page() { return *m_page; }
ErrorOr<NonnullOwnPtr<XSV>> make_writer(Core::Stream::Handle<Core::Stream::Stream>);
enum class GenerationType {
Normal,
Preview
};
ErrorOr<void> generate(Core::Stream::Stream&, GenerationType);
protected:
void update_preview();