// y is screen coordinate
pit_type TextMetrics::getPitNearY(int y)
{
- LASSERT(!text_->paragraphs().empty(), /**/);
+ LASSERT(!text_->paragraphs().empty(), return -1);
+ LASSERT(!par_metrics_.empty(), return -1);
LYXERR(Debug::DEBUG, "y: " << y << " cache size: " << par_metrics_.size());
// look for highest numbered paragraph with y coordinate less than given y
cur.bv().coordCache().dump();
}
pit_type pit = getPitNearY(y);
- LASSERT(pit != -1, /**/);
+ LASSERT(pit != -1, return 0);
Row const & row = getRowNearY(y, pit);
bool bound = false;
{
LASSERT(text_ == cur.text(), /**/);
pit_type pit = getPitNearY(y);
+ LASSERT(pit != -1, return);
ParagraphMetrics const & pm = par_metrics_[pit];
Inset * TextMetrics::checkInsetHit(int x, int y)
{
pit_type pit = getPitNearY(y);
- LASSERT(pit != -1, /**/);
+ LASSERT(pit != -1, return 0);
Paragraph const & par = text_->paragraphs()[pit];
ParagraphMetrics const & pm = par_metrics_[pit];