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.
This commit is contained in:
Juergen Spitzmueller 2012-07-23 11:36:55 +02:00
parent 0fcd35565c
commit 7d08836de6
3 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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();
}

View File

@ -98,6 +98,8 @@ What's new
- Fix babel call with Arabic (arabi).
- Fix suppression of language package.
* USER INTERFACE