d->changes_.set(change, pos);
// see comment in setChange(Change const &) above
d->changes_.set(change, pos);
// see comment in setChange(Change const &) above
- if (change.type != Change::DELETED && pos < size() && isInset(pos))
- getInset(pos)->setChange(change);
+ if (change.type != Change::DELETED && pos < size())
+ if (Inset * inset = getInset(pos))
+ inset->setChange(change);
break;
case Change::INSERTED:
d->changes_.set(Change(Change::UNCHANGED), pos);
// also accept changes in nested inset
break;
case Change::INSERTED:
d->changes_.set(Change(Change::UNCHANGED), pos);
// also accept changes in nested inset
if (inset->directWrite()) {
// international char, let it write
// code directly so it's shorter in
if (inset->directWrite()) {
// international char, let it write
// code directly so it's shorter in
InsetCode lyx_code = inset->lyxCode();
if (lyx_code != TOC_CODE &&
lyx_code != INCLUDE_CODE &&
InsetCode lyx_code = inset->lyxCode();
if (lyx_code != TOC_CODE &&
lyx_code != INCLUDE_CODE &&
string Paragraph::getID(Buffer const & buf, OutputParams const & runparams) const
{
for (pos_type i = 0; i < size(); ++i) {
string Paragraph::getID(Buffer const & buf, OutputParams const & runparams) const
{
for (pos_type i = 0; i < size(); ++i) {
InsetCode lyx_code = inset->lyxCode();
if (lyx_code == LABEL_CODE) {
InsetLabel const * const il = static_cast<InsetLabel const *>(inset);
InsetCode lyx_code = inset->lyxCode();
if (lyx_code == LABEL_CODE) {
InsetLabel const * const il = static_cast<InsetLabel const *>(inset);
inset->docbook(buf, os, runparams);
} else {
char_type c = d->text_[i];
inset->docbook(buf, os, runparams);
} else {
char_type c = d->text_[i];
inset->docbook(buf, os, runparams);
} else {
char_type c = d->text_[i];
inset->docbook(buf, os, runparams);
} else {
char_type c = d->text_[i];
- return isLineSeparatorChar(c)
- || (c == META_INSET && getInset(pos) &&
- getInset(pos)->isLineSeparator());
+ if (isLineSeparatorChar(c))
+ return true;
+ Inset const * inset = getInset(pos);
+ return inset && inset->isLineSeparator();