]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Remove the unused default parameter of Buffer::doExport().
[lyx.git] / src / Cursor.cpp
index 6144d5c28e8cff682db9808efdc0ffa0bea1a35b..b20e981b32c506cab09c2e7cc34e1989bc0a55b9 100644 (file)
@@ -95,20 +95,18 @@ DocIterator bruteFind2(Cursor const & c, int x, int y)
                int xo;
                int yo;
                Inset const * inset = &it.inset();
-               map<Inset const *, Geometry> const & data =
-                       c.bv().coordCache().getInsets().getData();
-               map<Inset const *, Geometry>::const_iterator I = data.find(inset);
+               CoordCache const & cache = c.bv().coordCache();
 
                // FIXME: in the case where the inset is not in the cache, this
                // means that no part of it is visible on screen. In this case
                // we don't do elaborate search and we just return the forwarded
                // DocIterator at its beginning.
-               if (I == data.end()) {
+               if (!cache.getInsets().has(inset)) {
                        it.top().pos() = 0;
                        return it;
                }
 
-               Point o = I->second.pos;
+               Point const o = cache.getInsets().xy(inset);
                inset->cursorPos(c.bv(), it.top(), c.boundary(), xo, yo);
                // Convert to absolute
                xo += o.x_;
@@ -520,14 +518,14 @@ void Cursor::setCursorToAnchor()
 }
 
 
-void Cursor::markEditPosition()
+void Cursor::markNewWordPosition()
 {
        if (lyxrc.spellcheck_continuously && inTexted() && new_word_.empty()) {
-               FontSpan ow = locateWord(WHOLE_WORD);
-               if (ow.size() == 1) {
+               FontSpan nw = locateWord(WHOLE_WORD);
+               if (nw.size() == 1) {
                        LYXERR(Debug::DEBUG, "start new word: "
                                << " par: " << pit()
-                               << " pos: " << ow.first);
+                               << " pos: " << nw.first);
                        new_word_ = *this;
                }
        }