X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph_pimpl.C;h=bad7602b1d0e286ef030524a38709432eb5f81d0;hb=ca6838b288daf07eec7d7a381d74c639c0de3a46;hp=1ece42dadb61f5810e112abdce7e95087214ce8f;hpb=9667cb383640866f47aea57f059a9d2a5caefc3d;p=lyx.git diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 1ece42dadb..bad7602b1d 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -163,14 +163,23 @@ void Paragraph::Pimpl::acceptChanges(pos_type start, pos_type end) { BOOST_ASSERT(start >= 0 && start <= size()); BOOST_ASSERT(end > start && end <= size() + 1); - + for (pos_type pos = start; pos < end; ++pos) { switch (lookupChange(pos).type) { case Change::UNCHANGED: + // accept changes in nested inset + if (pos < size() && owner_->isInset(pos)) { + owner_->getInset(pos)->acceptChanges(); + } + break; case Change::INSERTED: changes_.set(Change(Change::UNCHANGED), pos); + // also accept changes in nested inset + if (pos < size() && owner_->isInset(pos)) { + owner_->getInset(pos)->acceptChanges(); + } break; case Change::DELETED: @@ -184,10 +193,6 @@ void Paragraph::Pimpl::acceptChanges(pos_type start, pos_type end) break; } - // also accept changes in nested insets - if (pos < size() && owner_->isInset(pos)) { - owner_->getInset(pos)->acceptChanges(); - } } } @@ -200,7 +205,7 @@ void Paragraph::Pimpl::rejectChanges(pos_type start, pos_type end) for (pos_type pos = start; pos < end; ++pos) { switch (lookupChange(pos).type) { case Change::UNCHANGED: - // also reject changes inside of insets + // reject changes in nested inset if (pos < size() && owner_->isInset(pos)) { owner_->getInset(pos)->rejectChanges(); } @@ -658,7 +663,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, case 0x20ac: // EURO SIGN if (isEncoding(bparams, font, "latin9") || isEncoding(bparams, font, "cp1251") - || isEncoding(bparams, font, "utf8")) { + || isEncoding(bparams, font, "utf8") + || isEncoding(bparams, font, "latin10") + || isEncoding(bparams, font, "cp858")) { os.put(c); } else { os << "\\texteuro{}"; @@ -816,7 +823,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features, << endl; features.require("noun"); lyxerr[Debug::LATEX] << "Noun enabled. Font: " - << fcit->font().stateText(0) + << to_utf8(fcit->font().stateText(0)) << endl; } switch (fcit->font().color()) { @@ -831,7 +838,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features, default: features.require("color"); lyxerr[Debug::LATEX] << "Color enabled. Font: " - << fcit->font().stateText(0) + << to_utf8(fcit->font().stateText(0)) << endl; }