- Let all doExport calls honor maintain_unincluded_children
- Also don't let the behaviour depend on supplying the result_file parameter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40085
a592a061-630c-0410-9148-
cb99ea01b6c8
break;
case LFUN_BUFFER_EXPORT: {
break;
case LFUN_BUFFER_EXPORT: {
- ExportStatus const status = doExport(argument, false, false);
+ ExportStatus const status = doExport(argument, false);
dr.setError(status != ExportSuccess);
if (status != ExportSuccess)
dr.setMessage(bformat(_("Error exporting to format: %1$s."),
dr.setError(status != ExportSuccess);
if (status != ExportSuccess)
dr.setMessage(bformat(_("Error exporting to format: %1$s."),
}
case LFUN_BUILD_PROGRAM:
}
case LFUN_BUILD_PROGRAM:
- doExport("program", true, false);
+ doExport("program", true);
break;
case LFUN_BUFFER_CHKTEX:
break;
case LFUN_BUFFER_CHKTEX:
- doExport(format_name, true, false, filename);
+ doExport(format_name, true, filename);
}
// Substitute $$FName for filename
}
// Substitute $$FName for filename
-Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir) const
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir)
+ const
+{
+ string result_file;
+ return doExport(target, put_in_tempdir, result_file);
+}
+
+Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,
+ string & result_file) const
{
bool const update_unincluded =
params().maintain_unincluded_children
&& !params().getIncludedChildren().empty();
{
bool const update_unincluded =
params().maintain_unincluded_children
&& !params().getIncludedChildren().empty();
- return doExport(target, put_in_tempdir, update_unincluded);
+
+ // (1) export with all included children (omit \includeonly)
+ if (update_unincluded) {
+ ExportStatus const status =
+ doExport(target, put_in_tempdir, true, result_file);
+ if (status != ExportSuccess)
+ return status;
+ }
+ // (2) export with included children only
+ return doExport(target, put_in_tempdir, false, result_file);
-Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir,
- bool includeall) const
-{
- string result_file;
- // (1) export with all included children (omit \includeonly)
- if (includeall) {
- ExportStatus const status =
- doExport(target, put_in_tempdir, true, result_file);
- if (status != ExportSuccess)
- return status;
- }
- // (2) export with included children only
- return doExport(target, put_in_tempdir, false, result_file);
-}
-
-
Buffer::ExportStatus Buffer::preview(string const & format) const
{
bool const update_unincluded =
Buffer::ExportStatus Buffer::preview(string const & format) const
{
bool const update_unincluded =
string result_file;
// (1) export with all included children (omit \includeonly)
if (includeall) {
string result_file;
// (1) export with all included children (omit \includeonly)
if (includeall) {
- ExportStatus const status = doExport(format, true, true);
+ ExportStatus const status = doExport(format, true, true, result_file);
if (status != ExportSuccess)
return status;
}
if (status != ExportSuccess)
return status;
}
///
ExportStatus doExport(std::string const & target, bool put_in_tempdir) const;
///
///
ExportStatus doExport(std::string const & target, bool put_in_tempdir) const;
///
+ ExportStatus doExport(std::string const & target, bool put_in_tempdir,
+ std::string & result_file) const;
+ ///
ExportStatus preview(std::string const & format) const;
private:
ExportStatus preview(std::string const & format) const;
private: