]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.h
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / lyxcursor.h
index 0fdf06a2961d30637f34f768f4fea6e619932d55..a3025e4073fe594bd6beffa275fb32bbd1d0318f 100644 (file)
@@ -28,7 +28,7 @@ public:
        ///
        void par(Paragraph * p);
        ///
-       Paragraph * par();
+       //Paragraph * par();
        ///
        Paragraph * par() const;
        ///
@@ -54,7 +54,7 @@ public:
        ///
        void row(Row * r);
        ///
-       Row * row();
+       //Row * row();
        ///
        Row * row() const;
 private:
@@ -90,4 +90,42 @@ bool operator!=(LyXCursor const & a, LyXCursor const & b)
        return !(a == b);
 }
 
+///
+inline
+bool operator<(LyXCursor const & a, LyXCursor const & b) 
+{
+       // Can this be done in a nother way?
+       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)
+{
+#if 0
+       return (a > b || a == b);
+#else
+       return !(a < b);
+#endif
+}
+
+
+///
+inline
+bool operator<=(LyXCursor const & a, LyXCursor const & b)
+{
+#if 0
+       return (a < b || a == b);
+#else
+       return !(a > b);
+#endif
+}
+
 #endif