Implement LFUN_UNICODE_INSERT in mathed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34351 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-04-30 22:23:19 +00:00
parent b24862e754
commit 7d4ca5033e

View File

@ -1193,7 +1193,23 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
cur.niceInsert(cmd.argument());
}
break;
}
case LFUN_UNICODE_INSERT: {
if (cmd.argument().empty())
break;
docstring hexstring = cmd.argument();
if (isHex(hexstring)) {
char_type c = hexToInt(hexstring);
if (c >= 32 && c < 0x10ffff) {
docstring s = docstring(1, c);
FuncCode code = currentMode() == MATH_MODE ?
LFUN_MATH_INSERT : LFUN_SELF_INSERT;
lyx::dispatch(FuncRequest(code, s));
}
}
break;
}
case LFUN_DIALOG_SHOW_NEW_INSET: {
docstring const & name = cmd.argument();