]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.C
Fix command-line export
[lyx.git] / src / mathed / InsetMathHull.C
index 547ad9a108160555f353aee0717b88db7bbd120d..ac27c50a4802190f922fbafca1df87f16d29d000 100644 (file)
@@ -463,11 +463,12 @@ bool InsetMathHull::display() const
 }
 
 
-void InsetMathHull::getLabelList(Buffer const &, vector<string> & labels) const
+void InsetMathHull::getLabelList(Buffer const &, vector<docstring> & labels) const
 {
        for (row_type row = 0; row < nrows(); ++row)
                if (!label_[row].empty() && nonum_[row] != 1)
-                       labels.push_back(label_[row]);
+                       // FIXME UNICODE
+                       labels.push_back(lyx::from_utf8(label_[row]));
 }
 
 
@@ -1275,7 +1276,7 @@ void InsetMathHull::mutateToText()
                view_->getIntl()->getTransManager().TranslateAndInsert(*cit, lt);
 
        // remove ourselves
-       //theApp->lyxFunc().dispatch(LFUN_ESCAPE);
+       //lyx::dispatch(LFUN_ESCAPE);
 #endif
 }
 
@@ -1425,7 +1426,7 @@ void InsetMathHull::read(Buffer const &, LyXLex & lex)
 }
 
 
-int InsetMathHull::plaintext(Buffer const &, ostream & os,
+int InsetMathHull::plaintext(Buffer const &, lyx::odocstream & os,
                        OutputParams const &) const
 {
        if (0 && display()) {
@@ -1439,8 +1440,11 @@ int InsetMathHull::plaintext(Buffer const &, ostream & os,
                //metrics();
                return tpain.textheight();
        } else {
-               WriteStream wi(os, false, true);
+               std::ostringstream oss;
+               WriteStream wi(oss, false, true);
                wi << cell(0);
+               // FIXME UNICODE
+               os << lyx::from_utf8(oss.str());
                return wi.line();
        }
 }
@@ -1498,7 +1502,7 @@ int InsetMathHull::docbook(Buffer const & buf, ostream & os,
 }
 
 
-int InsetMathHull::textString(Buffer const & buf, ostream & os,
+int InsetMathHull::textString(Buffer const & buf, lyx::odocstream & os,
                       OutputParams const & op) const
 {
        return plaintext(buf, os, op);