]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
Merge remote-tracking branch 'features/scroll-reloaded'
[lyx.git] / src / insets / InsetCitation.cpp
index 96620c1412270df573658d2eea5443c02961d766..8f697993b143c94d43d011c2a6fbd50bdf5bfa80 100644 (file)
@@ -33,6 +33,7 @@
 #include "support/lstrings.h"
 
 #include <algorithm>
+#include <climits>
 
 using namespace std;
 using namespace lyx::support;
@@ -273,8 +274,8 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const
        buffer().params().documentClass().addCiteMacro("!textafter", to_utf8(after));
        */
        docstring label;
-       vector<docstring> const keys = getVectorFromString(key);
-       label = biblist.getLabel(keys, buffer(), cite_type, for_xhtml, before, after);
+       vector<docstring> keys = getVectorFromString(key);
+       label = biblist.getLabel(keys, buffer(), cite_type, for_xhtml, UINT_MAX, before, after);
        return label;
 }
 
@@ -333,9 +334,10 @@ void InsetCitation::updateBuffer(ParIterator const &, UpdateType)
 void InsetCitation::addToToc(DocIterator const & cpit, bool output_active) const
 {
        // 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.
+       // BiblioInfo::collectCitedEntries() uses the TOC to collect the citations 
+       // from the document. It is used indirectly, via BiblioInfo::makeCitationLables,
+       // by both XHTML and plaintext output. So, if we change what goes into the TOC,
+       // then we will also need to change that routine.
        docstring const tocitem = getParam("key");
        Toc & toc = buffer().tocBackend().toc("citation");
        toc.push_back(TocItem(cpit, 0, tocitem, output_active));
@@ -403,7 +405,7 @@ void InsetCitation::toString(odocstream & os) const
 }
 
 
-void InsetCitation::forToc(docstring & os, size_t) const
+void InsetCitation::forOutliner(docstring & os, size_t) const
 {
        os += screenLabel();
 }