]> git.lyx.org Git - features.git/commitdiff
checkInsertChar() return values changes
authorAllan Rae <rae@lyx.org>
Thu, 22 Nov 2001 07:29:54 +0000 (07:29 +0000)
committerAllan Rae <rae@lyx.org>
Thu, 22 Nov 2001 07:29:54 +0000 (07:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3058 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/inset.h
src/insets/insetcollapsable.h

index cd232a9c4ef6b53d47b9ced52bcfe741638f397c..ec47b4e42abc1d2d0be547ca993774ffc645ffb7 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-22  Allan Rae  <rae@lyx.org>
+
+       * insetcollapsable.h: 
+       * inset.h: Changes to checkInsertChar() behaviour.
+       Now return value indicates whether chars can be inserted.
+
 2001-11-11  Michael A. Koziarski <michael@koziarski.org>
 
        * various:  updated to use the new LaTeXFeatures
index 47ef8c9125c1615014a778f17b5e7006ce4aa2ad..b05b4f692b6a472778e7546237911619784c854a 100644 (file)
@@ -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
index 1653bd6639ad84d793f091194e184e5decbd4f83..06cb34f34235bcdfc2a4fdf8c3959b9084d2a6fa 100644 (file)
@@ -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:
        ///