From 6875550973c82c11b1d565fad74ae753bd10c616 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 3 Jul 2011 20:59:03 +0000 Subject: [PATCH] Fix bug #7664. Forgot to deal with included files. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39242 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetInclude.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 94a996a81e..c74ec631aa 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -734,7 +734,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const } -docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const &rp) const +docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const { if (rp.inComment) return docstring(); @@ -778,7 +778,23 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const &rp) const Buffer const * const ibuf = loadIfNeeded(); if (!ibuf) return docstring(); - ibuf->writeLyXHTMLSource(xs.os(), rp, true); + + // are we generating only some paragraphs, or all of them? + bool const all_pars = !rp.dryrun || + (rp.par_begin == 0 && + rp.par_end == (int)buffer().text().paragraphs().size()); + + OutputParams op = rp; + if (all_pars) { + op.par_begin = 0; + op.par_end = 0; + ibuf->writeLyXHTMLSource(xs.os(), op, true); + } else + xs << XHTMLStream::ESCAPE_NONE + << ""; return docstring(); } -- 2.39.2