]> git.lyx.org Git - lyx.git/commitdiff
compilation fix for mathed
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Feb 2001 15:59:42 +0000 (15:59 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Feb 2001 15:59:42 +0000 (15:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1465 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_macro.C

index d1d07033969247c6357d7ac9a21d822dc755ee1f..aa81690a58a8b3d2a16503ed7e6c5c4cdc25f268 100644 (file)
@@ -1,6 +1,12 @@
+2001-02-08  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * math_macro.C (draw): add .c_str() to .str() (useful when
+       compiling with lyxstring, but STL sstream).
+       (Metrics): ditto.
+
 2001-02-08  Andre Poenitz  <poenitz@HTWM.De>
 
-       * several files: get rid of reinterpret_cast
+       * several files: get rid of reinterpret_cast.
 
 2001-02-04  Allan Rae  <rae@lyx.org>
 
index e0e77fffe41eff684b7b4c6ed2d709e622f54989..493138c3157b25baf72dfe9fd175bf1a6c989fba 100644 (file)
@@ -222,7 +222,7 @@ void MathMacroArgument::draw(Painter & pain, int x, int baseline)
        else {
                std::ostringstream ost;
                ost << '#' << number;
-               drawStr(pain, LM_TC_TEX, size, x, baseline, ost.str());
+               drawStr(pain, LM_TC_TEX, size, x, baseline, ost.str().c_str());
        }
 }
 
@@ -235,8 +235,9 @@ void MathMacroArgument::Metrics()
        else {
                std::ostringstream ost;
                ost << '#' << number;
-               width = mathed_string_width(LM_TC_TEX, size, ost.str());
-               mathed_string_height(LM_TC_TEX, size, ost.str(), ascent, descent);
+               width = mathed_string_width(LM_TC_TEX, size, ost.str().c_str());
+               mathed_string_height(LM_TC_TEX, size, ost.str().c_str(),
+                                    ascent, descent);
        }
 }