]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_root.C
Hopefully fix the problem with stateText() in lyxfont.C
[lyx.git] / src / mathed / math_root.C
index f37fe0518c9ea2d1349870ad26583311f5599721..be1853c60f9bfb74ebc6aab02451073f94c584f3 100644 (file)
@@ -6,7 +6,7 @@
  *  Created:     January 1999
  *  Description: Root math object
  *
- *  Copyright: (c) 1999 Alejandro Aguilar Sierra
+ *  Copyright: 1999 Alejandro Aguilar Sierra
  *
  *   You are free to use and modify this code under the terms of
  *   the GNU General Public Licence version 2 or later.
 #include "math_iter.h"
 #include "math_root.h"
 
-MathRootInset::MathRootInset(short st): MathSqrtInset(st)
+using std::ostream;
+
+MathRootInset::MathRootInset(short st)
+       : MathSqrtInset(st)
 {
     idx = 1;
     uroot = new MathParInset(LM_ST_TEXT); 
@@ -134,31 +137,11 @@ void MathRootInset::SetFocus(int x, int)
 }
 
 
-void MathRootInset::Write(ostream & os)
+void MathRootInset::Write(ostream & os, bool fragile)
 {
-#ifdef USE_OSTREAM_ONLY
        os << '\\' << name << '[';
-       uroot->Write(os);  
+       uroot->Write(os, fragile);  
        os << "]{";
-       MathParInset::Write(os);
+       MathParInset::Write(os, fragile);
        os << '}';
-#else
-   string output;
-   MathRootInset::Write(output);
-   os << output;
-#endif
-}
-
-
-#ifndef USE_OSTREAM_ONLY
-void MathRootInset::Write(string & outf)
-{ 
-   outf += '\\';
-   outf += name;
-   outf += '[';
-   uroot->Write(outf);  
-   outf += "]{";
-   MathParInset::Write(outf);
-   outf += '}';
 }
-#endif