[LyX/master] Move HullType functions declared in InsetMath.h into InsetMath.cpp

Yuriy Skalko yuriy.skalko at gmail.com
Thu Oct 29 13:25:18 UTC 2020


commit 524073d09f89ea8484db5bc20d78e7cef0deda89
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Mon Oct 26 20:16:28 2020 +0200

    Move HullType functions declared in InsetMath.h into InsetMath.cpp
---
 src/mathed/InsetMath.cpp     |   42 ++++++++++++++++++++++++++++++++++++++++++
 src/mathed/InsetMathHull.cpp |   42 ------------------------------------------
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp
index 1adeec1..33a9a4e 100644
--- a/src/mathed/InsetMath.cpp
+++ b/src/mathed/InsetMath.cpp
@@ -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");
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 4125bf6..43f4958 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -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)


More information about the lyx-cvs mailing list