http://bugzilla.lyx.org/show_bug.cgi?id=2149

The fix (add validate() methods) looks straightforward and I plan to
apply to branch+trunk.

Comments?

JMarc

Index: src/mathed/math_splitinset.h
===================================================================
--- src/mathed/math_splitinset.h	(revision 13653)
+++ src/mathed/math_splitinset.h	(working copy)
@@ -31,6 +31,8 @@ public:
 	///
 	void infoize(std::ostream & os) const;
 	///
+	void validate(LaTeXFeatures & features) const;
+	///
 	int defaultColSpace(col_type) { return 0; }
 	///
 	char defaultColAlign(col_type);
Index: src/mathed/math_xarrowinset.C
===================================================================
--- src/mathed/math_xarrowinset.C	(revision 13653)
+++ src/mathed/math_xarrowinset.C	(working copy)
@@ -16,6 +16,8 @@
 #include "math_streamstr.h"
 #include "math_support.h"
 
+#include "LaTeXFeatures.h"
+
 using std::string;
 using std::auto_ptr;
 
@@ -67,3 +69,10 @@ void MathXArrowInset::normalize(NormalSt
 {
 	os << "[xarrow " << name_ << ' ' <<  cell(0) << ' ' << cell(1) << ']';
 }
+
+
+void MathXArrowInset::validate(LaTeXFeatures & features) const
+{
+	features.require("amsmath");
+	MathNestInset::validate(features);
+}
Index: src/mathed/math_xarrowinset.h
===================================================================
--- src/mathed/math_xarrowinset.h	(revision 13653)
+++ src/mathed/math_xarrowinset.h	(working copy)
@@ -28,6 +28,8 @@ public:
 	void metrics(MetricsInfo & mi, Dimension & dim) const;
 	///
 	void normalize(NormalStream & os) const;
+	///
+	void validate(LaTeXFeatures & features) const;
 
 private:
 	virtual std::auto_ptr<InsetBase> doClone() const;
Index: src/mathed/math_splitinset.C
===================================================================
--- src/mathed/math_splitinset.C	(revision 13653)
+++ src/mathed/math_splitinset.C	(working copy)
@@ -18,6 +18,7 @@
 #include "funcrequest.h"
 #include "FuncStatus.h"
 #include "gettext.h"
+#include "LaTeXFeatures.h"
 
 #include "support/lstrings.h"
 #include "support/std_ostream.h"
@@ -103,3 +104,10 @@ void MathSplitInset::infoize(std::ostrea
 	name[0] = lyx::support::uppercase(name[0]);
 	os << name << ' ';
 }
+
+
+void MathSplitInset::validate(LaTeXFeatures & features) const
+{
+	features.require("amsmath");
+	MathNestInset::validate(features);
+}

Reply via email to