// non-standard font encoding. If we are using such a language,
// we do not output special T1 chars.
if (!runparams.inIPA && !running_font.language()->internalFontEncoding()
- && !runparams.isFullUnicode() && bparams.main_font_encoding() == "T1"
+ && !runparams.isFullUnicode() && runparams.main_fontenc == "T1"
&& latexSpecialT1(c, os, i, column))
return;
// NOTE: "fontspec" (non-TeX fonts) sets the font encoding to "TU" (untill 2017 "EU1" or "EU2")
if (c == 0x0022) {
if (features.runparams().isFullUnicode() && bp.useNonTeXFonts)
features.require("textquotedblp");
- else if (bp.main_font_encoding() != "T1"
+ else if (features.runparams().main_fontenc != "T1"
|| ((&owner_->getFontSettings(bp, i))->language()->internalFontEncoding()))
features.require("textquotedbl");
} else if (ci.textfeature() && contains(ci.textpreamble(), '=')) {
}
+bool Paragraph::parbreakIsNewline() const
+{
+ return inInset().getLayout().parbreakIsNewline() || d->layout_->parbreak_is_newline;
+}
+
+
bool Paragraph::isPartOfTextSequence() const
{
for (pos_type i = 0; i < size(); ++i) {
}
// now check whether we have insets that need cprotection
- pos_type size = pos_type(d->text_.size());
- for (pos_type i = 0; i < size; ++i) {
- if (!isInset(i))
+ for (auto const & icit : d->insetlist_) {
+ Inset const * ins = icit.inset;
+ if (!ins)
continue;
- Inset const * ins = getInset(i);
if (ins->needsCProtection(maintext, fragile))
return true;
// Now check math environments
- InsetMath const * im = getInset(i)->asInsetMath();
+ InsetMath const * im = ins->asInsetMath();
if (!im || im->cell(0).empty())
continue;
switch(im->cell(0)[0]->lyxCode()) {
- case MATH_AMSARRAY_CODE:
- case MATH_SUBSTACK_CODE:
case MATH_ENV_CODE:
- case MATH_XYMATRIX_CODE:
// these need cprotection
return true;
default:
void Paragraph::requestSpellCheck(pos_type pos)
{
d->requestSpellCheck(pos);
- if (pos == -1 ) {
+ if (pos == -1) {
// Also request spellcheck within (text) insets
for (auto const & insets : insetList()) {
if (!insets.inset->asInsetText())