pos_type const n = min(max_length, p_siz);
pos_type i = 0;
pos_type j = 0;
+ bool changed_content = false;
for (; i < n && j < p_siz; ++j) {
- if (paragraphs().begin()->isDeleted(j))
- continue;
+ if (paragraphs().begin()->isChanged(j)) {
+ changed_content = true;
+ if (paragraphs().begin()->isDeleted(j))
+ continue;
+ }
if (paragraphs().begin()->isInset(j)) {
if (!paragraphs().begin()->getInset(j)->isChar())
continue;
if (paragraphs().size() > 1 || (i > 0 && j < p_siz)) {
label << "...";
}
- docstring const lbl = label.str();
+ docstring lbl;
+ // indicate changed content in label (#8645)
+ if (changed_content)
+ lbl = char_type(0x270E);// ✎ U+270E LOWER RIGHT PENCIL
+ lbl += label.str();
return lbl.empty() ? l : lbl;
}
ParagraphList::const_iterator end = paragraphs().end();
ParagraphList::const_iterator it = beg;
bool ref_printed = false;
+ bool changed_content = false;
for (; it != end; ++it) {
if (it != beg)
if ((*it).isRTL(buffer().params()))
oss << "<div dir=\"rtl\">";
writePlaintextParagraph(buffer(), *it, oss, rp, ref_printed, len);
- if ((*it).isRTL(buffer().params()))
- oss << "</div>";
+ if ((*it).isChanged(0, (*it).size()))
+ changed_content = true;
if (oss.tellp() >= 0 && size_t(oss.tellp()) > len)
break;
}
docstring str = oss.str();
+ if (changed_content)
+ str += from_ascii("\n\n") + _("[contains tracked changes]");
support::truncateWithEllipsis(str, len);
return str;
}