mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-21 07:12:10 +00:00
* Buffer::doExport(): return early.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22550 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
59c8ede0a3
commit
c15b2f6e1a
@ -2467,9 +2467,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
|
|||||||
if (!success)
|
if (!success)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (put_in_tempdir)
|
if (put_in_tempdir) {
|
||||||
result_file = tmp_result_file.absFilename();
|
result_file = tmp_result_file.absFilename();
|
||||||
else {
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
result_file = changeExtension(absFileName(), ext);
|
result_file = changeExtension(absFileName(), ext);
|
||||||
// We need to copy referenced files (e. g. included graphics
|
// We need to copy referenced files (e. g. included graphics
|
||||||
// if format == "dvi") to the result dir.
|
// if format == "dvi") to the result dir.
|
||||||
@ -2479,8 +2481,7 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
|
|||||||
CopyStatus status = SUCCESS;
|
CopyStatus status = SUCCESS;
|
||||||
for (vector<ExportedFile>::const_iterator it = files.begin();
|
for (vector<ExportedFile>::const_iterator it = files.begin();
|
||||||
it != files.end() && status != CANCEL; ++it) {
|
it != files.end() && status != CANCEL; ++it) {
|
||||||
string const fmt =
|
string const fmt = formats.getFormatFromFile(it->sourceName);
|
||||||
formats.getFormatFromFile(it->sourceName);
|
|
||||||
status = copyFile(fmt, it->sourceName,
|
status = copyFile(fmt, it->sourceName,
|
||||||
makeAbsPath(it->exportName, dest),
|
makeAbsPath(it->exportName, dest),
|
||||||
it->exportName, status == FORCE);
|
it->exportName, status == FORCE);
|
||||||
@ -2501,7 +2502,6 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
|
|||||||
message(bformat(_("Document exported as %1$s"),
|
message(bformat(_("Document exported as %1$s"),
|
||||||
formats.prettyName(format)));
|
formats.prettyName(format)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user