]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_textinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_textinset.C
index ce30f3f184cbd567a83721da5545671758c980e5..96669f35e20fba42be426d4c387a6e91a9a9003f 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef __GNUG__
+#pragma implementation
+#endif
 
 #include "math_textinset.h"
 #include "math_metricsinfo.h"
@@ -17,7 +20,7 @@ MathInset * MathTextInset::clone() const
 
 MathInset::idx_type MathTextInset::pos2row(pos_type pos) const
 {
-       for (pos_type r = 0, n = cache_.nargs(); r < n; ++r) 
+       for (pos_type r = 0, n = cache_.nargs(); r < n; ++r)
                if (pos >= cache_.cellinfo_[r].begin_ && pos <= cache_.cellinfo_[r].end_)
                        return r;
        lyxerr << "illegal row for pos " << pos << "\n";
@@ -28,7 +31,7 @@ MathInset::idx_type MathTextInset::pos2row(pos_type pos) const
 void MathTextInset::getPos(idx_type, pos_type pos, int & x, int & y) const
 {
        idx_type const i = pos2row(pos);
-       pos_type const p = pos - cache_.cellinfo_[i].begin_; 
+       pos_type const p = pos - cache_.cellinfo_[i].begin_;
        cache_.getPos(i, p, x, y);
 }
 
@@ -97,7 +100,7 @@ void MathTextInset::metrics(MathMetricsInfo & mi) const
                        // This is a regular char. Go on if we either don't care for
                        // the width limit or have not reached that limit.
                        curr += cell(0)[i]->width();
-                       if (!mi.base.restrictwidth || curr + safe <= mi.base.textwidth) 
+                       if (!mi.base.restrictwidth || curr + safe <= mi.base.textwidth)
                                continue;
                }
 
@@ -160,5 +163,5 @@ void MathTextInset::draw(MathPainterInfo & pi, int x, int y) const
 void MathTextInset::drawSelection(MathPainterInfo & pi,
                idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const
 {
-       cache_.drawSelection(pi, idx1, pos1, idx2, pos2);       
+       cache_.drawSelection(pi, idx1, pos1, idx2, pos2);
 }