X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetInclude.cpp;h=87d2e5103d0dd913d5df419807fe1b93fa7fcf10;hb=ba738d0167bcea87df47f49b1bc90b04ae4dbd68;hp=be823a77d56e243f7092fa31fe9de4b640c108af;hpb=e4da31452273caeed7eabe7132f53201f44d5398;p=features.git diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index be823a77d5..87d2e5103d 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -65,8 +65,6 @@ #include "support/mutex.h" #include "support/ExceptionMessage.h" -#include "support/bind.h" - using namespace std; using namespace lyx::support; @@ -446,12 +444,6 @@ docstring InsetInclude::screenLabel() const } -Buffer * InsetInclude::getChildBuffer() const -{ - return loadIfNeeded(); -} - - Buffer * InsetInclude::loadIfNeeded() const { // This is for background export and preview. We don't even want to @@ -945,7 +937,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const } -docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const +docstring InsetInclude::xhtml(XMLStream & xs, OutputParams const & rp) const { if (rp.inComment) return docstring(); @@ -955,11 +947,11 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const bool const listing = isListings(params()); if (listing || isVerbatim(params())) { if (listing) - xs << html::StartTag("pre"); + xs << xml::StartTag("pre"); // FIXME: We don't know the encoding of the file, default to UTF-8. xs << includedFileName(buffer(), params()).fileContents("UTF-8"); if (listing) - xs << html::EndTag("pre"); + xs << xml::EndTag("pre"); return docstring(); } @@ -996,10 +988,10 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const op.par_end = 0; ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile); } else - xs << XHTMLStream::ESCAPE_NONE + xs << XMLStream::ESCAPE_NONE << ""; return docstring(); @@ -1232,9 +1224,9 @@ string InsetInclude::contextMenuName() const } -Inset::DisplayType InsetInclude::display() const +Inset::RowFlags InsetInclude::rowFlags() const { - return type(params()) == INPUT ? Inline : AlignCenter; + return type(params()) == INPUT ? Inline : Display; } @@ -1330,7 +1322,7 @@ void InsetInclude::addToToc(DocIterator const & cpit, bool output_active, b.pushItem(cpit, screenLabel(), output_active); b.pop(); } else { - Buffer const * const childbuffer = getChildBuffer(); + Buffer const * const childbuffer = loadIfNeeded(); TocBuilder & b = backend.builder("child"); docstring str = childbuffer ? childbuffer->fileName().displayName() @@ -1386,7 +1378,7 @@ void InsetInclude::updateCommand() void InsetInclude::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted) { file_exist_ = includedFileExist(); - Buffer const * const childbuffer = getChildBuffer(); + Buffer const * const childbuffer = loadIfNeeded(); if (childbuffer) { if (!checkForRecursiveInclude(childbuffer)) childbuffer->updateBuffer(Buffer::UpdateChildOnly, utype);