]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrow.C
ws changes only
[lyx.git] / src / lyxrow.C
index f879c651760b1535e4a2a2c28e1e5d6ff1f6cd93..7351b7f2481c8896ac4b72b0db4c1a91d59acf0f 100644 (file)
@@ -93,13 +93,13 @@ void Row::top_of_text(unsigned int top)
        top_of_text_ = top;
 }
 
+
 unsigned int Row::top_of_text() const
 {
        return top_of_text_;
 }
 
+
 void Row::baseline(unsigned int b)
 {
        baseline_ = b;
@@ -130,12 +130,24 @@ Row * Row::previous() const
 }
 
 
+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;
@@ -162,7 +174,7 @@ pos_type Row::lastPrintablePos() const
        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);
@@ -256,7 +268,7 @@ bool Row::hfillExpansion(pos_type pos) const
 
        // 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