mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
use static cast
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@300 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2cf98b74fc
commit
df8157e6b9
@ -302,7 +302,7 @@ extern "C" void math_cb(FL_OBJECT* ob, long data)
|
|||||||
if (current_view->available() && lyxrc->display_shortcuts) {
|
if (current_view->available() && lyxrc->display_shortcuts) {
|
||||||
minibuffer->Set("Inserting symbol ", s);
|
minibuffer->Set("Inserting symbol ", s);
|
||||||
}
|
}
|
||||||
current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_INSERT_MATH, s);
|
current_view->owner()->getLyXFunc()->Dispatch(LFUN_INSERT_MATH, s);
|
||||||
}
|
}
|
||||||
if (menu)
|
if (menu)
|
||||||
menu->Hide();
|
menu->Hide();
|
||||||
@ -351,7 +351,7 @@ Bool math_insert_greek(char const c)
|
|||||||
math_insert_symbol(s);
|
math_insert_symbol(s);
|
||||||
if (greek_kb_flag<2) {
|
if (greek_kb_flag<2) {
|
||||||
greek_kb_flag = 0;
|
greek_kb_flag = 0;
|
||||||
UnlockInset(current_view->currentBuffer()->the_locking_inset);
|
UnlockInset(current_view->buffer()->the_locking_inset);
|
||||||
}
|
}
|
||||||
return True;
|
return True;
|
||||||
} else
|
} else
|
||||||
@ -361,16 +361,16 @@ Bool math_insert_greek(char const c)
|
|||||||
void math_insert_symbol(char const* s)
|
void math_insert_symbol(char const* s)
|
||||||
{
|
{
|
||||||
if (current_view->available()) {
|
if (current_view->available()) {
|
||||||
if (!current_view->currentBuffer()->the_locking_inset) {
|
if (!current_view->buffer()->the_locking_inset) {
|
||||||
InsetFormula* new_inset = new InsetFormula();
|
InsetFormula* new_inset = new InsetFormula();
|
||||||
BeforeChange();
|
BeforeChange();
|
||||||
current_view->currentBuffer()->insertInset(new_inset);
|
current_view->buffer()->insertInset(new_inset);
|
||||||
// Update(1);//BUG
|
// Update(1);//BUG
|
||||||
new_inset->Edit(0,0);
|
new_inset->Edit(0,0);
|
||||||
new_inset->InsertSymbol(s);
|
new_inset->InsertSymbol(s);
|
||||||
} else
|
} else
|
||||||
if (current_view->currentBuffer()->the_locking_inset->LyxCode()==Inset::MATH_CODE)
|
if (current_view->buffer()->the_locking_inset->LyxCode()==Inset::MATH_CODE)
|
||||||
((InsetFormula*)current_view->currentBuffer()->the_locking_inset)->InsertSymbol(s);
|
static_cast<InsetFormula*>(current_view->buffer()->the_locking_inset)->InsertSymbol(s);
|
||||||
else
|
else
|
||||||
lyxerr << "Math error: attempt to write on a wrong "
|
lyxerr << "Math error: attempt to write on a wrong "
|
||||||
"class of inset." << endl;
|
"class of inset." << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user