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"
24 bool hfillExpansion(Paragraph const & par, Row const & row, pos_type pos)
26 if (!par.isHfill(pos))
29 // at the end of a row it does not count
30 // unless another hfill exists on the line
31 if (pos >= row.endpos()) {
32 for (pos_type i = row.pos(); i < pos && !par.isHfill(i); ++i)
36 // at the beginning of a row it does not count, if it is not
37 // the first row of a paragaph
41 // in some labels it does not count
42 if (par.layout()->margintype != MARGIN_MANUAL
43 && pos < par.beginOfBody())
46 // if there is anything between the first char of the row and
47 // the specified position that is not a newline and not a hfill,
48 // the hfill will count, otherwise not
49 pos_type i = row.pos();
50 while (i < pos && (par.isNewline(i) || par.isHfill(i)))