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"
18 #include "paragraph.h"
24 FontIterator::FontIterator(LyXText const & text, Paragraph const & par,
26 : text_(text), par_(par), pos_(pos),
27 font_(text.getFont(par, pos)),
28 endspan_(par.fontSpan(pos).last),
29 bodypos_(par.beginOfBody())
33 LyXFont const & FontIterator::operator*() const
39 LyXFont * FontIterator::operator->()
45 FontIterator & FontIterator::operator++()
48 if (pos_ > endspan_ || pos_ == bodypos_) {
49 font_ = text_.getFont(par_, pos_);
50 endspan_ = par_.fontSpan(pos_).last;