]> git.lyx.org Git - features.git/commitdiff
Move HullType functions declared in InsetMath.h into InsetMath.cpp
authorYuriy Skalko <yuriy.skalko@gmail.com>
Mon, 26 Oct 2020 18:16:28 +0000 (20:16 +0200)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Thu, 29 Oct 2020 13:52:28 +0000 (15:52 +0200)
src/mathed/InsetMath.cpp
src/mathed/InsetMathHull.cpp

index 1adeec10a834f80df8728227cb92c4bacb79feae..33a9a4e6b4a7f20e3e94b55a572450998ba55ca7 100644 (file)
@@ -30,6 +30,48 @@ using namespace std;
 
 namespace lyx {
 
+HullType hullType(docstring const & s)
+{
+       if (s == "none")      return hullNone;
+       if (s == "simple")    return hullSimple;
+       if (s == "equation")  return hullEquation;
+       if (s == "eqnarray")  return hullEqnArray;
+       if (s == "align")     return hullAlign;
+       if (s == "alignat")   return hullAlignAt;
+       if (s == "xalignat")  return hullXAlignAt;
+       if (s == "xxalignat") return hullXXAlignAt;
+       if (s == "multline")  return hullMultline;
+       if (s == "gather")    return hullGather;
+       if (s == "flalign")   return hullFlAlign;
+       if (s == "regexp")    return hullRegexp;
+       lyxerr << "unknown hull type '" << to_utf8(s) << "'" << endl;
+       return hullUnknown;
+}
+
+
+docstring hullName(HullType type)
+{
+       switch (type) {
+       case hullNone:       return from_ascii("none");
+       case hullSimple:     return from_ascii("simple");
+       case hullEquation:   return from_ascii("equation");
+       case hullEqnArray:   return from_ascii("eqnarray");
+       case hullAlign:      return from_ascii("align");
+       case hullAlignAt:    return from_ascii("alignat");
+       case hullXAlignAt:   return from_ascii("xalignat");
+       case hullXXAlignAt:  return from_ascii("xxalignat");
+       case hullMultline:   return from_ascii("multline");
+       case hullGather:     return from_ascii("gather");
+       case hullFlAlign:    return from_ascii("flalign");
+       case hullRegexp:     return from_ascii("regexp");
+       case hullUnknown:
+               lyxerr << "unknown hull type" << endl;
+               break;
+       }
+       return from_ascii("none");
+}
+
+
 docstring InsetMath::name() const
 {
        return from_utf8("Unknown");
index 4125bf6ee5e867fafad72d73627c482dbf26a16c..43f49584afcc236866c5540356343576420b3085 100644 (file)
@@ -147,51 +147,9 @@ namespace {
                        os << "}\\\\\n";
        }
 
-
 } // namespace
 
 
-HullType hullType(docstring const & s)
-{
-       if (s == "none")      return hullNone;
-       if (s == "simple")    return hullSimple;
-       if (s == "equation")  return hullEquation;
-       if (s == "eqnarray")  return hullEqnArray;
-       if (s == "align")     return hullAlign;
-       if (s == "alignat")   return hullAlignAt;
-       if (s == "xalignat")  return hullXAlignAt;
-       if (s == "xxalignat") return hullXXAlignAt;
-       if (s == "multline")  return hullMultline;
-       if (s == "gather")    return hullGather;
-       if (s == "flalign")   return hullFlAlign;
-       if (s == "regexp")    return hullRegexp;
-       lyxerr << "unknown hull type '" << to_utf8(s) << "'" << endl;
-       return hullUnknown;
-}
-
-
-docstring hullName(HullType type)
-{
-       switch (type) {
-       case hullNone:       return from_ascii("none");
-       case hullSimple:     return from_ascii("simple");
-       case hullEquation:   return from_ascii("equation");
-       case hullEqnArray:   return from_ascii("eqnarray");
-       case hullAlign:      return from_ascii("align");
-       case hullAlignAt:    return from_ascii("alignat");
-       case hullXAlignAt:   return from_ascii("xalignat");
-       case hullXXAlignAt:  return from_ascii("xxalignat");
-       case hullMultline:   return from_ascii("multline");
-       case hullGather:     return from_ascii("gather");
-       case hullFlAlign:    return from_ascii("flalign");
-       case hullRegexp:     return from_ascii("regexp");
-       case hullUnknown:
-               lyxerr << "unknown hull type" << endl;
-               break;
-       }
-       return from_ascii("none");
-}
-
 static InsetLabel * dummy_pointer = 0;
 
 InsetMathHull::InsetMathHull(Buffer * buf)