top_of_text_ = top;
}
-
+
unsigned int Row::top_of_text() const
{
return top_of_text_;
}
-
+
void Row::baseline(unsigned int b)
{
baseline_ = b;
}
+bool Row::isParStart() const
+{
+ return !pos();
+}
+
+
+bool Row::isParEnd() const
+{
+ return !next() || next()->par() != par();
+}
+
+
pos_type Row::lastPos() const
{
if (!par()->size())
return 0;
- if (!next() || next()->par() != par()) {
+ if (isParEnd()) {
return par()->size() - 1;
} else {
return next()->pos() - 1;
pos_type const last = lastPos();
// if this row is an end of par, just act like lastPos()
- if (!next() || par() != next()->par())
+ if (isParEnd())
return last;
bool const nextrownotinset = !nextRowIsAllInset(*this, last);
// at the beginning of a row it does not count, if it is not
// the first row of a paragaph
- if (!this->pos())
+ if (isParStart())
return true;
// in some labels it does not count