[LyX/master] Hint to deleted included file in ct output (#11809)

Juergen Spitzmueller spitz at lyx.org
Thu Jan 7 11:09:13 UTC 2021


commit 6430931e2777d6b324d14cd53cd148913efcb0a3
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Jan 7 12:08:59 2021 +0100

    Hint to deleted included file in ct output (#11809)
---
 src/insets/InsetInclude.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 71e9d38..284f4c1 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -563,6 +563,16 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
 	FileName const included_file = includedFileName(buffer(), params());
 	Buffer const * const masterBuffer = buffer().masterBuffer();
 
+	if (runparams.inDeletedInset) {
+		// We cannot strike-out whole children,
+		// so we just output a note.
+		os << "\\textbf{"
+		   << bformat(buffer().B_("[INCLUDED FILE %1$s DELETED!]"),
+			      from_utf8(included_file.onlyFileName()))
+		   << "}";
+		return;
+	}
+
 	// if incfile is relative, make it relative to the master
 	// buffer directory.
 	if (!FileName::isAbsolute(incfile)) {


More information about the lyx-cvs mailing list