BOOST_ASSERT(pos >= 0);
Layout_ptr const & layout = par.layout();
-#ifdef WITH_WARNINGS
-#warning broken?
-#endif
+ // FIXME: broken?
BufferParams const & params = buffer.params();
pos_type const body_pos = par.beginOfBody();
DocIterator cellend = cellbegin;
cellend.pit() = cellend.lastpit();
cellend.pos() = cellend.lastpos();
- text->setFont(buffer, cellbegin, cellend, font, toggleall);
+ text->setFont(buffer, cellbegin.top(), cellend.top(), font, toggleall);
}
if (dit == end)
break;
// Ok, we have a selection.
recordUndoSelection(cur);
- setFont(cur.buffer(), cur.selectionBegin(), cur.selectionEnd(), font,
- toggleall);
+ setFont(cur.buffer(), cur.selectionBegin().top(),
+ cur.selectionEnd().top(), font, toggleall);
}
-void Text::setFont(Buffer const & buffer, DocIterator const & begin,
- DocIterator const & end, Font const & font,
+void Text::setFont(Buffer const & buffer, CursorSlice const & begin,
+ CursorSlice const & end, Font const & font,
bool toggleall)
{
// Don't use forwardChar here as ditend might have
// Can't use forwardPos either as this descends into
// nested insets.
Language const * language = buffer.params().language;
- for (DocIterator dit = begin; dit != end; dit.forwardPosNoDescend()) {
+ for (CursorSlice dit = begin; dit != end; dit.forwardPos()) {
if (dit.pos() != dit.lastpos()) {
pit_type const pit = dit.pit();
pos_type const pos = dit.pos();
&& oldpar.isLineSeparator(old.pos() - 1)
&& !oldpar.isDeleted(old.pos() - 1)) {
oldpar.eraseChar(old.pos() - 1, cur.buffer().params().trackChanges);
-#ifdef WITH_WARNINGS
-#warning This will not work anymore when we have multiple views of the same buffer
+// FIXME: This will not work anymore when we have multiple views of the same buffer
// In this case, we will have to correct also the cursors held by
// other bufferviews. It will probably be easier to do that in a more
// automated way in CursorSlice code. (JMarc 26/09/2001)
-#endif
// correct all cursor parts
if (same_par) {
fixCursorAfterDelete(cur.top(), old.top());
ParagraphList & plist = old.text()->paragraphs();
plist.erase(boost::next(plist.begin(), old.pit()));
- // see #warning above
+ // see #warning (FIXME?) above
if (cur.depth() >= old.depth()) {
CursorSlice & curslice = cur[old.depth() - 1];
if (&curslice.inset() == &old.inset()