]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
ws changes mostly
[lyx.git] / src / text2.C
index 44e897db0fae661c17a8c4ec35b665381cc095fd..683e47efd1043a09c47b72bb4dadf58e08de53ef 100644 (file)
@@ -58,7 +58,7 @@
 
 #include "support/lstrings.h"
 #include "support/textutils.h"
-#include "support/tostr.h"
+#include "support/convert.h"
 
 #include <sstream>
 
@@ -119,7 +119,7 @@ InsetBase * LyXText::checkInsetHit(int x, int y) const
                InsetBase * inset = iit->inset;
 #if 1
                lyxerr << "examining inset " << inset << endl;
-               if (theCoords.insets_.has(inset))
+               if (theCoords.getInsets().has(inset))
                        lyxerr
                                << " xo: " << inset->xo() << "..."
                                << inset->xo() + inset->width()
@@ -1122,8 +1122,8 @@ pos_type LyXText::getColumnNearX(pit_type const pit,
 pit_type LyXText::getPitNearY(int y) const
 {
        BOOST_ASSERT(!paragraphs().empty());
-       BOOST_ASSERT(theCoords.pars_.find(this) != theCoords.pars_.end());
-       CoordCache::InnerParPosCache const & cc = theCoords.pars_[this];
+       BOOST_ASSERT(theCoords.getParPos().find(this) != theCoords.getParPos().end());
+       CoordCache::InnerParPosCache const & cc = theCoords.getParPos().find(this)->second;
        lyxerr << "LyXText::getPitNearY: y: " << y << " cache size: "
                << cc.size() << endl;
 
@@ -1184,7 +1184,7 @@ InsetBase * LyXText::editXY(LCursor & cur, int x, int y) const
                const_cast<LyXText *>(this)->setCurrentFont(cur);
                return 0;
        }
-       
+
        // This should be just before or just behind the
        // cursor position set above.
        BOOST_ASSERT((pos != 0 && inset == pars_[pit].getInset(pos - 1))
@@ -1273,7 +1273,7 @@ void LyXText::cursorUp(LCursor & cur)
        } else if (cur.pit() > 0) {
                --cur.pit();
                setCursor(cur, cur.pit(), x2pos(cur.pit(), cur.paragraph().rows().size() - 1, x));
-               
+
        }
 
        cur.x_target() = x;
@@ -1282,8 +1282,6 @@ void LyXText::cursorUp(LCursor & cur)
 
 void LyXText::cursorDown(LCursor & cur)
 {
-
        Paragraph const & par = cur.paragraph();
        int const row = par.pos2row(cur.pos());
        int const x = cur.targetX();
@@ -1293,14 +1291,14 @@ void LyXText::cursorDown(LCursor & cur)
                editXY(cur, x, y + par.rows()[row].descent() + 1);
                return;
        }
-       
+
        if (row + 1 < int(par.rows().size())) {
                setCursor(cur, cur.pit(), x2pos(cur.pit(), row + 1, x));
        } else if (cur.pit() + 1 < int(paragraphs().size())) {
                ++cur.pit();
                setCursor(cur, cur.pit(), x2pos(cur.pit(), 0, x));
        }
-       
+
        cur.x_target() = x;
 }