]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetspecialchar.C
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[lyx.git] / src / insets / insetspecialchar.C
index b11071e5dd77de57c889b9015d571f5770b98da3..f1074c604f4b0d5276ae906f46f90adb8e28f296 100644 (file)
@@ -106,7 +106,7 @@ void InsetSpecialChar::Draw(LyXFont font, LyXScreen & scr,
 
 
 // In lyxf3 this will be just LaTeX
-void InsetSpecialChar::Write(FILE * file)
+void InsetSpecialChar::Write(ostream & os)
 {
        string command;
        switch (kind) {
@@ -115,7 +115,7 @@ void InsetSpecialChar::Write(FILE * file)
        case LDOTS:             command = "\\ldots{}";  break;
        case MENU_SEPARATOR:    command = "\\menuseparator"; break;
        }
-       fprintf(file, "\\SpecialChar %s\n", command.c_str());
+       os << "\\SpecialChar " << command << "\n";
 }
 
 
@@ -138,12 +138,12 @@ void InsetSpecialChar::Read(LyXLex & lex)
 }
 
 
-int InsetSpecialChar::Latex(FILE * file, signed char /*fragile*/)
+int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/)
 {
        string command;
        signed char dummy = 0;
        Latex(command, dummy);
-       fprintf(file, "%s", command.c_str());
+       os << command;
        return 0;
 }
 
@@ -184,7 +184,7 @@ int InsetSpecialChar::DocBook(string & file)
 }
 
 
-InsetSpecialChar * InsetSpecialChar::Clone() const
+Inset * InsetSpecialChar::Clone() const
 {
        return new InsetSpecialChar(kind);
 }