mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +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)
|
if (cursor().pos_ > from)
|
||||||
cursor().pos_ += size;
|
cursor().pos_ += diff;
|
||||||
if (Anchor_.back().pos_ > from)
|
if (Anchor_.back().pos_ > from)
|
||||||
Anchor_.back().pos_ += size;
|
Anchor_.back().pos_ += diff;
|
||||||
// just to be on the safe side
|
// just to be on the safe side
|
||||||
// theoretically unecessary
|
// theoretically unecessary
|
||||||
normalize();
|
normalize();
|
||||||
|
@ -46,6 +46,8 @@ class MathCursor {
|
|||||||
public:
|
public:
|
||||||
/// short of anything else reasonable
|
/// short of anything else reasonable
|
||||||
typedef MathInset::size_type size_type;
|
typedef MathInset::size_type size_type;
|
||||||
|
/// type for column numbers
|
||||||
|
typedef MathArray::difference_type difference_type;
|
||||||
/// type for cursor positions within a cell
|
/// type for cursor positions within a cell
|
||||||
typedef MathInset::pos_type pos_type;
|
typedef MathInset::pos_type pos_type;
|
||||||
/// type for cell indices
|
/// type for cell indices
|
||||||
@ -114,8 +116,8 @@ public:
|
|||||||
void popToEnclosingHull();
|
void popToEnclosingHull();
|
||||||
/// go up to the hull inset
|
/// go up to the hull inset
|
||||||
void popToHere(MathInset const * p);
|
void popToHere(MathInset const * p);
|
||||||
/// adjust position after deletion/insertion
|
/// adjust anchor position after deletions/insertions
|
||||||
void adjust(pos_type from, size_type size);
|
void adjust(pos_type from, difference_type diff);
|
||||||
///
|
///
|
||||||
InsetFormulaBase * formula() const;
|
InsetFormulaBase * formula() const;
|
||||||
/// current offset in the current cell
|
/// current offset in the current cell
|
||||||
@ -273,7 +275,7 @@ private:
|
|||||||
/// the name of the macro we are currently inputting
|
/// the name of the macro we are currently inputting
|
||||||
string macroName() const;
|
string macroName() const;
|
||||||
/// where in the curent cell does the macro name start?
|
/// where in the curent cell does the macro name start?
|
||||||
MathInset::difference_type macroNamePos() const;
|
difference_type macroNamePos() const;
|
||||||
/// can we enter the inset?
|
/// can we enter the inset?
|
||||||
bool openable(MathAtom const &, bool selection) const;
|
bool openable(MathAtom const &, bool selection) const;
|
||||||
/// write access to cursor cell position
|
/// write access to cursor cell position
|
||||||
|
Loading…
Reference in New Issue
Block a user