]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.C
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / insetref.C
index da9df59036151ad55b183248b54118fe4c0e20d7..cdc3caf9bd416757fd5a675ddb6f46a68113ac68 100644 (file)
@@ -10,9 +10,9 @@
 #include "debug.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "lyxfunc.h"
 #include "LyXView.h"
 #include "frontends/Dialogs.h"
+#include "lyxfunc.h"
 
 using std::ostream;
 
@@ -123,3 +123,18 @@ InsetRef::type_info InsetRef::types[] = {
        { "prettyref",  N_("PrettyRef"),                N_("PrettyRef: ")},
        { "", "", "" }
 };
+
+
+int InsetRef::getType(string const & name)
+{
+       for (int i = 0; !types[i].latex_name.empty(); ++i)
+               if (name == types[i].latex_name)
+                       return i;
+       return 0;
+}
+
+
+string const & InsetRef::getName(int type)
+{
+       return types[type].latex_name;
+}