#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
-#include "support/gettext.h"
#include "LaTeXFeatures.h"
#include "LyXFunc.h"
#include "OutputParams.h"
+#include "ParIterator.h"
#include "sgml.h"
+#include "TocBackend.h"
#include "support/docstream.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
using namespace std;
}
+void InsetRef::addToToc(Buffer const & buf,
+ ParConstIterator const & cpit) const
+{
+ docstring const & label = getParam("reference");
+ Toc & toc = buf.tocBackend().toc("label");
+ Toc::const_iterator it = toc.begin();
+ Toc::const_iterator end = toc.end();
+ for (; it != end; ++it) {
+ if (it->str() == label) {
+ ++it;
+ toc.insert(it, TocItem(cpit, 1, getScreenLabel(buf)));
+ break;
+ }
+ }
+}
+
+
void InsetRef::validate(LaTeXFeatures & features) const
{
if (getCmdName() == "vref" || getCmdName() == "vpageref")