]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
Inset::forceLTR() only determines whether explicit switches are needed
[lyx.git] / src / factory.cpp
index 6f17797ada95b88c45961f23f7a6b9ca5cf212ad..a465a55e86db268b622a9874f81a4bd3d011c943 100644 (file)
@@ -34,6 +34,7 @@
 #include "insets/InsetHyperlink.h"
 #include "insets/InsetInclude.h"
 #include "insets/InsetIndex.h"
+#include "insets/InsetIndexMacro.cpp"
 #include "insets/InsetInfo.h"
 #include "insets/InsetIPA.h"
 #include "insets/InsetIPAMacro.h"
@@ -159,6 +160,16 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
                        return new InsetIPADeco(buf, arg2);
                }
 
+               case LFUN_INDEXMACRO_INSERT: {
+                       string const arg = cmd.getArg(0);
+                       if (arg != "see" && arg != "seealso"
+                           && arg != "subentry" && arg != "sortkey") {
+                               LYXERR0("LFUN_INDEXMACRO_INSERT: wrong argument");
+                               return nullptr;
+                       }
+                       return new InsetIndexMacro(buf, arg);
+               }
+
                case LFUN_ERT_INSERT:
                        return new InsetERT(buf);
 
@@ -667,6 +678,9 @@ Inset * readInset(Lexer & lex, Buffer * buf)
                        inset.reset(new InsetCaption(buf, s));
                } else if (tmptok == "Index") {
                        inset.reset(new InsetIndex(buf, InsetIndexParams()));
+               } else if (tmptok == "IndexMacro") {
+                       string s = lex.getString();
+                       inset.reset(new InsetIndexMacro(buf, s));
                } else if (tmptok == "FloatList") {
                        inset.reset(new InsetFloatList(buf));
                } else if (tmptok == "Info") {