]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
go through horrendous contortions to work around font breakage in every
[lyx.git] / src / lyxfunc.C
index b1a737955eaa2cac3aad98bb2f8b0d3902fbee7e..bf551cd8b55ba52548abb52d28b459770eb39c6b 100644 (file)
@@ -44,6 +44,7 @@
 #include "ParagraphParameters.h"
 
 #include "insets/insetcommand.h"
+#include "insets/insetexternal.h"
 #include "insets/insettabular.h"
 
 #include "mathed/formulamacro.h"
@@ -501,7 +502,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                // 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) {
@@ -1056,14 +1057,14 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                        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: {
@@ -1362,18 +1363,18 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                                            << 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();
 
@@ -1588,6 +1589,12 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                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: