]> git.lyx.org Git - lyx.git/commitdiff
compilation fixes when using lyxstring
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 2 May 2001 08:18:00 +0000 (08:18 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 2 May 2001 08:18:00 +0000 (08:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1975 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/math_macroarg.C
src/mathed/math_macrotemplate.C
src/mathed/math_macrotemplate.h

index 5989fef9c3a307e709761286e13497a06e032cf1..0ff21c4b8cb7504f7c4b54ca60099a676f6abd19 100644 (file)
@@ -1,3 +1,14 @@
+2001-05-02  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * math_macrotemplate.h: do not use explicitely std::string, but
+       string. 
+
+       * math_macroarg.C: avoid bringing the whole std:: namespace in
+       global-land. When you do that, there is an ambiguity between
+       lyxstring and std::string (which may be defined at the same time).
+
+       * formula.C (HandleExtern): add .c_str() to .str() (useful when
+       using lyxtring)
 
 2001-04-27 André Pönitz  <poenitz@htwm.de>
 
index e4bce63436ccba0758bb90c1691eac949c7a4a04..48d0b55581e30c0bd417f6a58e98afc618fa8b36 100644 (file)
@@ -1419,7 +1419,7 @@ void InsetFormula::HandleExtern(const string & arg, BufferView * bv)
        string outfile = "/tmp/lyx2" + arg + ".out";
        ostringstream os;
        par->WriteNormal(os); 
-       string code = os.str();
+       string code = os.str().c_str();
        string script = "lyx2" + arg + " '" + code + "' " + outfile;
        lyxerr << "calling: " << script << endl;
        Systemcalls cmd(Systemcalls::System, script, 0);
index 7a512f7563f1a9ac8a10a1200f5e5505301f94f6..91589b32e48067e0a751dc7796172bcb11d2cbf1 100644 (file)
@@ -10,8 +10,7 @@
 #include "Lsstream.h"
 #include "debug.h"
 
-
-using namespace std;
+using std::endl;
 
 MathMacroArgument::MathMacroArgument(int n)
        : MathedInset(string(), LM_OT_MACRO_ARG, LM_ST_TEXT),
index 7377ac9104fce7670641ab6814b92cee04cc6d57..89e3a4faf0b4678d06f82a075de7c291066afdf7 100644 (file)
@@ -12,7 +12,7 @@
 #include "debug.h"
 #include "Painter.h"
 
-using namespace std;
+//using namespace std;
 
 MathMacroTemplate::MathMacroTemplate() :
        MathParInset(LM_ST_TEXT, "undefined", LM_OT_MACRO),
index 12bdbc0cb3df0d5c9b0e951f84a007611c3b29a1..a6a5743632cf2a554360f01e1e8e88e584616765 100644 (file)
@@ -22,7 +22,7 @@ public:
        ///
        MathMacroTemplate();
        ///
-       MathMacroTemplate(std::string const & name, int nargs);
+       MathMacroTemplate(string const & name, int nargs);
        ///
        void WriteDef(std::ostream &, bool fragile) const;
        /// Number of arguments