]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
Make lyx2lyx output the new external inset format.
[lyx.git] / src / text.C
index 29bd502203b8aa1e54d38b87d76fe71f7aefac17..bc95c353bd216582c69705fcd84df1fce687e817 100644 (file)
@@ -87,7 +87,7 @@ void LyXText::updateRowPositions()
 
 int LyXText::top_y() const
 {
-       if (anchor_row_ == rowlist_.end() )
+       if (anchor_row_ == rowlist_.end())
                return 0;
 
        return anchor_row_->y() + anchor_row_offset_;
@@ -147,8 +147,10 @@ int LyXText::workWidth() 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);