* Code style cleanup.
* Make WaitForExportThread() available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006-2007, Haiku. All rights reserved.
|
* Copyright 2006-2007, 2011, Stephan Aßmus <[email protected]>.
|
||||||
* Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
|
||||||
* Authors:
|
|
||||||
* Stephan Aßmus <[email protected]>
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SimpleFileSaver.h"
|
#include "SimpleFileSaver.h"
|
||||||
|
|
||||||
#include "Exporter.h"
|
#include "Exporter.h"
|
||||||
|
|
||||||
// constructor
|
|
||||||
SimpleFileSaver::SimpleFileSaver(Exporter* exporter,
|
SimpleFileSaver::SimpleFileSaver(Exporter* exporter,
|
||||||
const entry_ref& ref)
|
const entry_ref& ref)
|
||||||
: FileSaver(ref),
|
: FileSaver(ref),
|
||||||
@@ -18,16 +17,22 @@ SimpleFileSaver::SimpleFileSaver(Exporter* exporter,
|
|||||||
fExporter->SetSelfDestroy(false);
|
fExporter->SetSelfDestroy(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
|
||||||
SimpleFileSaver::~SimpleFileSaver()
|
SimpleFileSaver::~SimpleFileSaver()
|
||||||
{
|
{
|
||||||
delete fExporter;
|
delete fExporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save
|
|
||||||
status_t
|
status_t
|
||||||
SimpleFileSaver::Save(Document* document)
|
SimpleFileSaver::Save(Document* document)
|
||||||
{
|
{
|
||||||
return fExporter->Export(document, fRef);
|
return fExporter->Export(document, fRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SimpleFileSaver::WaitForExportThread()
|
||||||
|
{
|
||||||
|
fExporter->WaitForExportThread();
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,27 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006-2007, Haiku. All rights reserved.
|
* Copyright 2006-2007, 2011, Stephan Aßmus <[email protected]>.
|
||||||
* Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*
|
|
||||||
* Authors:
|
|
||||||
* Stephan Aßmus <[email protected]>
|
|
||||||
*/
|
*/
|
||||||
#ifndef SIMPLE_FILE_SAVER_H
|
#ifndef SIMPLE_FILE_SAVER_H
|
||||||
#define SIMPLE_FILE_SAVER_H
|
#define SIMPLE_FILE_SAVER_H
|
||||||
|
|
||||||
|
|
||||||
#include "FileSaver.h"
|
#include "FileSaver.h"
|
||||||
|
|
||||||
|
|
||||||
class Exporter;
|
class Exporter;
|
||||||
|
|
||||||
|
|
||||||
class SimpleFileSaver : public FileSaver {
|
class SimpleFileSaver : public FileSaver {
|
||||||
public:
|
public:
|
||||||
SimpleFileSaver(Exporter* exporter,
|
SimpleFileSaver(Exporter* exporter,
|
||||||
const entry_ref& ref);
|
const entry_ref& ref);
|
||||||
virtual ~SimpleFileSaver();
|
virtual ~SimpleFileSaver();
|
||||||
|
|
||||||
virtual status_t Save(Document* document);
|
virtual status_t Save(Document* document);
|
||||||
|
|
||||||
private:
|
void WaitForExportThread();
|
||||||
|
|
||||||
|
private:
|
||||||
Exporter* fExporter;
|
Exporter* fExporter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // SIMPLE_FILE_SAVER_H
|
#endif // SIMPLE_FILE_SAVER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user