1 /* 2 * Copyright 2006-2007, 2011, Stephan Aßmus <superstippi@gmx.de>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 6 7 #include "SimpleFileSaver.h" 8 9 #include "Exporter.h" 10 11 12 SimpleFileSaver::SimpleFileSaver(Exporter* exporter, 13 const entry_ref& ref) 14 : FileSaver(ref), 15 fExporter(exporter) 16 { 17 fExporter->SetSelfDestroy(false); 18 } 19 20 21 SimpleFileSaver::~SimpleFileSaver() 22 { 23 delete fExporter; 24 } 25 26 27 status_t 28 SimpleFileSaver::Save(Document* document) 29 { 30 return fExporter->Export(document, fRef); 31 } 32 33 34 void 35 SimpleFileSaver::WaitForExportThread() 36 { 37 fExporter->WaitForExportThread(); 38 } 39