#include "factory.h"
-#include "Buffer.h"
-#include "BufferParams.h"
-#include "FloatList.h"
#include "FuncRequest.h"
-#include "Lexer.h"
#include "LyX.h"
-#include "TextClass.h"
#include "insets/InsetBibitem.h"
#include "insets/InsetBibtex.h"
#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"
#include "insets/InsetArgument.h"
#include "insets/InsetPhantom.h"
#include "insets/InsetPreview.h"
+#include "insets/InsetQuotes.h"
#include "insets/InsetRef.h"
#include "insets/InsetScript.h"
#include "insets/InsetSeparator.h"
#include "support/debug.h"
#include "support/ExceptionMessage.h"
-#include "support/lassert.h"
+#include "support/Lexer.h"
#include "support/lstrings.h"
#include "support/unique_ptr.h"
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);
}
case LFUN_INDEX_INSERT: {
- docstring arg = cmd.argument();
+ docstring const & arg = cmd.argument();
return new InsetIndex(buf, InsetIndexParams(arg));
}
}
case INDEX_CODE: {
- docstring arg = cmd.argument();
+ docstring const & arg = cmd.argument();
return new InsetIndex(buf, InsetIndexParams(arg));
}
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") {