]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[lyx.git] / src / insets / insetcommand.C
index 437924d0acb2a6a69c9eabddea8dffcfec19b503..9f85c9ea5c786c8d22b49e9770021f4d2de6464b 100644 (file)
@@ -89,9 +89,9 @@ void InsetCommand::Draw(LyXFont font, LyXScreen & scr,
 
 
 // In lyxf3 this will be just LaTeX
-void InsetCommand::Write(FILE * file)
+void InsetCommand::Write(ostream & os)
 {
-       fprintf(file, "LatexCommand %s\n", getCommand().c_str());
+       os << "LatexCommand " << getCommand() << "\n";
 }
 
 
@@ -118,12 +118,12 @@ void InsetCommand::scanCommand(string const & cmd)
                        if (nestdepth == 0) {
                                state = WS;
                        } else {
-                               nestdepth--;
+                               --nestdepth;
                        }
                }
                if ((state == Option  && c == '[') ||
                    (state == Content && c == '{')) {
-                       nestdepth++;
+                       ++nestdepth;
                }
                switch (state) {
                case Command:   tcommand += c; break;
@@ -169,9 +169,9 @@ void InsetCommand::Read(LyXLex & lex)
 }
 
 
-int InsetCommand::Latex(FILE * file, signed char /*fragile*/)
+int InsetCommand::Latex(ostream & os, signed char /*fragile*/)
 {
-       fprintf(file, "%s", getCommand().c_str());
+       os << getCommand();
        return 0;
 }