Restore XHTML output for InsetInclude.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32249 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-11-30 17:34:01 +00:00
parent ef1f575e25
commit 304f884930
2 changed files with 7 additions and 6 deletions

View File

@ -33,6 +33,7 @@
#include "LyXRC.h" #include "LyXRC.h"
#include "Lexer.h" #include "Lexer.h"
#include "MetricsInfo.h" #include "MetricsInfo.h"
#include "output_xhtml.h"
#include "OutputParams.h" #include "OutputParams.h"
#include "TextClass.h" #include "TextClass.h"
#include "TocBackend.h" #include "TocBackend.h"
@ -631,7 +632,7 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
} }
docstring InsetInclude::xhtml(odocstream & os, OutputParams const &rp) const docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const &rp) const
{ {
if (rp.inComment) if (rp.inComment)
return docstring(); return docstring();
@ -641,11 +642,11 @@ docstring InsetInclude::xhtml(odocstream & os, OutputParams const &rp) const
bool const listing = isListings(params()); bool const listing = isListings(params());
if (listing || isVerbatim(params())) { if (listing || isVerbatim(params())) {
if (listing) if (listing)
os << "<pre>\n"; xs << StartTag("pre");
// FIXME: We don't know the encoding of the file, default to UTF-8. // FIXME: We don't know the encoding of the file, default to UTF-8.
os << includedFilename(buffer(), params()).fileContents("UTF-8"); xs << includedFilename(buffer(), params()).fileContents("UTF-8");
if (listing) if (listing)
os << "</pre>\n"; xs << EndTag("pre");
return docstring(); return docstring();
} }
@ -677,7 +678,7 @@ docstring InsetInclude::xhtml(odocstream & os, OutputParams const &rp) const
Buffer const * const ibuf = loadIfNeeded(); Buffer const * const ibuf = loadIfNeeded();
if (!ibuf) if (!ibuf)
return docstring(); return docstring();
ibuf->writeLyXHTMLSource(os, rp, true); ibuf->writeLyXHTMLSource(xs.os(), rp, true);
return docstring(); return docstring();
} }

View File

@ -80,7 +80,7 @@ public:
/// ///
int docbook(odocstream &, OutputParams const &) const; int docbook(odocstream &, OutputParams const &) const;
/// ///
docstring xhtml(odocstream &, OutputParams const &) const; docstring xhtml(XHTMLStream &, OutputParams const &) const;
/// ///
void validate(LaTeXFeatures &) const; void validate(LaTeXFeatures &) const;
/// ///