Simply pulls the different validate() trees to InsetBase.
Ok?
Andre'
--
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
Index: insets/inset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.C,v
retrieving revision 1.97
diff -u -p -r1.97 inset.C
--- insets/inset.C 2 Jun 2003 10:03:22 -0000 1.97
+++ insets/inset.C 2 Jun 2003 16:00:17 -0000
@@ -60,10 +60,6 @@ Inset::EDITABLE Inset::editable() const
}
-void Inset::validate(LaTeXFeatures &) const
-{}
-
-
bool Inset::autoDelete() const
{
return false;
Index: insets/inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v
retrieving revision 1.96
diff -u -p -r1.96 inset.h
--- insets/inset.h 2 Jun 2003 10:03:22 -0000 1.96
+++ insets/inset.h 2 Jun 2003 16:00:17 -0000
@@ -23,7 +23,6 @@
#include <vector>
class LyXFont;
-class Dimension;
class Buffer;
class Painter;
class LatexRunParams;
@@ -35,8 +34,6 @@ class FuncRequest;
class WordLangTuple;
class ParagraphList;
-struct LaTeXFeatures;
-
namespace grfx {
class PreviewLoader;
}
@@ -194,8 +191,6 @@ public:
virtual int linuxdoc(Buffer const *, std::ostream &) const = 0;
///
virtual int docbook(Buffer const *, std::ostream &, bool) const = 0;
- /// Updates needed features for this inset.
- virtual void validate(LaTeXFeatures & features) const;
/// returns LyX code associated with the inset. Used for TOC, ...)
virtual Inset::Code lyxCode() const { return NO_CODE; }
Index: insets/insetbase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbase.C,v
retrieving revision 1.3
diff -u -p -r1.3 insetbase.C
--- insets/insetbase.C 19 May 2003 17:03:07 -0000 1.3
+++ insets/insetbase.C 2 Jun 2003 16:00:17 -0000
@@ -13,4 +13,3 @@ dispatch_result InsetBase::localDispatch
pos_type pos = 0;
return dispatch(cmd, idx, pos);
}
-
Index: insets/insetbase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbase.h,v
retrieving revision 1.5
diff -u -p -r1.5 insetbase.h
--- insets/insetbase.h 2 Jun 2003 10:03:22 -0000 1.5
+++ insets/insetbase.h 2 Jun 2003 16:00:17 -0000
@@ -19,6 +19,7 @@ class FuncRequest;
class MetricsInfo;
class Dimension;
class PainterInfo;
+class LaTeXFeatures;
/** Dispatch result codes
DISPATCHED = the inset catched the action
@@ -81,6 +82,8 @@ public:
virtual void cache(BufferView *) const {}
///
virtual BufferView * view() const { return 0; }
+ /// Updates needed features for this inset.
+ virtual void validate(LaTeXFeatures &) const {}
};
#endif
Index: mathed/math_inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_inset.h,v
retrieving revision 1.163
diff -u -p -r1.163 math_inset.h
--- mathed/math_inset.h 2 Jun 2003 10:03:25 -0000 1.163
+++ mathed/math_inset.h 2 Jun 2003 16:00:18 -0000
@@ -70,7 +70,6 @@ class MathMLStream;
class WriteStream;
class InfoStream;
-class LaTeXFeatures;
class BufferView;
class UpdatableInset;
class MathMacroTemplate;
@@ -213,8 +212,6 @@ public:
/// identifies things that can get \limits or \nolimits
virtual bool takesLimits() const { return false; }
- /// request "external features"
- virtual void validate(LaTeXFeatures &) const {}
/// char char code if possible
virtual void handleFont(string const &) {}
/// is this inset equal to a given other inset?