#include "ParagraphParameters.h"
#include "insets/insetcommand.h"
+#include "insets/insetexternal.h"
#include "insets/insettabular.h"
#include "mathed/formulamacro.h"
// jump back to owner if an InsetText, so
// we get back to the InsetTabular or whatever
if (inset->lyxCode() == Inset::TEXT_CODE)
- inset = static_cast<UpdatableInset*>(inset->owner());
+ inset = inset->owner();
Inset::Code code = inset->lyxCode();
switch (code) {
string const str = bformat(_("Saving document %1$s..."),
MakeDisplayPath(owner->buffer()->fileName()));
owner->message(str);
- MenuWrite(view(), owner->buffer());
+ MenuWrite(owner->buffer());
owner->message(str + _(" done."));
} else
- WriteAs(view(), owner->buffer());
+ WriteAs(owner->buffer());
break;
case LFUN_WRITEAS:
- WriteAs(view(), owner->buffer(), argument);
+ WriteAs(owner->buffer(), argument);
break;
case LFUN_MENURELOAD: {
<< id << ']' << endl;
break;
} else {
- lyxerr[Debug::INFO] << "Paragraph " << (*par)->id()
+ lyxerr[Debug::INFO] << "Paragraph " << par->id()
<< " found." << endl;
}
if (view()->theLockingInset())
view()->unlockInset(view()->theLockingInset());
- if ((*par)->inInset()) {
+ if (par->inInset()) {
FuncRequest cmd(view(), LFUN_INSET_EDIT, "left");
- (*par)->inInset()->localDispatch(cmd);
+ par->inInset()->localDispatch(cmd);
}
// Set the cursor
- view()->getLyXText()->setCursor(*par, 0);
+ view()->getLyXText()->setCursor(par.pit(), 0);
view()->switchKeyMap();
owner->view_state_changed();
owner->getDialogs().toggleTooltips();
break;
+ case LFUN_EXTERNAL_EDIT: {
+ InsetExternal()
+ .localDispatch(FuncRequest(view(), action, argument));
+ break;
+ }
+
default:
// Then if it was none of the above
// Trying the BufferView::pimpl dispatch: