]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Whitespace.
[lyx.git] / src / TextMetrics.cpp
index fe7a928e144ab3857f5df95bdc6680faefb7417c..f78594f54dad9860e42a6f2f05aedc13224edb32 100644 (file)
@@ -244,11 +244,9 @@ int TextMetrics::rightMargin(pit_type const pit) const
 
 void TextMetrics::applyOuterFont(Font & font) const
 {
-       Font lf(font_);
-       lf.fontInfo().reduce(bv_->buffer().params().getFont().fontInfo());
-       lf.fontInfo().realize(font.fontInfo());
-       lf.setLanguage(font.language());
-       font = lf;
+       FontInfo lf(font_.fontInfo());
+       lf.reduce(bv_->buffer().params().getFont().fontInfo());
+       font.fontInfo().realize(lf); 
 }
 
 
@@ -1495,8 +1493,8 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        
        int yy = y; // is modified by getPitAndRowNearY
        Row const & row = getPitAndRowNearY(yy, pit, assert_in_view, up);
-       bool bound = false;
 
+       bool bound = false; // is modified by getColumnNearX
        int xx = x; // is modified by getColumnNearX
        pos_type const pos = row.pos()
                + getColumnNearX(pit, row, xx, bound);
@@ -1518,17 +1516,16 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y,
        }
 
        ParagraphList const & pars = text_->paragraphs();
-       Inset const * insetBefore = pos ? pars[pit].getInset(pos - 1) : 0;
-       //Inset * insetBehind = pars[pit].getInset(pos);
+       Inset const * inset_before = pos ? pars[pit].getInset(pos - 1) : 0;
 
        // This should be just before or just behind the
        // cursor position set above.
-       LASSERT((pos != 0 && inset == insetBefore)
+       LASSERT(inset == inset_before 
                || inset == pars[pit].getInset(pos), /**/);
 
        // Make sure the cursor points to the position before
        // this inset.
-       if (inset == insetBefore) {
+       if (inset == inset_before) {
                --cur.pos();
                cur.boundary(false);
        }