/** copy file \p sourceFile to \p destFile. If \p force is false, the user
* will be asked before existing files are overwritten.
- * \return
+ * \return
* - SUCCESS if this file got copied
* - FORCE if subsequent calls should not ask for confirmation before
* overwriting files anymore.
* - CANCEL if the export should be cancelled
*/
CopyStatus copyFile(string const & sourceFile, string const & destFile,
- bool force)
+ bool force)
{
CopyStatus ret = force ? FORCE : SUCCESS;
OutputParams runparams;
runparams.flavor = OutputParams::LATEX;
runparams.linelen = lyxrc.ascii_linelen;
- ExportData exportdata;
- runparams.exportdata = &exportdata;
vector<string> backends = Backends(*buffer);
if (find(backends.begin(), backends.end(), format) == backends.end()) {
for (vector<string>::const_iterator it = backends.begin();
formats.extension(format));
// We need to copy referenced files (e. g. included graphics
// if format == "dvi") to the result dir.
- vector<ExportedFile> const files = exportdata.externalFiles(format);
+ vector<ExportedFile> const files =
+ runparams.exportdata->externalFiles(format);
string const dest = OnlyPath(result_file);
CopyStatus status = SUCCESS;
for (vector<ExportedFile>::const_iterator it = files.begin();
void ExportData::addExternalFile(string const & format,
- string const & sourceName,
- string const & exportName)
+ string const & sourceName,
+ string const & exportName)
{
BOOST_ASSERT(lyx::support::AbsolutePath(sourceName));
void ExportData::addExternalFile(string const & format,
- string const & sourceName)
+ string const & sourceName)
{
addExternalFile(format, sourceName, OnlyFilename(sourceName));
}