The branch, biblatex2, has been updated.

- Log -----------------------------------------------------------------

commit 8239e66c9429c1499d52be5a784fbe039b39181d
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Jan 1 10:49:22 2017 +0100

    Add BufferParams::bibtexCommand()
    
    This function returns the real command (either per lyxrc or bufferparam)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 9cab407..7a726eb 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -3286,6 +3286,18 @@ vector<CitationStyle> BufferParams::citeStyles() const
        return styles;
 }
 
+
+string const & BufferParams::bibtexCommand() const
+{
+       if (bibtex_command != "default")
+               return bibtex_command;
+       else if (encoding().package() == Encoding::japanese)
+               return lyxrc.jbibtex_command;
+       else
+               return lyxrc.bibtex_command;
+}
+
+
 void BufferParams::invalidateConverterCache() const
 {
        pimpl_->isExportCacheValid = false;
diff --git a/src/BufferParams.h b/src/BufferParams.h
index 29897fd..8748600 100644
--- a/src/BufferParams.h
+++ b/src/BufferParams.h
@@ -462,6 +462,9 @@ public:
        /// the available citation styles
        std::vector<CitationStyle> citeStyles() const;
 
+       /// Return the actual bibtex command (lyxrc or buffer param)
+       std::string const & bibtexCommand() const;
+
        /// Set the default BibTeX style file for the document
        void setDefaultBiblioStyle(std::string const & s){ biblio_style = s; }
        /// Get the default BibTeX style file from the TextClass
diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index df025e4..93ea6b7 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -718,12 +718,7 @@ void PreviewLoader::Impl::startLoading(bool wait)
        }
 
        cs << latexparam;
-       if (buffer_.params().bibtex_command != "default")
-               cs << " --bibtex=" << 
quoteName(buffer_.params().bibtex_command);
-       else if (buffer_.params().encoding().package() == Encoding::japanese)
-               cs << " --bibtex=" << quoteName(lyxrc.jbibtex_command);
-       else
-               cs << " --bibtex=" << quoteName(lyxrc.bibtex_command);
+       cs << " --bibtex=" << quoteName(buffer_.params().bibtexCommand());
        if (buffer_.params().bufferFormat() == "lilypond-book")
                cs << " --lilypond";
 

-----------------------------------------------------------------------

Summary of changes:
 src/BufferParams.cpp           |   12 ++++++++++++
 src/BufferParams.h             |    3 +++
 src/graphics/PreviewLoader.cpp |    7 +------
 3 files changed, 16 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Repository for new features

Reply via email to