From 360a1d74858e31f6c369322f4da904c5a8855a33 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 8 Feb 2001 15:59:42 +0000 Subject: [PATCH 1/1] compilation fix for mathed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1465 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 8 +++++++- src/mathed/math_macro.C | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index d1d0703396..aa81690a58 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,6 +1,12 @@ +2001-02-08 Jean-Marc Lasgouttes + + * math_macro.C (draw): add .c_str() to .str() (useful when + compiling with lyxstring, but STL sstream). + (Metrics): ditto. + 2001-02-08 Andre Poenitz - * several files: get rid of reinterpret_cast + * several files: get rid of reinterpret_cast. 2001-02-04 Allan Rae diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index e0e77fffe4..493138c315 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -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); } } -- 2.39.2