]> git.lyx.org Git - features.git/commitdiff
Move rarely used stuff out-of-line
authorAndré Pönitz <poenitz@gmx.net>
Thu, 26 Jun 2003 09:42:28 +0000 (09:42 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 26 Jun 2003 09:42:28 +0000 (09:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7211 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxcursor.C
src/lyxcursor.h
src/lyxtext.h
src/text.C

index 939a36e74fdf18c323a260256747cbcc38b94705..aa646750ea6884faba10930c3244609f33ee93d5 100644 (file)
@@ -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, 
index 03ef3017562f6a85f6001c12f2e39e210d1ec362..2ec6731cc9565815b57a86a3e7a7d9d0ac191093 100644 (file)
@@ -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);
+}
+
index f19915e0657ff7e37cb6611978c536942321910e..32a2540579230b6ace5aad0dc130efb5ca410ead 100644 (file)
@@ -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
index 6aa0bdc3b16d96db610add00a78d9392bd20c518..3849d2665d5ec92eddb6ba8da9671f09e7e85844 100644 (file)
@@ -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
index d416acde64784f49f925dc7752edc99c7a8f4d4b..ead3e5231dbcbd196f6c822d0b4eb4be5305f38f 100644 (file)
@@ -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();