]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_extern.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_extern.C
index 99e381d78aaf7cee47c9e96e39c52135d44a4582..28f961cbd26977fc5afd1ab04bc7312473e16ddd 100644 (file)
 #include "math_stringinset.h"
 #include "math_symbolinset.h"
 #include "math_parser.h"
-#include "support/std_sstream.h"
 #include "debug.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
 #include <algorithm>
+#include <sstream>
 
 using lyx::support::cmd_ret;
 using lyx::support::getVectorFromString;
@@ -200,7 +200,7 @@ bool extractString(MathAtom const & at, string & str)
 // convert this inset somehow to a number
 bool extractNumber(MathArray const & ar, int & i)
 {
-       istringstream is(charSequence(ar.begin(), ar.end()).c_str());
+       istringstream is(charSequence(ar.begin(), ar.end()));
        is >> i;
        return is;
 }
@@ -208,7 +208,7 @@ bool extractNumber(MathArray const & ar, int & i)
 
 bool extractNumber(MathArray const & ar, double & d)
 {
-       istringstream is(charSequence(ar.begin(), ar.end()).c_str());
+       istringstream is(charSequence(ar.begin(), ar.end()));
        is >> d;
        return is;
 }
@@ -393,13 +393,13 @@ void extractNumbers(MathArray & ar)
 // search deliminiters
 //
 
-bool testOpenParan(MathAtom const & at)
+bool testOpenParen(MathAtom const & at)
 {
        return testString(at, "(");
 }
 
 
-bool testCloseParan(MathAtom const & at)
+bool testCloseParen(MathAtom const & at)
 {
        return testString(at, ")");
 }
@@ -415,7 +415,7 @@ MathAtom replaceDelims(const MathArray & ar)
 void extractDelims(MathArray & ar)
 {
        //lyxerr << "\nDelims from: " << ar << endl;
-       replaceNested(ar, testOpenParan, testCloseParan, replaceDelims);
+       replaceNested(ar, testOpenParen, testCloseParen, replaceDelims);
        //lyxerr << "\nDelims to: " << ar << endl;
 }
 
@@ -963,7 +963,7 @@ namespace {
                                break;
 
                        // search line with "Incorrect syntax"
-                       istringstream is(out.c_str());
+                       istringstream is(out);
                        string line;
                        while (is) {
                                getline(is, line);
@@ -1080,7 +1080,7 @@ namespace {
                        string out = captureOutput("mint -i 1 -S -s -q -q", expr + ';');
                        if (out.empty())
                                break; // expression syntax is ok
-                       istringstream is(out.c_str());
+                       istringstream is(out);
                        string line;
                        getline(is, line);
                        if (line.find("on line") != 0)
@@ -1134,7 +1134,7 @@ namespace {
                                break;
 
                        // search line with single caret
-                       istringstream is(out.c_str());
+                       istringstream is(out);
                        string line;
                        while (is) {
                                getline(is, line);