int LyXText::top_y() const
{
- if (anchor_row_ == rowlist_.end() )
+ if (anchor_row_ == rowlist_.end())
return 0;
return anchor_row_->y() + anchor_row_offset_;
}
-int LyXText::workWidth(Inset * inset) const
+int LyXText::workWidth(Inset const * inset) const
{
- Paragraph * par = inset->parOwner();
- lyx::Assert(par);
+ ParagraphList::iterator par = std::find(ownerParagraphs().begin(),
+ ownerParagraphs().end(),
+ *inset->parOwner());
+ //lyx::Assert(par);
pos_type pos = par->getPositionOfInset(inset);
lyx::Assert(pos != -1);