}
+void Paragraph::addChangesToBuffer(Buffer const & buf) const
+{
+ d->changes_.updateBuffer(buf);
+}
+
+
+bool Paragraph::isChangeUpdateRequired() const
+{
+ return d->changes_.isUpdateRequired();
+}
+
+
bool Paragraph::isDeleted(pos_type start, pos_type end) const
{
LASSERT(start >= 0 && start <= size(), return false);
break;
case '-':
os << '-';
- if (i + 1 < end_pos && text_[i+1] == '-') {
+ if (i + 1 < static_cast<pos_type>(text_.size()) &&
+ (end_pos == -1 || i + 1 < end_pos) &&
+ text_[i+1] == '-') {
// Prevent "--" becoming an endash and "---" becoming
// an emdash.
// Within \ttfamily, "--" is merged to "-" (no endash)
icit->inset->validate(features);
if (layout_->needprotect &&
icit->inset->lyxCode() == FOOT_CODE)
- features.require("footmisc");
+ features.require("NeedLyXFootnoteCode");
}
}
FontSpan Paragraph::fontSpan(pos_type pos) const
{
- LBUFERR(pos < size());
+ LBUFERR(pos <= size());
+
+ if (pos == size())
+ return FontSpan(pos, pos);
pos_type start = 0;
FontList::const_iterator cit = d->fontlist_.begin();
char_type const c = d->text_[i];
if (isPrintable(c))
os += c;
- else if (c == '\t' || c == '\n')
- os += ' ';
else if (c == META_INSET)
getInset(i)->forOutliner(os, tmplen, false);
}