From: Jean-Marc Lasgouttes Date: Thu, 13 Apr 2006 10:31:32 +0000 (+0000) Subject: * math_xarrowinset.C (validate): X-Git-Tag: 1.6.10~13348 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2fcae62a4d964e82c3bd15fffe45cd2881c486f6;p=features.git * math_xarrowinset.C (validate): * math_splitinset.C (validate): new methods; require amsmath (bug 2149). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13662 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_splitinset.C b/src/mathed/math_splitinset.C index b5ccfe3706..0d2a4f7f07 100644 --- a/src/mathed/math_splitinset.C +++ b/src/mathed/math_splitinset.C @@ -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::ostream & os) const name[0] = lyx::support::uppercase(name[0]); os << name << ' '; } + + +void MathSplitInset::validate(LaTeXFeatures & features) const +{ + features.require("amsmath"); + MathNestInset::validate(features); +} diff --git a/src/mathed/math_splitinset.h b/src/mathed/math_splitinset.h index 4d3063d617..db980147d1 100644 --- a/src/mathed/math_splitinset.h +++ b/src/mathed/math_splitinset.h @@ -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); diff --git a/src/mathed/math_xarrowinset.C b/src/mathed/math_xarrowinset.C index 3676171d54..744ff8dde8 100644 --- a/src/mathed/math_xarrowinset.C +++ b/src/mathed/math_xarrowinset.C @@ -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(NormalStream & os) const { os << "[xarrow " << name_ << ' ' << cell(0) << ' ' << cell(1) << ']'; } + + +void MathXArrowInset::validate(LaTeXFeatures & features) const +{ + features.require("amsmath"); + MathNestInset::validate(features); +} diff --git a/src/mathed/math_xarrowinset.h b/src/mathed/math_xarrowinset.h index dd0a5b1e24..0d00122e85 100644 --- a/src/mathed/math_xarrowinset.h +++ b/src/mathed/math_xarrowinset.h @@ -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 doClone() const;