///
bool empty() const { return text_.empty(); }
///
- void setContentsFromPar(Paragraph const & par);
- ///
void clearContents();
///
/// is there a change within the given range ?
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;
/// set change at given pos
void setChange(pos_type pos, Change const & change);
- /// accept change
- void acceptChange(pos_type start, pos_type end);
+ /// accept changes within the given range
+ void acceptChanges(pos_type start, pos_type end);
- /// reject change
- void rejectChange(pos_type start, pos_type end);
+ /// reject changes within the given range
+ void rejectChanges(pos_type start, pos_type end);
/// Paragraphs can contain "manual labels", for example, Description
/// environment. The text for this user-editable label is stored in