]> git.lyx.org Git - lyx.git/blobdiff - src/Changes.cpp
* GuiDocument.cpp:
[lyx.git] / src / Changes.cpp
index 8ea11399ea6648b34bc3beac239c3004aae2433c..34db257f583b2d63b24cf3b8f7682ec1cc73aac5 100644 (file)
@@ -256,6 +256,24 @@ Change const & Changes::lookup(pos_type const pos) const
 }
 
 
+bool Changes::isFullyDeleted(pos_type start, pos_type end) const
+{
+       ChangeTable::const_iterator it = table_.begin();
+       ChangeTable::const_iterator const itend = table_.end();
+
+       for (; it != itend; ++it) {
+               if (it->range.contains(Range(start, end))) {
+                       LYXERR(Debug::CHANGES, "range ("
+                               << start << ", " << end << ") fully contains ("
+                               << it->range.start << ", " << it->range.end
+                               << ") of type " << it->change.type);
+                       return it->change.type == Change::DELETED;
+               }
+       }
+       return false;
+}
+
+
 bool Changes::isChanged(pos_type const start, pos_type const end) const
 {
        ChangeTable::const_iterator it = table_.begin();