xref: /haiku/src/apps/icon-o-matic/document/savers/SimpleFileSaver.cpp (revision 1acbe440b8dd798953bec31d18ee589aa3f71b73)
1 /*
2  * Copyright 2006, 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 
9 #include "SimpleFileSaver.h"
10 
11 #include "Exporter.h"
12 
13 // constructor
14 SimpleFileSaver::SimpleFileSaver(Exporter* exporter,
15 								 const entry_ref& ref)
16 	: FileSaver(ref),
17 	  fExporter(exporter)
18 {
19 	fExporter->SetSelfDestroy(false);
20 }
21 
22 // destructor
23 SimpleFileSaver::~SimpleFileSaver()
24 {
25 	delete fExporter;
26 }
27 
28 // Save
29 status_t
30 SimpleFileSaver::Save(Document* document)
31 {
32 	return fExporter->Export(document, fRef);
33 }
34 
35