X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph_pimpl.C;h=91d67776610bbff0ca207c5353890633543ae561;hb=69bee02a8901793b34ac5ca6d07e93910cef4005;hp=ab6c0080d7c17c645a4a50cd7bd9a448fee179e0;hpb=84a91f5ebfbf0601912fc56d56ea1bfb3f02214d;p=lyx.git diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index ab6c0080d7..91d6777661 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -20,10 +20,10 @@ #include "encoding.h" #include "language.h" #include "LaTeXFeatures.h" -#include "latexrunparams.h" #include "LColor.h" #include "lyxlength.h" #include "lyxrc.h" +#include "outputparams.h" #include "texrow.h" @@ -362,8 +362,7 @@ bool Paragraph::Pimpl::erase(pos_type pos) // only allow the actual removal if it was /new/ text if (changetype != Change::INSERTED) { if (owner_->text_[pos] == Paragraph::META_INSET) { - InsetOld * i(owner_->getInset(pos)); - i->markErased(); + owner_->getInset(pos)->markErased(); } return false; } @@ -377,12 +376,9 @@ bool Paragraph::Pimpl::erase(pos_type pos) int Paragraph::Pimpl::erase(pos_type start, pos_type end) { pos_type i = start; - pos_type count = end - start; - while (count) { - if (!erase(i)) { + for (pos_type count = end - start; count; --count) { + if (!erase(i)) ++i; - } - --count; } return end - i; } @@ -454,7 +450,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, BufferParams const & bparams, ostream & os, TexRow & texrow, - LatexRunParams const & runparams, + OutputParams const & runparams, LyXFont & font, LyXFont & running_font, LyXFont & basefont, @@ -472,7 +468,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, os << c; } else { InsetOld const * inset = owner_->getInset(i); - inset->ascii(buf, os, 0); + inset->plaintext(buf, os, runparams); } return; } @@ -736,8 +732,6 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features, BufferParams const & bparams = features.bufferParams(); // check the params. - if (params.lineTop() || params.lineBottom()) - features.require("lyxline"); if (!params.spacing().isDefault()) features.require("setspace");