]> git.lyx.org Git - lyx.git/blobdiff - src/cursor.C
the const patch
[lyx.git] / src / cursor.C
index 06954bc17399ec5a6d1716d0b64bd9fa646fb931..9b986ab506476195f1e1f7ac582e0c30c5fee0d1 100644 (file)
@@ -120,11 +120,10 @@ namespace {
                int x, int y, int xlow, int xhigh, int ylow, int yhigh)
        {
                BOOST_ASSERT(!cursor.empty());
-               pit_type beg, end;
                CursorSlice bottom = cursor[0];
                LyXText * text = bottom.text();
                BOOST_ASSERT(text);
-               
+
                DocIterator it = doc_iterator_begin(bottom.inset());
                DocIterator const et = doc_iterator_end(bottom.inset());
 
@@ -165,7 +164,7 @@ namespace {
 } // namespace anon
 
 
-// be careful: this is called from the bv's constructor, too, so 
+// be careful: this is called from the bv's constructor, too, so
 // bv functions are not yet available!
 LCursor::LCursor(BufferView & bv)
        : DocIterator(), bv_(&bv), anchor_(), x_target_(-1),
@@ -231,45 +230,6 @@ DispatchResult LCursor::result() const
 }
 
 
-bool LCursor::getStatus(FuncRequest const & cmd, FuncStatus & status)
-{
-       // This is, of course, a mess. Better create a new doc iterator and use
-       // this in Inset::getStatus. This might require an additional
-       // BufferView * arg, though (which should be avoided)
-       LCursor safe = *this;
-       bool res = false;
-       for ( ; size(); pop()) {
-               //lyxerr << "\nLCursor::getStatus: cmd: " << cmd << endl << *this << endl;
-               if (idx() > lastidx()) {
-                       lyxerr << "wrong idx " << idx() << ", max is " << lastidx()
-                               << ". Trying to correct this."  << endl;
-                       idx() = lastidx();
-               }
-               if (pit() > lastpit()) {
-                       lyxerr << "wrong par " << pit() << ", max is " << lastpit()
-                               << ". Trying to correct this."  << endl;
-                       pit() = lastpit();
-               }
-               if (pos() > lastpos()) {
-                       lyxerr << "wrong pos " << pos() << ", max is " << lastpos()
-                               << ". Trying to correct this."  << endl;
-                       pos() = lastpos();
-               }
-
-               // The inset's getStatus() will return 'true' if it made
-               // a definitive decision on whether it want to handle the
-               // request or not. The result of this decision is put into
-               // the 'status' parameter.
-               if (inset().getStatus(*this, cmd, status)) {
-                       res = true;
-                       break;
-               }
-       }
-       operator=(safe);
-       return res;
-}
-
-
 BufferView & LCursor::bv() const
 {
        BOOST_ASSERT(bv_);
@@ -980,10 +940,6 @@ bool LCursor::goUpDown(bool up)
                }
        }
 
-       // try current cell for e.g. text insets
-       if (inset().idxUpDown2(*this, up))
-               return true;
-
        //xarray().boundingBox(xlow, xhigh, ylow, yhigh);
        //if (up)
        //      yhigh = yo - 4;