]> 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 3fa8ce606fc2c6080326bb3423c41a46864be598..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.
  */
@@ -16,6 +16,9 @@
 #include "MathData.h"
 #include "LaTeXFeatures.h"
 
+#include <ostream>
+
+
 namespace lyx {
 
 InsetMathBoldSymbol::InsetMathBoldSymbol(Kind kind)
@@ -29,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");
@@ -73,6 +91,7 @@ void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
 
 void InsetMathBoldSymbol::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        switch (kind_) {
        case AMS_BOLD:
                os << "\\boldsymbol{" << cell(0) << "}";