From 2cdf2dfc3871e9909c477674c1229dabf9692fbf Mon Sep 17 00:00:00 2001 From: Allan Rae Date: Thu, 22 Nov 2001 07:29:54 +0000 Subject: [PATCH] checkInsertChar() return values changes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3058 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 6 ++++++ src/insets/inset.h | 11 ++++++++++- src/insets/insetcollapsable.h | 3 --- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index cd232a9c4e..ec47b4e42a 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2001-11-22 Allan Rae + + * insetcollapsable.h: + * inset.h: Changes to checkInsertChar() behaviour. + Now return value indicates whether chars can be inserted. + 2001-11-11 Michael A. Koziarski * various: updated to use the new LaTeXFeatures diff --git a/src/insets/inset.h b/src/insets/inset.h index 47ef8c9125..b05b4f692b 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -335,7 +335,7 @@ bool Inset::insetAllowed(Inset * in) const inline bool Inset::checkInsertChar(LyXFont &) { - return true; + return false; } // Updatable Insets. These insets can be locked and receive @@ -405,6 +405,9 @@ public: /// UpdatableInset(UpdatableInset const & in, bool same_id = false); + /// check if the font of the char we want inserting is correct + /// and modify it if it is not. + virtual bool checkInsertChar(LyXFont &); /// virtual EDITABLE editable() const; @@ -520,6 +523,12 @@ private: mutable bool block_drawing_; }; +inline +bool UpdatableInset::checkInsertChar(LyXFont &) +{ + return true; +} + /** * returns true if pointer argument is valid * and points to an editable inset diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 1653bd6639..06cb34f342 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -189,9 +189,6 @@ public: bool const & cs = true, bool const & mw = false); bool searchBackward(BufferView * bv, string const & str, bool const & cs = true, bool const & mw = false); - /// check if the font of the char we want inserting is correct - /// and modify it if it is not. - virtual bool checkInsertChar(LyXFont &) { return false; } protected: /// -- 2.39.2