mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
Move rarely used stuff out-of-line
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7211 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
37e207d926
commit
7ab4b6683f
@ -1,3 +1,11 @@
|
||||
|
||||
2003-06-26 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* lyxcursor.[Ch]: move rarely used operator==,!= out of line
|
||||
remove unused/broken operator>,<,>=.
|
||||
|
||||
* text.C: remove only use of broken operator<= in an Assert().
|
||||
|
||||
2003-06-24 Alfredo Brauntein <abraunst@lyx.org>
|
||||
|
||||
* BufferView.[Ch] (getErrorList): removed unneeded forward declare,
|
||||
|
@ -133,3 +133,18 @@ RowList::iterator LyXCursor::irow() const
|
||||
{
|
||||
return irow_;
|
||||
}
|
||||
|
||||
|
||||
bool operator==(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return a.par() == b.par()
|
||||
&& a.pos() == b.pos()
|
||||
&& a.boundary() == b.boundary();
|
||||
}
|
||||
|
||||
|
||||
bool operator!=(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
@ -130,45 +130,9 @@ private:
|
||||
RowList::iterator irow_;
|
||||
};
|
||||
|
||||
/// these three dictate the others
|
||||
inline
|
||||
bool operator==(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return (a.par() == b.par())
|
||||
&& (a.pos() == b.pos())
|
||||
&& a.boundary() == b.boundary();
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator!=(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
/// only compares y() and pos(). Can this be done in another way?
|
||||
inline
|
||||
bool operator<(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return (a.y() < b.y() && a.pos() < b.pos());
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator>(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return b < a;
|
||||
}
|
||||
|
||||
inline
|
||||
bool operator>=(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return !(a < b);
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
bool operator<=(LyXCursor const & a, LyXCursor const & b)
|
||||
{
|
||||
return !(a > b);
|
||||
}
|
||||
///
|
||||
bool operator==(LyXCursor const & a, LyXCursor const & b);
|
||||
///
|
||||
bool operator!=(LyXCursor const & a, LyXCursor const & b);
|
||||
|
||||
#endif // LYXCURSOR_H
|
||||
|
@ -626,6 +626,9 @@ public:
|
||||
|
||||
/// return true if this is owned by an inset.
|
||||
bool isInInset() const;
|
||||
|
||||
///
|
||||
void adjustCursor(int row, int offset);
|
||||
};
|
||||
|
||||
/// return the default height of a row in pixels, considering font zoom
|
||||
|
@ -2363,8 +2363,6 @@ void LyXText::changeCase(LyXText::TextCase action)
|
||||
setCursor(to.par(), to.pos() + 1);
|
||||
}
|
||||
|
||||
lyx::Assert(from <= to);
|
||||
|
||||
setUndo(bv(), Undo::FINISH, from.par(), to.par());
|
||||
|
||||
pos_type pos = from.pos();
|
||||
|
Loading…
Reference in New Issue
Block a user