]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Russian splash.lyx: updates from Yuriy
[lyx.git] / src / output_latex.cpp
index 3f608edbb78dfdbb3faa106e76d9b907c3161358..1431bbb321254fa7e32da97211f3806401b09196 100644 (file)
@@ -510,7 +510,7 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX
 }
 
 
-} // namespace anon
+} // namespace
 
 
 void pushLanguageName(string const & lang_name, bool localswitch)
@@ -532,6 +532,14 @@ void popLanguageName()
 }
 
 
+string const & openLanguageName()
+{
+       OutputState * state = getOutputState();
+
+       return openLanguageName(state);
+}
+
+
 namespace {
 
 void addArgInsets(Paragraph const & par, string const & prefix,
@@ -563,7 +571,7 @@ void addArgInsets(Paragraph const & par, string const & prefix,
        }
 }
 
-} // anon namespace
+} // namespace
 
 
 void latexArgInsets(Paragraph const & par, otexstream & os,
@@ -666,7 +674,7 @@ void parStartCommand(Paragraph const & par, otexstream & os,
        }
 }
 
-} // namespace anon
+} // namespace
 
 // FIXME: this should be anonymous
 void TeXOnePar(Buffer const & buf,
@@ -882,7 +890,7 @@ void TeXOnePar(Buffer const & buf,
                        }
                        // With CJK, the CJK tag has to be closed first (see below)
                        if (runparams.encoding->package() != Encoding::CJK
-                           && par_lang != openLanguageName(state)
+                           && (par_lang != openLanguageName(state) || localswitch)
                            && !par_lang.empty()) {
                                string bc = use_polyglossia ?
                                          getPolyglossiaBegin(lang_begin_command, par_lang, par_language->polyglossiaOpts())
@@ -1028,8 +1036,8 @@ void TeXOnePar(Buffer const & buf,
                        break;
                }
        }
-
-       // fall through possible
+       // possible
+       // fall through
        default:
                // we don't need it for the last paragraph!!!
                if (nextpar)