- bool isChanged(lyx::pos_type start, lyx::pos_type end) const;
-
- /// is there a non-addition in this range ?
- bool isChangeEdited(lyx::pos_type start, lyx::pos_type end) const;
-
- /// set change at pos
- void setChange(lyx::pos_type pos, Change::Type type);
-
- /// accept change
- void acceptChange(lyx::pos_type start, lyx::pos_type end);
-
- /// reject change
- void rejectChange(lyx::pos_type start, lyx::pos_type end);
-
- /// mark whole par as erased
- void markErased();
+ bool isChanged(pos_type start, pos_type end) const;
+ /// is there an unchanged char at the given pos ?
+ bool isUnchanged(pos_type pos) const {
+ return lookupChange(pos).type == Change::UNCHANGED;
+ }
+ /// is there an insertion at the given pos ?
+ bool isInserted(pos_type pos) const {
+ return lookupChange(pos).type == Change::INSERTED;
+ }
+ /// is there a deletion at the given pos ?
+ bool isDeleted(pos_type pos) const {
+ return lookupChange(pos).type == Change::DELETED;
+ }
+
+ /// will the paragraph be physically merged with the next
+ /// one if the imaginary end-of-par character is logically deleted?
+ bool isMergedOnEndOfParDeletion(bool trackChanges) const;
+
+ /// set change for the entire par
+ void setChange(Change const & change);
+
+ /// set change at given pos
+ void setChange(pos_type pos, Change const & change);
+
+ /// accept changes within the given range
+ void acceptChanges(pos_type start, pos_type end);
+
+ /// reject changes within the given range
+ void rejectChanges(pos_type start, pos_type end);