]> git.lyx.org Git - lyx.git/blobdiff - src/text.C
remove obsolete comment
[lyx.git] / src / text.C
index 611365fc554a9f7592f55cbbb13c685fe05b9b19..10990823ba07992af8ec468a70949c9004b043c3 100644 (file)
@@ -1661,45 +1661,6 @@ docstring LyXText::getPossibleLabel(LCursor & cur) const
 }
 
 
-//pos_type LyXText::x2pos(pit_type pit, int row, int x) const
-//{
-//     int lastx = 0;
-//     int currx = 0;
-//     Paragraph const & par = pars_[pit];
-//     Row const & r = par.rows()[row];
-//     int pos = r.pos();
-//     for (; currx < x && pos < r.endpos(); ++pos) {
-//             lastx = currx;
-//             currx += singleWidth(buffer, par, pos);
-//     }
-//     if (abs(lastx - x) < abs(currx - x) && pos != r.pos())
-//             --pos;
-//     return pos;
-//}
-
-
-pos_type LyXText::x2pos(BufferView const & bv, pit_type pit, int row,
-               int x) const
-{
-       TextMetrics const & tm = bv.textMetrics(this);
-       ParagraphMetrics const & pm = tm.parMetrics(pit);
-       BOOST_ASSERT(!pm.rows().empty());
-       BOOST_ASSERT(row < int(pm.rows().size()));
-       bool bound = false;
-       Row const & r = pm.rows()[row];
-       return r.pos() + tm.getColumnNearX(pit, r, x, bound);
-}
-
-
-//int LyXText::pos2x(pit_type pit, pos_type pos) const
-//{
-//     Paragraph const & par = pars_[pit];
-//     Row const & r = par.rows()[row];
-//     int x = 0;
-//     pos -= r.pos();
-//}
-
-
 void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
 {
        BOOST_ASSERT(this == cur.text());
@@ -1735,7 +1696,6 @@ void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
 
        bool bound = false;
        int xx = x;
-       int right_margin = tm.rightMargin(pm);
        pos_type const pos = row.pos() 
                + tm.getColumnNearX(pit, row, xx, bound);
 
@@ -1746,7 +1706,6 @@ void LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
                << endl;
 
        setCursor(cur, pit, pos, true, bound);
-       return;
 }