Paragraph::Private::Private(Paragraph * owner, Layout const & layout)
- : owner_(owner), inset_owner_(0), id_(-1), begin_of_body_(0), layout_(&layout)
+ : owner_(owner), inset_owner_(nullptr), id_(-1), begin_of_body_(0), layout_(&layout)
{
text_.reserve(100);
}
LASSERT(start >= 0 && start <= size(), return false);
LASSERT(end > start && end <= size() + 1, return false);
- for (auto const icit : d->insetlist_) {
+ for (auto const & icit : d->insetlist_) {
if (icit.pos < start)
continue;
if (icit.pos >= end)
// Optimisation: avoid a full font instantiation if there is no
// language change from previous call.
static Font previous_font;
- static Language const * previous_lang = 0;
+ static Language const * previous_lang = nullptr;
Language const * lang = getParLanguage(bparams);
if (lang != previous_lang) {
previous_lang = lang;
// Optimisation: avoid a full font instantiation if there is no
// language change from previous call.
static Font previous_font;
- static Language const * previous_lang = 0;
+ static Language const * previous_lang = nullptr;
if (bparams.language != previous_lang) {
previous_lang = bparams.language;
previous_font = Font(inherit_font, bparams.language);
Inset const * inset = getInset(i);
InsetText const * textinset = inset
? inset->asInsetText()
- : 0;
+ : nullptr;
if (i + 1 == size() && textinset
&& !inset->getLayout().isDisplay()) {
ParagraphList const & pars =
os.put(c);
else if (c == META_INSET && (options & AS_STR_INSETS)) {
if (c == META_INSET && (options & AS_STR_PLAINTEXT)) {
- LASSERT(runparams != 0, return docstring());
+ LASSERT(runparams != nullptr, return docstring());
getInset(i)->plaintext(os, *runparams);
} else {
getInset(i)->toString(os);
Inset * Paragraph::getInset(pos_type pos)
{
return (pos < pos_type(d->text_.size()) && d->text_[pos] == META_INSET)
- ? d->insetlist_.get(pos) : 0;
+ ? d->insetlist_.get(pos) : nullptr;
}
Inset const * Paragraph::getInset(pos_type pos) const
{
return (pos < pos_type(d->text_.size()) && d->text_[pos] == META_INSET)
- ? d->insetlist_.get(pos) : 0;
+ ? d->insetlist_.get(pos) : nullptr;
}
++from;
// don't check empty range
if (from >= to)
- return 0;
+ return nullptr;
// get current language
Language * lang = getSpellLanguage(from);
pos_type last = from;