From 3b4ee1725c8911db94b71cef91b92387300875a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 12 Dec 2001 12:07:38 +0000 Subject: [PATCH] add inequelaity operator for lyxlength git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3196 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/lyxlength.C | 6 ++++++ src/lyxlength.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6f2655e34f..ff7482b25b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-12-12 Lars Gullik Bjønnes + + * lyxlength.[Ch] (operator!=): new function + 2001-12-12 Jean-Marc Lasgouttes * text.C (workWidth): use Inset::parOwner to find out where the diff --git a/src/lyxlength.C b/src/lyxlength.C index 477f8a1050..4fcb67bb7e 100644 --- a/src/lyxlength.C +++ b/src/lyxlength.C @@ -111,3 +111,9 @@ bool operator==(LyXLength const & l1, LyXLength const & l2) { return l1.value() == l2.value() && l1.unit() == l2.unit(); } + + +bool operator!=(LyXLength const & l1, LyXLength const & l2) +{ + return !(l1 == l2); +} diff --git a/src/lyxlength.h b/src/lyxlength.h index cabb28d225..8b75cb62ff 100644 --- a/src/lyxlength.h +++ b/src/lyxlength.h @@ -98,6 +98,8 @@ private: /// bool operator==(LyXLength const & l1, LyXLength const & l2); /// +bool operator!=(LyXLength const & l1, LyXLength const & l2); +/// bool isValidLength(string const & data, LyXLength * result); /// char const * stringFromUnit(int unit);