]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphMetrics.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / ParagraphMetrics.cpp
index 85e57683df9208f20dfe80f3199d330eaf198cec..d4ff656449ace627c47a9365e8bd51bb122f6da9 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "support/lassert.h"
 #include "support/debug.h"
+#include "support/ExceptionMessage.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
@@ -135,7 +136,7 @@ void ParagraphMetrics::setInsetDimension(Inset const * inset,
 
 Row & ParagraphMetrics::getRow(pos_type pos, bool boundary)
 {
-       LASSERT(!rows().empty(), /**/);
+       LBUFERR(!rows().empty());
 
        // If boundary is set we should return the row on which
        // the character before is inside.
@@ -154,7 +155,7 @@ Row & ParagraphMetrics::getRow(pos_type pos, bool boundary)
 
 Row const & ParagraphMetrics::getRow(pos_type pos, bool boundary) const
 {
-       LASSERT(!rows().empty(), /**/);
+       LBUFERR(!rows().empty());
 
        // If boundary is set we should return the row on which
        // the character before is inside.
@@ -173,7 +174,7 @@ Row const & ParagraphMetrics::getRow(pos_type pos, bool boundary) const
 
 size_t ParagraphMetrics::pos2row(pos_type pos) const
 {
-       LASSERT(!rows().empty(), /**/);
+       LBUFERR(!rows().empty());
 
        RowList::const_iterator rit = rows_.end();
        RowList::const_iterator const begin = rows_.begin();
@@ -245,7 +246,7 @@ bool ParagraphMetrics::hfillExpansion(Row const & row, pos_type pos) const
        if (!par_->isHfill(pos))
                return false;
 
-       LASSERT(pos >= row.pos() && pos < row.endpos(), /**/);
+       LASSERT(pos >= row.pos() && pos < row.endpos(), return false);
 
        // expand at the end of a row only if there is another hfill on the same row
        if (pos == row.endpos() - 1) {
@@ -257,9 +258,8 @@ bool ParagraphMetrics::hfillExpansion(Row const & row, pos_type pos) const
        }
 
        // expand at the beginning of a row only if it is the first row of a paragraph
-       if (pos == row.pos()) {
+       if (pos == row.pos())
                return pos == 0;
-       }
 
        // do not expand in some labels
        if (par_->layout().margintype != MARGIN_MANUAL && pos < par_->beginOfBody())