]> git.lyx.org Git - lyx.git/blobdiff - src/cursor_slice.C
fix two crashes related to dEPM. Some crashes remain
[lyx.git] / src / cursor_slice.C
index 086317800bf3364c3ab30ef3743c9c70c6ce328b..eda679a2e95750fa10c79da8517003c57dd63ba3 100644 (file)
@@ -38,24 +38,21 @@ CursorSlice::CursorSlice(InsetBase & p)
 }
 
 
-size_t CursorSlice::nargs() const
+MathArray & CursorSlice::cell() const
 {
-       BOOST_ASSERT(inset_);
-       return inset_->nargs();
+       return inset_->asMathInset()->cell(idx_);
 }
 
 
-size_t CursorSlice::nrows() const
+Paragraph & CursorSlice::paragraph()
 {
-       BOOST_ASSERT(inset_);
-       return inset_->nrows();
+       return text()->getPar(pit_);
 }
 
 
-size_t CursorSlice::ncols() const
+Paragraph const & CursorSlice::paragraph() const
 {
-       BOOST_ASSERT(inset_);
-       return inset_->ncols();
+       return text()->getPar(pit_);
 }
 
 
@@ -80,49 +77,6 @@ CursorSlice::col_type CursorSlice::col() const
 }
 
 
-MathInset * CursorSlice::asMathInset() const
-{
-       BOOST_ASSERT(inset_);
-       return inset_->asMathInset();
-}
-
-
-MathArray & CursorSlice::cell() const
-{
-       BOOST_ASSERT(asMathInset());
-       return asMathInset()->cell(idx_);
-}
-
-
-LyXText * CursorSlice::text()
-{
-       BOOST_ASSERT(inset_);
-       return inset_->getText(idx_);
-}
-
-LyXText const * CursorSlice::text() const
-{
-       BOOST_ASSERT(inset_);
-       return inset_->getText(idx_);
-}
-
-
-Paragraph & CursorSlice::paragraph()
-{
-       // access to the main lyx text must be handled in the cursor
-       BOOST_ASSERT(text());
-       return text()->getPar(pit_);
-}
-
-
-Paragraph const & CursorSlice::paragraph() const
-{
-       // access to the main lyx text must be handled in the cursor
-       BOOST_ASSERT(text());
-       return text()->getPar(pit_);
-}
-
-
 bool operator==(CursorSlice const & p, CursorSlice const & q)
 {
        return &p.inset() == &q.inset()