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