On Saturday 30 December 2006 15:50, Abdelrazak Younes wrote:

> Ah.. OK, then commit and I'll take care of that afterward.

There are some more unused vaiables. Did you forget to use right_margin in 
getColumnNearX, or can it be removed?


Georg
Index: src/text2.C
===================================================================
--- src/text2.C	(Revision 16444)
+++ src/text2.C	(Arbeitskopie)
@@ -752,7 +752,7 @@
 // x is an absolute screen coord
 // returns the column near the specified x-coordinate of the row
 // x is set to the real beginning of this column
-pos_type LyXText::getColumnNearX(BufferView const & bv, int right_margin,
+pos_type LyXText::getColumnNearX(BufferView const & bv,
 		pit_type const pit, Row const & row, int & x, bool & boundary) const
 {
 	Buffer const & buffer = *bv.buffer();
@@ -997,12 +997,9 @@
 	Row const & row = getRowNearY(cur.bv(), y, pit);
 	bool bound = false;
 
-	TextMetrics const & tm = cur.bv().textMetrics(this);
-	ParagraphMetrics const & pm = tm.parMetrics(pit);
-	int right_margin = tm.rightMargin(pm);
 	int xx = x; // is modified by getColumnNearX
 	pos_type const pos = row.pos()
-		+ getColumnNearX(cur.bv(), right_margin, pit, row, xx, bound);
+		+ getColumnNearX(cur.bv(), pit, row, xx, bound);
 	cur.pit() = pit;
 	cur.pos() = pos;
 	cur.boundary(bound);
Index: src/lyxtext.h
===================================================================
--- src/lyxtext.h	(Revision 16444)
+++ src/lyxtext.h	(Arbeitskopie)
@@ -153,7 +153,7 @@
 	 x is set to the real beginning of this column
 	 */
 	/// FIXME: move to TextMetrics.
-	pos_type getColumnNearX(BufferView const & bv, int right_margin,
+	pos_type getColumnNearX(BufferView const & bv,
 		pit_type pit, Row const & row, int & x, bool & boundary) const;
 
 	/** Find the word under \c from in the relative location
Index: src/text.C
===================================================================
--- src/text.C	(Revision 16444)
+++ src/text.C	(Arbeitskopie)
@@ -2057,7 +2057,7 @@
 	BOOST_ASSERT(row < int(pm.rows().size()));
 	bool bound = false;
 	Row const & r = pm.rows()[row];
-	return r.pos() + getColumnNearX(bv, tm.rightMargin(pm), pit, r, x, bound);
+	return r.pos() + getColumnNearX(bv, pit, r, x, bound);
 }
 
 
@@ -2105,8 +2105,7 @@
 
 	bool bound = false;
 	int xx = x;
-	int right_margin = tm.rightMargin(pm);
-	pos_type const pos = row.pos() + getColumnNearX(cur.bv(), right_margin, 
+	pos_type const pos = row.pos() + getColumnNearX(cur.bv(),
 		pit, row, xx, bound);
 
 	lyxerr[Debug::DEBUG]

Reply via email to