3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
14 #include "lyxrow_funcs.h"
16 #include "lyxlayout.h"
18 #include "paragraph.h"
23 bool hfillExpansion(Paragraph const & par, Row const & row, pos_type pos)
25 if (!par.isHfill(pos))
28 // at the end of a row it does not count
29 // unless another hfill exists on the line
30 if (pos >= row.endpos()) {
31 for (pos_type i = row.pos(); i < pos && !par.isHfill(i); ++i)
35 // at the beginning of a row it does not count, if it is not
36 // the first row of a paragaph
40 // in some labels it does not count
41 if (par.layout()->margintype != MARGIN_MANUAL
42 && pos < par.beginOfBody())
45 // if there is anything between the first char of the row and
46 // the specified position that is not a newline and not a hfill,
47 // the hfill will count, otherwise not
48 pos_type i = row.pos();
49 while (i < pos && (par.isNewline(i) || par.isHfill(i)))