]> git.lyx.org Git - features.git/commitdiff
size_type size -> difference_type diff in adjust()
authorAndré Pönitz <poenitz@gmx.net>
Mon, 4 Nov 2002 11:53:28 +0000 (11:53 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 4 Nov 2002 11:53:28 +0000 (11:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5575 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C
src/mathed/math_cursor.h

index b38fdab121c50b938a85d5d1755dcda43e4aaf8e..250e2966900e6cd69f6125c4c69f5fb7ebd4467f 100644 (file)
@@ -666,12 +666,12 @@ MathCursor::pos_type MathCursor::pos() const
 }
 
 
-void MathCursor::adjust(pos_type from, size_type size)
+void MathCursor::adjust(pos_type from, difference_type diff)
 {
        if (cursor().pos_ > from)
-               cursor().pos_ += size;
+               cursor().pos_ += diff;
        if (Anchor_.back().pos_ > from)
-               Anchor_.back().pos_ += size;
+               Anchor_.back().pos_ += diff;
        // just to be on the safe side
        // theoretically unecessary
        normalize();
index 722beac95c8a1cf824621f1760d3f38e1c690ffb..99c6018729d829b0474a06bb582a7f354816842e 100644 (file)
@@ -46,6 +46,8 @@ class MathCursor {
 public:
        /// short of anything else reasonable
        typedef MathInset::size_type       size_type;
+       /// type for column numbers
+       typedef MathArray::difference_type difference_type;
        /// type for cursor positions within a cell
        typedef MathInset::pos_type        pos_type;
        /// type for cell indices
@@ -114,8 +116,8 @@ public:
        void popToEnclosingHull();
        /// go up to the hull inset
        void popToHere(MathInset const * p);
-       /// adjust position after deletion/insertion
-       void adjust(pos_type from, size_type size);
+       /// adjust anchor position after deletions/insertions
+       void adjust(pos_type from, difference_type diff);
        ///
        InsetFormulaBase * formula() const;
        /// current offset in the current cell
@@ -273,7 +275,7 @@ private:
        /// the name of the macro we are currently inputting
        string macroName() const;
        /// where in the curent cell does the macro name start?
-       MathInset::difference_type macroNamePos() const;
+       difference_type macroNamePos() const;
        /// can we enter the inset?
        bool openable(MathAtom const &, bool selection) const;
        /// write access to cursor cell position