]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.C
read ChangeLog, a lot of whitespace changes. experimental use of libtool
[lyx.git] / src / mathed / formulamacro.C
index 59a0b861be0cf8096924bf4b0153b77d5b196245..feccdfdd195a0a9ae827a27f697d9ca860e51609 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include <config.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #ifdef __GNUG__
 #pragma implementation "formulamacro.h"
@@ -60,10 +60,9 @@ InsetFormulaMacro::~InsetFormulaMacro()
 }
 
 
-Inset* InsetFormulaMacro::Clone()
+InsetFormulaMacro * InsetFormulaMacro::Clone() const
 {
-   InsetFormulaMacro* f = new InsetFormulaMacro(name);
-   return (Inset*)f;
+   return new InsetFormulaMacro(name);
 }
 
 
@@ -160,8 +159,8 @@ 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);
@@ -197,9 +196,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();
        }