*/
#include <config.h>
-#include <stdlib.h>
+#include <cstdlib>
#ifdef __GNUG__
#pragma implementation "formulamacro.h"
}
-Inset* InsetFormulaMacro::Clone()
+InsetFormulaMacro * InsetFormulaMacro::Clone() const
{
- InsetFormulaMacro* f = new InsetFormulaMacro(name);
- return (Inset*)f;
+ return new InsetFormulaMacro(name);
}
} 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);
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();
}