]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetInclude.cpp
Translations for listings insets
[features.git] / src / insets / InsetInclude.cpp
index 42b4d8f652f424297ebf19d625f8d0d231b5457a..c4a437bc195a5a6c6e681d7d493a16597bb21722 100644 (file)
@@ -624,7 +624,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
                runparams.par_begin = 0;
                runparams.par_end = tmp->paragraphs().size();
                if (!tmp->makeLaTeXFile(tmpwritefile, masterFileName(buffer()).
-                               onlyPath().absFileName(), runparams, false)) {
+                               onlyPath().absFileName(), runparams, Buffer::OnlyBody)) {
                        docstring msg = bformat(_("Included file `%1$s' "
                                        "was not exported correctly.\nWarning: "
                                        "LaTeX export is probably incomplete."),
@@ -793,7 +793,7 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const
        if (all_pars) {
                op.par_begin = 0;
                op.par_end = 0;
-               ibuf->writeLyXHTMLSource(xs.os(), op, true);
+               ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::OnlyBody);
        } else
                xs << XHTMLStream::ESCAPE_NONE 
                   << "<!-- Included file: " 
@@ -863,7 +863,7 @@ int InsetInclude::docbook(odocstream & os, OutputParams const & runparams) const
                LYXERR(Debug::LATEX, "exportfile:" << exportfile);
                LYXERR(Debug::LATEX, "writefile:" << writefile);
 
-               tmp->makeDocBookFile(writefile, runparams, true);
+               tmp->makeDocBookFile(writefile, runparams, Buffer::OnlyBody);
        }
 
        runparams.exportdata->addExternalFile("docbook", writefile,
@@ -905,6 +905,7 @@ void InsetInclude::validate(LaTeXFeatures & features) const
 
        features.includeFile(include_label, writefile);
 
+       features.useInsetLayout(getLayout());
        if (isVerbatim(params()))
                features.require("verbatim");
        else if (isListings(params()))
@@ -997,6 +998,13 @@ Inset::DisplayType InsetInclude::display() const
 }
 
 
+docstring InsetInclude::layoutName() const
+{
+       if (isListings(params()))
+               return from_ascii("IncludeListings");
+       return InsetCommand::layoutName();
+}
+
 
 //
 // preview stuff