commit 4859a1f6bb834aa5efa4a32e7619cc7a3347dc0c
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Jan 15 15:40:20 2017 +0100

    Don't load bibtopic with Biblatex
---
 src/BufferParams.h                |    6 +++++-
 src/frontends/qt4/GuiBibtex.cpp   |    2 +-
 src/frontends/qt4/GuiDocument.cpp |    5 ++---
 src/insets/InsetBibtex.cpp        |   10 +++++-----
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/BufferParams.h b/src/BufferParams.h
index 5083b68..a09366b 100644
--- a/src/BufferParams.h
+++ b/src/BufferParams.h
@@ -379,7 +379,9 @@ public:
        /// All packages that can be switched on or off
        static std::map<std::string, std::string> const & auto_packages();
        /// Split bibliography?
-       bool use_bibtopic;
+       bool useBibtopic() const { return use_bibtopic && !useBiblatex(); }
+       /// Set split bibliography
+       void bibtopic(bool const b) { use_bibtopic = b; }
        /// Split the index?
        bool use_indices;
        /// Save transient properties?
@@ -552,6 +554,8 @@ private:
        CiteEngineType cite_engine_type_;
        /// the default BibTeX style file for the document
        std::string biblio_style;
+       /// Split bibliography?
+       bool use_bibtopic;
        ///
        DocumentClassPtr doc_class_;
        ///
diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp
index bb266d7..b49d663 100644
--- a/src/frontends/qt4/GuiBibtex.cpp
+++ b/src/frontends/qt4/GuiBibtex.cpp
@@ -516,7 +516,7 @@ void GuiBibtex::rescanBibStyles() const
 
 bool GuiBibtex::usingBibtopic() const
 {
-       return buffer().params().use_bibtopic;
+       return buffer().params().useBibtopic();
 }
 
 
diff --git a/src/frontends/qt4/GuiDocument.cpp 
b/src/frontends/qt4/GuiDocument.cpp
index 20fbd02..fa4a6e2 100644
--- a/src/frontends/qt4/GuiDocument.cpp
+++ b/src/frontends/qt4/GuiDocument.cpp
@@ -2726,8 +2726,7 @@ void GuiDocument::applyView()
        else
                bp_.setCiteEngineType(ENGINE_TYPE_DEFAULT);
 
-       bp_.use_bibtopic =
-               biblioModule->bibtopicCB->isChecked();
+       bp_.bibtopic(biblioModule->bibtopicCB->isChecked());
 
        
bp_.setDefaultBiblioStyle(fromqstr(biblioModule->defaultBiblioCO->currentText()));
 
@@ -3154,7 +3153,7 @@ void GuiDocument::paramsToDialog()
                biblioModule->citeStyleCO->findData(bp_.citeEngineType()));
 
        biblioModule->bibtopicCB->setChecked(
-               bp_.use_bibtopic);
+               bp_.useBibtopic());
 
        updateEngineDependends();
 
diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
index 433a589..afbbc9e 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -280,7 +280,7 @@ void InsetBibtex::latex(otexstream & os, OutputParams const 
& runparams) const
                // Style options
                if (style == "default")
                        style = buffer().masterParams().defaultBiblioStyle();
-               if (!style.empty() && !buffer().masterParams().use_bibtopic) {
+               if (!style.empty() && !buffer().masterParams().useBibtopic()) {
                        string base = 
buffer().masterBuffer()->prepareFileNameForLaTeX(style, ".bst", runparams.nice);
                        FileName const try_in_file =
                                makeAbsPath(base + ".bst", buffer().filePath());
@@ -316,7 +316,7 @@ void InsetBibtex::latex(otexstream & os, OutputParams const 
& runparams) const
                                                      "BibTeX will be unable to 
find it."));
                }
                // Handle the bibtopic case
-               if (!db_out.empty() && buffer().masterParams().use_bibtopic) {
+               if (!db_out.empty() && buffer().masterParams().useBibtopic()) {
                        os << "\\begin{btSect}";
                        if (!style.empty())
                                os << "[" << style << "]";
@@ -329,7 +329,7 @@ void InsetBibtex::latex(otexstream & os, OutputParams const 
& runparams) const
                           << "\\end{btSect}\n";
                }
                // bibtotoc option
-               if (!bibtotoc.empty() && !buffer().masterParams().use_bibtopic) 
{
+               if (!bibtotoc.empty() && 
!buffer().masterParams().useBibtopic()) {
                        // set label for hyperref, see 
http://www.lyx.org/trac/ticket/6470
                        if (buffer().masterParams().pdfoptions().use_hyperref)
                                        os << "\\phantomsection";
@@ -339,7 +339,7 @@ void InsetBibtex::latex(otexstream & os, OutputParams const 
& runparams) const
                                os << 
"\\addcontentsline{toc}{section}{\\refname}";
                }
                // The bibliography command
-               if (!db_out.empty() && !buffer().masterParams().use_bibtopic) {
+               if (!db_out.empty() && !buffer().masterParams().useBibtopic()) {
                        docstring btprint = getParam("btprint");
                        if (btprint == "btPrintAll") {
                                os << "\\nocite{*}\n";
@@ -862,7 +862,7 @@ bool InsetBibtex::delDatabase(docstring const & db)
 
 void InsetBibtex::validate(LaTeXFeatures & features) const
 {
-       if (features.buffer().masterParams().use_bibtopic)
+       if (features.buffer().masterParams().useBibtopic())
                features.require("bibtopic");
        // FIXME XHTML
        // It'd be better to be able to get this from an InsetLayout, but at 
present

Reply via email to