]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / insets / InsetCitation.cpp
index 9d2a4b1e16bb912e38fbfb377d5c352378596832..26e0fe49046ef535bfec6853069769a0d012cdeb 100644 (file)
@@ -18,7 +18,6 @@
 #include "BufferParams.h"
 #include "BufferView.h"
 #include "DispatchResult.h"
-#include "FuncRequest.h"
 #include "LaTeXFeatures.h"
 #include "output_xhtml.h"
 #include "ParIterator.h"
@@ -41,7 +40,7 @@ ParamInfo InsetCitation::param_info_;
 
 
 InsetCitation::InsetCitation(Buffer * buf, InsetCommandParams const & p)
-       : InsetCommand(buf, p, "citation")
+       : InsetCommand(buf, p)
 {}
 
 
@@ -482,8 +481,13 @@ void InsetCitation::updateBuffer(ParIterator const &, UpdateType)
 
 void InsetCitation::addToToc(DocIterator const & cpit)
 {
+       // NOTE
+       // XHTML output uses the TOC to collect the citations
+       // from the document. So if this gets changed, then we
+       // will need to change how the citations are collected.
+       docstring const tocitem = getParam("key");
        Toc & toc = buffer().tocBackend().toc("citation");
-       toc.push_back(TocItem(cpit, 0, getParam("key")));
+       toc.push_back(TocItem(cpit, 0, tocitem));
 }