From 7d08836de647d2042c7afc4c52838184c8e80cab Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 23 Jul 2012 11:36:55 +0200 Subject: [PATCH] Fixes to the language package call * Assure that really no language package is called when none is selected. * Only call global custom package if global is desired. This is a candidate for branch as well. --- src/BufferParams.cpp | 3 ++- src/LaTeXFeatures.cpp | 16 +++++++--------- status.20x | 2 ++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index a22487469c..6139356f02 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2625,7 +2625,8 @@ string BufferParams::babelCall(string const & lang_opts, bool const langoptions) if (lang_package != "auto" && lang_package != "babel" && lang_package != "default" && lang_package != "none") return lang_package; - if (lyxrc.language_package_selection == LyXRC::LP_CUSTOM) + if (lang_package == "default" + && lyxrc.language_package_selection == LyXRC::LP_CUSTOM) return lyxrc.language_custom_package; // suppress the babel call if there is no BabelName defined // for the document language in the lib/languages file and if no diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 236a7d3431..3f7226fed6 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -291,16 +291,14 @@ LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool LaTeXFeatures::useBabel() const { - if (usePolyglossia()) + if (usePolyglossia() + || bufferParams().lang_package == "none" + || (bufferParams().lang_package == "default" + && lyxrc.language_package_selection == LyXRC::LP_NONE)) return false; - if (bufferParams().lang_package == "default") - return (lyxrc.language_package_selection != LyXRC::LP_NONE) - || (bufferParams().language->lang() != lyxrc.default_language - && !bufferParams().language->babel().empty()) - || this->hasLanguages(); - return (bufferParams().lang_package != "none") - || (bufferParams().language->lang() != lyxrc.default_language - && !bufferParams().language->babel().empty()) + + return (bufferParams().language->lang() != lyxrc.default_language + && !bufferParams().language->babel().empty()) || this->hasLanguages(); } diff --git a/status.20x b/status.20x index 450591ce78..e82643d4ac 100644 --- a/status.20x +++ b/status.20x @@ -98,6 +98,8 @@ What's new - Fix babel call with Arabic (arabi). +- Fix suppression of language package. + * USER INTERFACE