]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBoldSymbol.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathBoldSymbol.cpp
index d3633efc8c3dd15fa62b8ba47273ec4a3f249a3c..e53ff6c6cd5fdaec92bd8c42ddf7a22dcc95b9fc 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -32,6 +32,21 @@ Inset * InsetMathBoldSymbol::clone() const
 }
 
 
+docstring InsetMathBoldSymbol::name() const
+{
+       switch (kind_) {
+       case AMS_BOLD:
+               return from_ascii("boldsymbol");
+       case BM_BOLD:
+               return from_ascii("bm");
+       case BM_HEAVY:
+               return from_ascii("hm");
+       }
+       // avoid compiler warning
+       return docstring();
+}
+
+
 void InsetMathBoldSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        //FontSetChanger dummy(mi.base, "mathbf");
@@ -76,7 +91,7 @@ void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
 
 void InsetMathBoldSymbol::write(WriteStream & os) const
 {
-       bool brace = ensureMath(os);
+       MathEnsurer ensurer(os);
        switch (kind_) {
        case AMS_BOLD:
                os << "\\boldsymbol{" << cell(0) << "}";
@@ -88,7 +103,6 @@ void InsetMathBoldSymbol::write(WriteStream & os) const
                os << "\\hm{" << cell(0) << "}";
                break;
        }
-       os.pendingBrace(brace);
 }