}
-ColorCode Change::color() const
+Color Change::color() const
{
- ColorCode color = Color_none;
+ Color color = Color_none;
switch (author % 5) {
case 0:
color = Color_changedtextauthor1;
color = Color_changedtextauthor5;
break;
}
+
+ if (deleted())
+ color.mergeColor = Color_deletedtextmodifier;
+
return color;
}
}
+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();
dit.pos() = it->range.start;
Paragraph const & par = dit.paragraph();
str += " " + par.asString(it->range.start, min(par.size(), it->range.end));
- // FIXME: find an unicode character for carriage return presentation if
- // present; i.e. when it->range.end > par.size()
+ if (it->range.end > par.size())
+ // the end of paragraph symbol from the Punctuation group
+ str.push_back(0x204B);
docstring const & author = author_list.get(it->change.author).name();
Toc::iterator it = change_list.item(0, author);
if (it == change_list.end()) {