]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
adjust
[lyx.git] / src / Cursor.cpp
index b5712f8816edd6c81bfcefd01f379ce440cb7744..4e4770a4ca9aa32deeb814aef61a0dfcce37c5a8 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "Bidi.h"
 #include "BufferView.h"
-#include "bufferview_funcs.h"
 #include "Buffer.h"
 #include "Cursor.h"
 #include "CoordCache.h"
@@ -34,6 +33,7 @@
 #include "Paragraph.h"
 #include "paragraph_funcs.h"
 #include "ParIterator.h"
+#include "TextMetrics.h"
 
 #include "insets/InsetTabular.h"
 #include "insets/InsetText.h"
@@ -162,7 +162,7 @@ namespace {
                for ( ; it != et; it.forwardPos(true)) {
                        // avoid invalid nesting when selecting
                        if (!cursor.selection() || positionable(it, cursor.anchor_)) {
-                               Point p = bv_funcs::getPos(bv, it, false);
+                               Point p = bv.getPos(it, false);
                                int xo = p.x_;
                                int yo = p.y_;
                                if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
@@ -220,7 +220,7 @@ namespace {
                        // avoid invalid nesting when selecting
                        if (bv.cursorStatus(it) == CUR_INSIDE
                            && (!cur.selection() || positionable(it, cur.anchor_))) {
-                               Point p = bv_funcs::getPos(bv, it, false);
+                               Point p = bv.getPos(it, false);
                                int xo = p.x_;
                                int yo = p.y_;
                                if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) {
@@ -255,8 +255,8 @@ namespace {
                odocstringstream ods;
                ods << '\n';
                // only add blank line if we're not in an ERT or Listings inset
-               if (par.ownerCode() != Inset::ERT_CODE
-                   && par.ownerCode() != Inset::LISTINGS_CODE)
+               if (par.ownerCode() != ERT_CODE
+                   && par.ownerCode() != LISTINGS_CODE)
                        ods << '\n';
                return ods.str();
        }
@@ -419,7 +419,7 @@ int Cursor::currentMode()
 
 void Cursor::getPos(int & x, int & y) const
 {
-       Point p = bv_funcs::getPos(bv(), *this, boundary());
+       Point p = bv().getPos(*this, boundary());
        x = p.x_;
        y = p.y_;
 }
@@ -1235,7 +1235,7 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
 
        // with and without selection are handled differently
        if (!selection()) {
-               int yo = bv_funcs::getPos(bv(), *this, boundary()).y_;
+               int yo = bv().getPos(*this, boundary()).y_;
                Cursor old = *this;
                // To next/previous row
                if (up)