2 * \file src/FontIterator.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alfredo Braunstein
8 * Full author contact details are available in file CREDITS.
15 #include "FontIterator.h"
19 #include "paragraph.h"
25 FontIterator::FontIterator(Buffer const & buffer, LyXText const & text,
26 Paragraph const & par, pos_type pos)
27 : buffer_(buffer), text_(text), par_(par), pos_(pos),
28 font_(text.getFont(buffer, par, pos)),
29 endspan_(par.fontSpan(pos).last),
30 bodypos_(par.beginOfBody())
34 LyXFont const & FontIterator::operator*() const
40 LyXFont * FontIterator::operator->()
46 FontIterator & FontIterator::operator++()
49 if (pos_ > endspan_ || pos_ == bodypos_) {
50 font_ = text_.getFont(buffer_, par_, pos_);
51 endspan_ = par_.fontSpan(pos_).last;