mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
size_type size -> difference_type diff in adjust()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5575 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a1167adab
commit
d541810566
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user