]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
GuiBox.cpp: fix this issue: horizontal box alignment is only possible without inner...
[lyx.git] / src / Cursor.cpp
index 33536fae0711cb1da807bd555a4db4ce97700d91..5c5010cc4660ba43db4836722a6d8405f29a6857 100644 (file)
 #include "mathed/MathData.h"
 #include "mathed/MathMacro.h"
 
-#include <boost/bind.hpp>
+#include "support/bind.h"
 
 #include <sstream>
 #include <limits>
 #include <map>
+#include <algorithm>
 
 using namespace std;
 
@@ -215,7 +216,9 @@ bool bruteFind3(Cursor & cur, int x, int y, bool up)
                // avoid invalid nesting when selecting
                if (bv.cursorStatus(it) == CUR_INSIDE
                                && (!cur.selection() || positionable(it, cur.realAnchor()))) {
-                       Point p = bv.getPos(it, false);
+                       // If this function is ever used again, check whether this
+                       // is the same as "bv.getPos(it, false)" with boundary = false.
+                       Point p = bv.getPos(it);
                        int xo = p.x_;
                        int yo = p.y_;
                        if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
@@ -467,7 +470,7 @@ int Cursor::currentMode()
 
 void Cursor::getPos(int & x, int & y) const
 {
-       Point p = bv().getPos(*this, boundary());
+       Point p = bv().getPos(*this);
        x = p.x_;
        y = p.y_;
 }
@@ -1279,7 +1282,7 @@ void Cursor::plainInsert(MathAtom const & t)
 void Cursor::insert(docstring const & str)
 {
        for_each(str.begin(), str.end(),
-                boost::bind(static_cast<void(Cursor::*)(char_type)>
+                bind(static_cast<void(Cursor::*)(char_type)>
                             (&Cursor::insert), this, _1));
 }
 
@@ -1886,7 +1889,7 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
 
        // with and without selection are handled differently
        if (!selection()) {
-               int yo = bv().getPos(*this, boundary()).y_;
+               int yo = bv().getPos(*this).y_;
                Cursor old = *this;
                // To next/previous row
                if (up)