#include "support/lstrings.h"
#include "support/lyxlib.h"
-#include "support/tostr.h"
+#include "support/convert.h"
#include "mathed/math_hullinset.h"
#include "mathed/math_macrotemplate.h"
using lyx::cap::replaceSelection;
using lyx::support::isStrUnsignedInt;
-using lyx::support::strToUnsignedInt;
-using lyx::support::atoi;
using lyx::support::token;
using std::endl;
#warning FIXME Check if the arg is in the domain of available selections.
#endif
if (isStrUnsignedInt(cmd.argument))
- pasteSelection(cur, strToUnsignedInt(cmd.argument));
+ pasteSelection(cur, convert<unsigned int>(cmd.argument));
else
pasteSelection(cur, 0);
cur.clearSelection(); // bug 393
else {
string s = cmd.argument;
string const s1 = token(s, ' ', 1);
- int const nargs = s1.empty() ? 0 : atoi(s1);
+ int const nargs = s1.empty() ? 0 : convert<int>(s1);
string const s2 = token(s, ' ', 2);
string const type = s2.empty() ? "newcommand" : s2;
cur.insert(new MathMacroTemplate(token(s, ' ', 0), nargs, s2));