#include "insets/insetbib.h"
#include "insets/insettext.h"
#include "insets/insetert.h"
+#include "insets/insetgraphics.h"
#include "mathed/formulamacro.h"
#include "toolbar.h"
#include "spellchecker.h" // RVDK_PATCH_5
extern void LoadLyXFile(string const &);
extern void Reconfigure(BufferView *);
-extern int current_layout;
+extern LyXTextClass::size_type current_layout;
extern int getISOCodeFromLaTeX(char *);
extern void ShowLatexLog();
case LFUN_FIGURE:
Figure();
break;
-
+
+ case LFUN_INSERT_GRAPHICS:
+ {
+ Inset * new_inset = new InsetGraphics;
+ owner->view()->insertInset(new_inset);
+ break;
+ }
+
case LFUN_AUTOSAVE:
AutoSave();
break;
// and current buffer's textclass (number). */
LyXTextClassList::ClassList::size_type tclass =
owner->view()->text->parameters->textclass;
- pair <bool, int> layout =
+ pair <bool, LyXTextClass::size_type> layout =
textclasslist.NumberOfLayout(tclass, argument);
// If the entry is obsolete, use the new one instead.
// --- text changing commands ------------------------
case LFUN_BREAKLINE:
+#if 1
owner->view()->beforeChange();
owner->view()->text->InsertChar(LyXParagraph::META_NEWLINE);
owner->view()->smallUpdate(1);
SetUpdateTimer(0.01);
moveCursorUpdate(false);
+#else
+ owner->view()->newline();
+#endif
break;
case LFUN_PROTECTEDSPACE:
+#if 1
+ owner->view()->protectedBlank();
+#else
owner->view()->beforeChange();
owner->view()->text->
InsertChar(LyXParagraph::META_PROTECTED_SEPARATOR);
owner->view()->smallUpdate(1);
SetUpdateTimer();
moveCursorUpdate(false);
+#endif
break;
case LFUN_SETMARK: