X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph.C;h=9dce9f546ec3599fe3a5f67f9882e5cb51f19e77;hb=69bee02a8901793b34ac5ca6d07e93910cef4005;hp=0a5efb303a036315482a638f37230476471c96ff;hpb=af37f0d23e8aab1bfbd7ab7f26a10e7685dfca68;p=lyx.git diff --git a/src/paragraph.C b/src/paragraph.C index 0a5efb303a..9dce9f546e 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -45,6 +45,7 @@ #include "support/tostr.h" #include +#include #include #include @@ -270,10 +271,8 @@ void Paragraph::insert(pos_type start, string const & str, } -bool Paragraph::checkInsertChar(LyXFont & font) +bool Paragraph::checkInsertChar(LyXFont &) { - if (pimpl_->inset_owner) - return pimpl_->inset_owner->checkInsertChar(font); return true; } @@ -592,9 +591,7 @@ int Paragraph::stripLeadingSpaces() bool Paragraph::hasSameLayout(Paragraph const & par) const { - return - par.layout() == layout() && - params().sameLayout(par.params()); + return par.layout() == layout() && params().sameLayout(par.params()); } @@ -646,8 +643,6 @@ void Paragraph::applyLayout(LyXLayout_ptr const & new_layout) layout(new_layout); params().labelWidthString(string()); params().align(LYX_ALIGN_LAYOUT); - params().spaceTop(VSpace(VSpace::NONE)); - params().spaceBottom(VSpace(VSpace::NONE)); params().spacing(Spacing(Spacing::Default)); } @@ -719,8 +714,8 @@ InsetBibitem * Paragraph::bibitem() const namespace { -/* paragraphs inside floats need different alignment tags to avoid -unwanted space */ +// paragraphs inside floats need different alignment tags to avoid +// unwanted space bool noTrivlistCentering(UpdatableInset const * inset) { @@ -1277,9 +1272,9 @@ void Paragraph::simpleLinuxDocOnePar(Buffer const & buf, char c = getChar(i); + if (c == Paragraph::META_INSET) { - InsetOld const * inset = getInset(i); - inset->linuxdoc(buf, os, runparams); + getInset(i)->linuxdoc(buf, os, runparams); font_old = font; continue; } @@ -1296,8 +1291,7 @@ void Paragraph::simpleLinuxDocOnePar(Buffer const & buf, if (ws && !isFreeSpacing()) { // in freespacing mode, spaces are // non-breaking characters - if (desc_on) {// if char is ' ' then... - + if (desc_on) { // if char is ' ' then... ++char_line_count; sgmlLineBreak(os, char_line_count, 6); os << ""; @@ -1338,10 +1332,11 @@ void Paragraph::simpleDocBookOnePar(Buffer const & buf, bool emph_flag = false; LyXLayout_ptr const & style = layout(); - LyXLayout_ptr const & defaultstyle - = buf.params().getLyXTextClass().defaultLayout(); + LyXLayout_ptr const & defaultstyle = + buf.params().getLyXTextClass().defaultLayout(); - LyXFont font_old = (style->labeltype == LABEL_MANUAL ? style->labelfont : style->font); + LyXFont font_old = + style->labeltype == LABEL_MANUAL ? style->labelfont : style->font; int char_line_count = depth; bool label_closed = true;