]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.C
Two configuration fixes. Bugfree configure is coming soon (do you really believe...
[lyx.git] / src / mathed / formulamacro.C
index f25e1907ec19ecf7993dfd5287f762aa2c357fe6..806ad0cc6bba99f618cfa3f05adf1b753ebadd46 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include <config.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #ifdef __GNUG__
 #pragma implementation "formulamacro.h"
@@ -42,7 +42,7 @@ InsetFormulaMacro::InsetFormulaMacro():
 }
 
 
-InsetFormulaMacro::InsetFormulaMacro(LString nm, int na, bool /*e*/):
+InsetFormulaMacro::InsetFormulaMacro(string nm, int na, bool /*e*/):
         InsetFormula(true), name(nm)
 {
     tmacro = MathMacroTable::mathMTable.getTemplate(name.c_str());
@@ -82,7 +82,7 @@ int InsetFormulaMacro::Latex(FILE *file, signed char /*fragile*/)
 }
 
 
-int InsetFormulaMacro::Latex(LString &file, signed char /*fragile*/)
+int InsetFormulaMacro::Latex(string &file, signed char /*fragile*/)
 {
     int ret = 1;
     tmacro->WriteDef(file);
@@ -90,13 +90,13 @@ int InsetFormulaMacro::Latex(LString &file, signed char /*fragile*/)
 }
 
 
-int InsetFormulaMacro::Linuxdoc(LString &/*file*/)
+int InsetFormulaMacro::Linuxdoc(string &/*file*/)
 {
     return 0;
 }
 
 
-int InsetFormulaMacro::DocBook(LString &/*file*/)
+int InsetFormulaMacro::DocBook(string &/*file*/)
 {
     return 0;
 }
@@ -143,7 +143,7 @@ int InsetFormulaMacro::Width(LyXFont const &f) const
        tmacro->update();
        return InsetFormula::Width(f);
     }
-    LString ilabel(_("Macro: "));
+    string ilabel(_("Macro: "));
     ilabel += name;
     return 6 + f.stringWidth(ilabel);
 }
@@ -160,14 +160,14 @@ void InsetFormulaMacro::Draw(LyXFont font, LyXScreen &scr,
     } else {
        font.setColor(LyXFont::MATH);
        
-       int y=baseline - Ascent(font)+1;
-       int w=Width(font) - 2, h=(Ascent(font)+Descent(font)-2);
+       int y= baseline - Ascent(font)+1;
+       int w= Width(font) - 2, h= (Ascent(font)+Descent(font)-2);
 
        
        scr.fillRectangle(gc_lighted, int(x), y,  w,  h);
        scr.drawFrame(FL_UP_FRAME, int(x), y, w, h, FL_BLACK, -1); 
        
-        LString s(_("Macro: "));
+        string s(_("Macro: "));
         s += name;
         scr.drawString(font, s, baseline, int(x +2));
        x +=  Width(font) - 1;
@@ -197,9 +197,9 @@ void InsetFormulaMacro::InsetUnlock()
 
 bool InsetFormulaMacro::LocalDispatch(int action, char const *arg)
 {
-    if (action==LFUN_MATH_MACROARG) {
+    if (action == LFUN_MATH_MACROARG) {
        int i = atoi(arg) - 1;
-       if (i>=0 && i<tmacro->getNoArgs()) {
+       if (i>= 0 && i<tmacro->getNoArgs()) {
            mathcursor->Insert(tmacro->getMacroPar(i), LM_TC_INSET);
            InsetFormula::UpdateLocal();
        }