From 93a612220ed4ce604c864b72b14efc59e8ce6683 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 30 Jul 2016 23:48:27 -0400 Subject: [PATCH] Fix preview of external material with plaintext and DocBook. --- src/insets/InsetExternal.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 1a19748041..5f2a1b308e 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -730,11 +730,12 @@ int InsetExternal::plaintext(odocstringstream & os, if (runparams.for_tooltip) return 0; + bool const external_in_tmpdir = !runparams.nice; + bool const dryrun = runparams.dryrun || runparams.inComment; otexstream ots(os, false); ots << '\n'; // output external material on a new line external::writeExternal(params_, "Ascii", buffer(), ots, - *(runparams.exportdata), false, - runparams.dryrun || runparams.inComment); + *(runparams.exportdata), external_in_tmpdir, dryrun); return PLAINTEXT_NEWLINE; } @@ -742,11 +743,12 @@ int InsetExternal::plaintext(odocstringstream & os, int InsetExternal::docbook(odocstream & os, OutputParams const & runparams) const { + bool const external_in_tmpdir = !runparams.nice; + bool const dryrun = runparams.dryrun || runparams.inComment; odocstringstream ods; otexstream ots(ods, false); external::writeExternal(params_, "DocBook", buffer(), ots, - *(runparams.exportdata), false, - runparams.dryrun || runparams.inComment); + *(runparams.exportdata), external_in_tmpdir, dryrun); os << ods.str(); return int(count(ods.str().begin(), ods.str().end(), '\n')); }