| 80 | } |
| 81 | |
| 82 | void AssExporter::Export(agi::fs::path const& filename, const char *charset, wxWindow *export_dialog) { |
| 83 | AssFile subs(*c->ass); |
| 84 | |
| 85 | for (auto filter : filters) { |
| 86 | filter->LoadSettings(is_default, c); |
| 87 | filter->ProcessSubs(&subs, export_dialog); |
| 88 | } |
| 89 | |
| 90 | const SubtitleFormat *writer = SubtitleFormat::GetWriter(filename); |
| 91 | if (!writer) |
| 92 | throw agi::InvalidInputException("Unknown file type."); |
| 93 | |
| 94 | writer->ExportFile(&subs, filename, c->project->Timecodes(), charset); |
| 95 | } |
| 96 | |
| 97 | wxSizer *AssExporter::GetSettingsSizer(std::string const& name) { |
| 98 | auto pos = Sizers.find(name); |
no test coverage detected