#include "frontends/Dialogs.h"
#include "insets/insetspecialchar.h"
#include "insets/insettext.h"
-#include "insets/insetbib.h"
#include "insets/insetquotes.h"
#include "insets/insetcommand.h"
#include "undo_funcs.h"
bv->updateInset(new_inset, true);
}
+
void doInsertInset(LyXText * lt, FuncRequest const & cmd,
bool edit, bool pastesel)
{
Inset * inset = createInset(cmd);
BufferView * bv = cmd.view();
-
+
if (inset) {
bool gotsel = false;
if (lt->selection.set()) {
else
delete inset;
}
-
}
}
case LFUN_UPCASE_WORD:
update(bv, false);
- changeCase(bv, LyXText::text_uppercase);
+ changeCase(*bv, LyXText::text_uppercase);
if (inset_owner)
bv->updateInset(inset_owner, true);
update(bv);
case LFUN_LOWCASE_WORD:
update(bv, false);
- changeCase(bv, LyXText::text_lowercase);
+ changeCase(*bv, LyXText::text_lowercase);
if (inset_owner)
bv->updateInset(inset_owner, true);
update(bv);
case LFUN_CAPITALIZE_WORD:
update(bv, false);
- changeCase(bv, LyXText::text_capitalization);
+ changeCase(*bv, LyXText::text_capitalization);
if (inset_owner)
bv->updateInset(inset_owner, true);
update(bv);
case LFUN_BEGINNINGBUFSEL:
if (inset_owner)
- return Inset::UNDISPATCHED;
+ return UNDISPATCHED;
update(bv, false);
cursorTop(bv);
finishChange(bv, true);
case LFUN_ENDBUFSEL:
if (inset_owner)
- return Inset::UNDISPATCHED;
+ return UNDISPATCHED;
update(bv, false);
cursorBottom(bv);
finishChange(bv, true);
case LFUN_HTMLURL: {
InsetCommandParams p("htmlurl");
- bv->owner()->getDialogs().createUrl(p.getAsString());
+ string const data = InsetCommandMailer::params2string("url", p);
+ bv->owner()->getDialogs().show("url", data, 0);
break;
}
case LFUN_URL: {
InsetCommandParams p("url");
- bv->owner()->getDialogs().createUrl(p.getAsString());
+ string const data = InsetCommandMailer::params2string("url", p);
+ bv->owner()->getDialogs().show("url", data, 0);
break;
}
case LFUN_INSET_CAPTION:
#endif
case LFUN_INSERT_NOTE:
- case LFUN_INSERT_BIBKEY:
+ case LFUN_INSERT_BIBITEM:
case LFUN_INSET_ERT:
case LFUN_INSET_FLOAT:
case LFUN_INSET_FOOTNOTE:
break;
default:
- return Inset::UNDISPATCHED;
+ return UNDISPATCHED;
}
- return Inset::DISPATCHED;
+ return DISPATCHED;
}