]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
#7379 avoid the wrap spell check question when buffer is empty
[lyx.git] / src / insets / InsetCitation.cpp
index 1ef7e0fb000ff455dae48cc1748ab380d2d2aa6b..7780f24a8d09c721b3cede8b6ac4fd1787ad68b9 100644 (file)
@@ -481,7 +481,7 @@ void InsetCitation::updateBuffer(ParIterator const &, UpdateType)
 }
 
 
-void InsetCitation::addToToc(DocIterator const & cpit)
+void InsetCitation::addToToc(DocIterator const & cpit) const
 {
        // NOTE
        // XHTML output uses the TOC to collect the citations
@@ -546,11 +546,17 @@ void InsetCitation::toString(odocstream & os) const
 }
 
 
+void InsetCitation::forToc(docstring & os, size_t) const
+{
+       os += screenLabel();
+}
+
+
 // Have to overwrite the default InsetCommand method in order to check that
 // the \cite command is valid. Eg, the user has natbib enabled, inputs some
 // citations and then changes his mind, turning natbib support off. The output
 // should revert to \cite[]{}
-int InsetCitation::latex(odocstream & os, OutputParams const & runparams) const
+void InsetCitation::latex(otexstream & os, OutputParams const & runparams) const
 {
        CiteEngine cite_engine = buffer().params().citeEngine();
        BiblioInfo const & bi = buffer().masterBibInfo();
@@ -578,8 +584,6 @@ int InsetCitation::latex(odocstream & os, OutputParams const & runparams) const
 
        if (runparams.inulemcmd)
                os << "}";
-
-       return 0;
 }