]> git.lyx.org Git - features.git/commitdiff
Don't add localswitch if no language changes
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 27 Apr 2018 16:27:21 +0000 (18:27 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 10 Sep 2018 08:13:29 +0000 (10:13 +0200)
(cherry picked from commit 7018d3641f693967bb8bade86488a495cd2e976b)

src/output_latex.cpp
status.23x

index db005cdcef616748a94300242bbd928ac53d32e2..03b4b44e552213c07a708ff8912fccfe5b58f125 100644 (file)
@@ -840,9 +840,11 @@ void TeXOnePar(Buffer const & buf,
                lang_end_command = "}";
                lang_command_termination.clear();
        }
+       
+       bool const localswitch_needed = localswitch && par_lang != outer_lang;
 
        // localswitches need to be closed and reopened at each par
-       if ((par_lang != prev_lang || localswitch)
+       if ((par_lang != prev_lang || localswitch_needed)
             // check if we already put language command in TeXEnvironment()
             && !(style.isEnvironment()
                  && (pit == 0 || (priorpar->layout() != par.layout()
@@ -1117,7 +1119,7 @@ void TeXOnePar(Buffer const & buf,
                &&((nextpar && par_lang != nextpar_lang)
                   || (runparams.isLastPar && par_lang != outer_lang));
 
-       if (localswitch
+       if (localswitch_needed
            || (intitle_command && using_begin_end)
            || closing_rtl_ltr_environment
            || ((runparams.isLastPar || close_lang_switch)
index 9bdc5132ec94fe34e09cbb3d7a47e77065a900df..ad33297f45468834eb1518ed8ee7a424893998d8 100644 (file)
@@ -83,6 +83,8 @@ What's new
 
 - Fix output of key symbols with info inset on the Mac (bug 10641).
 
+- Fix output of table cells with multiple languages (bug 11128).
+
 
 * USER INTERFACE