X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraph.cpp;h=f2709c8b4c196dc9438e3cc14c853d6b5f7b6240;hb=ad3e6c69b2cec7adcdadb2d7853cedd58d305206;hp=e1ece12c8a8a3e90137ace9096246c486734e849;hpb=70a762f91c6d43234a0290fd8d869937597feb9d;p=features.git diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index e1ece12c8a..f2709c8b4c 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1209,10 +1209,10 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, { char_type const c = owner_->getUChar(bparams, runparams, i); - if (style.pass_thru || runparams.pass_thru || (runparams.for_search != OutputParams::NoSearch) + if (style.pass_thru || runparams.pass_thru || runparams.find_effective() || contains(style.pass_thru_chars, c) || contains(runparams.pass_thru_chars, c)) { - if (runparams.for_search != OutputParams::NoSearch) { + if (runparams.find_effective()) { switch (c) { case '\\': os << "\\\\"; @@ -1223,6 +1223,12 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, case '}': os << "\\braceright "; return; + case '$': + os << "\\lyxdollar "; + return; + case '~': + os << "\\lyxtilde "; + return; case ' ': case '\0': break; @@ -2619,7 +2625,7 @@ void Paragraph::latex(BufferParams const & bparams, runparams); runningChange = Change(Change::UNCHANGED); - os << ((isEnvSeparator(i) && (runparams.for_search == OutputParams::NoSearch)) ? "}]~" : "}] "); + os << ((isEnvSeparator(i) && !runparams.find_effective()) ? "}]~" : "}] "); column +=3; } // For InTitle commands, we have already opened a group @@ -2649,10 +2655,10 @@ void Paragraph::latex(BufferParams const & bparams, // Check whether a display math inset follows bool output_changes; - if (runparams.for_search == OutputParams::NoSearch) + if (!runparams.find_effective()) output_changes = bparams.output_changes; else - output_changes = ((runparams.for_search & OutputParams::SearchWithDeleted) != 0); + output_changes = runparams.find_with_deleted(); if (c == META_INSET && i >= start_pos && (end_pos == -1 || i < end_pos)) { if (isDeleted(i)) @@ -4006,6 +4012,8 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf, runparams, i); if (c == ' ' && (style.free_spacing || runparams.free_spacing)) xs << XMLStream::ESCAPE_NONE << " "; + else if (c == '\'') + xs << XMLStream::ESCAPE_NONE << "’"; else xs << c; } @@ -4595,7 +4603,7 @@ int Paragraph::find(docstring const & str, bool cs, bool mw, odocstringstream os; if (inset->lyxCode() == lyx::QUOTE_CODE) { OutputParams op(0); - op.for_search = OutputParams::SearchQuick; + op.find_set_feature(OutputParams::SearchQuick); inset->plaintext(os, op); } else {