+
+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,
{
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);
+}
+
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
/// 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
setCursor(to.par(), to.pos() + 1);
}
- lyx::Assert(from <= to);
-
setUndo(bv(), Undo::FINISH, from.par(), to.par());
pos_type pos = from.pos();