return d->changes_.isChanged(start, end);
}
+// FIXME: Ideally the diverse isChanged() methods should account for that!
+bool Paragraph::hasChangedInsets(pos_type start, pos_type end) const
+{
+ LASSERT(start >= 0 && start <= size(), return false);
+ LASSERT(end > start && end <= size() + 1, return false);
+
+ InsetList::const_iterator icit = d->insetlist_.begin();
+ InsetList::const_iterator iend = d->insetlist_.end();
+ for (; icit != iend; ++icit) {
+ if (icit->pos < start)
+ continue;
+ if (icit->pos >= end)
+ break;
+ if (icit->inset && icit->inset->isChanged())
+ return true;
+ }
+ return false;
+}
bool Paragraph::isChanged() const
{
/// is there a change within the given range (does not
/// check contained paragraphs)
bool isChanged(pos_type start, pos_type end) const;
+ /// Are there insets containing changes in the range?
+ bool hasChangedInsets(pos_type start, pos_type end) const;
/// is there an unchanged char at the given pos ?
bool isChanged(pos_type pos) const;
/// is there a change in the paragraph ?