]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.cpp
requires is a keyword in C++2a
[lyx.git] / src / insets / InsetBibtex.cpp
index d20f67187cdaf652f9ecdda1d28590106eed60ef..bf70c44ae8ce08de6b91a5812cd0bb3b1b379e5d 100644 (file)
@@ -132,7 +132,7 @@ bool InsetBibtex::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetBibtex::editDatabases(docstring const db) const
+void InsetBibtex::editDatabases(docstring const db) const
 {
        vector<docstring> bibfilelist = getVectorFromString(getParam("bibfiles"));
 
@@ -266,6 +266,15 @@ void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
            && buffer().params().multibib == "child")
                return;
 
+       if (runparams.inDeletedInset) {
+               // We cannot strike-out bibligraphies,
+               // so we just output a note.
+               os << "\\textbf{"
+                  << buffer().B_("[BIBLIOGRAPHY DELETED!]")
+                  << "}";
+               return;
+       }
+
        string style = to_utf8(getParam("options")); // maybe empty! and with bibtotoc
        string bibtotoc;
        if (prefixIs(style, "bibtotoc")) {
@@ -363,7 +372,8 @@ void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
                           << "\\end{btSect}\n";
                }
                // bibtotoc option
-               if (!bibtotoc.empty() && !buffer().masterParams().useBibtopic()) {
+               if (!bibtotoc.empty() && !buffer().masterParams().useBibtopic()
+                   && !buffer().masterParams().documentClass().bibInToc()) {
                        // set label for hyperref, see http://www.lyx.org/trac/ticket/6470
                        if (buffer().masterParams().pdfoptions().use_hyperref)
                                        os << "\\phantomsection";
@@ -898,7 +908,7 @@ void InsetBibtex::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetBibtex::updateBuffer(ParIterator const &, UpdateType)
+void InsetBibtex::updateBuffer(ParIterator const &, UpdateType, bool const /*deleted*/)
 {
        buffer().registerBibfiles(getBibFiles());
        // record encoding of bib files for biblatex