}
// Do we need to close the previous font?
+ bool langClosed = false;
if (open_font &&
((current_font != running_font
|| current_font.language() != running_font.language())
}
running_font = basefont;
open_font = false;
+ langClosed = true;
}
// if necessary, close language environment before opening CJK
}
} else {
running_font = current_font;
- open_font = true;
+ open_font = !langClosed;
}
}
// hop to end of word
while (last < to && !owner_->isWordSeparator(last)) {
Inset const * inset = owner_->getInset(last);
- if (inset && inset->lyxCode() == SPECIALCHAR_CODE) {
+ if (inset && dynamic_cast<const InsetSpecialChar *>(inset)) {
// check for "invisible" letters such as ligature breaks
odocstringstream os;
inset->toString(os);