From 3626b4610979f9da6d1b9b44328da6925323597b Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sat, 18 Dec 2010 16:11:38 +0000 Subject: [PATCH] Coding style. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36937 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/output_latex.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index a3962f7235..5c1746dcb7 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -777,17 +777,16 @@ void TeXOnePar(Buffer const & buf, // Closing the language is needed for the last paragraph; it is also // needed if we're within an \L or \R that we may have opened above (not // necessarily in this paragraph) and are about to close. - bool closing_rtl_ltr_environment = - !runparams.use_polyglossia && + bool closing_rtl_ltr_environment = !runparams.use_polyglossia // not for ArabTeX - (par_language->lang() != "arabic_arabtex" && - outer_language->lang() != "arabic_arabtex") && - // have we opened and \L or \R environment? - runparams.local_font != 0 && - runparams.local_font->isRightToLeft() != par_language->rightToLeft() && + && (par_language->lang() != "arabic_arabtex" + && outer_language->lang() != "arabic_arabtex") + // have we opened and \L or \R environment? + && runparams.local_font != 0 + && runparams.local_font->isRightToLeft() != par_language->rightToLeft() // are we about to close the language? - ((nextpar && par_language->babel() != (nextpar->getParLanguage(bparams))->babel()) - || (runparams.isLastPar && par_language->babel() != outer_language->babel())); + &&((nextpar && par_language->babel() != (nextpar->getParLanguage(bparams))->babel()) + || (runparams.isLastPar && par_language->babel() != outer_language->babel())); if (closing_rtl_ltr_environment || (runparams.isLastPar && par_language->babel() != outer_language->babel())) { @@ -837,11 +836,12 @@ void TeXOnePar(Buffer const & buf, // if this is a CJK-paragraph and the next isn't, close CJK // also if the next paragraph is a multilingual environment (because of nesting) - if (nextpar && open_encoding_ == CJK && - (nextpar->getParLanguage(bparams)->encoding()->package() != Encoding::CJK || - (nextpar->layout().isEnvironment() && nextpar->isMultiLingual(bparams))) - // inbetween environments, CJK has to be closed later (nesting!) - && (!style.isEnvironment() || !nextpar->layout().isEnvironment())) { + if (nextpar + && open_encoding_ == CJK + && (nextpar->getParLanguage(bparams)->encoding()->package() != Encoding::CJK + || (nextpar->layout().isEnvironment() && nextpar->isMultiLingual(bparams))) + // inbetween environments, CJK has to be closed later (nesting!) + && (!style.isEnvironment() || !nextpar->layout().isEnvironment())) { os << "\\end{CJK}\n"; open_encoding_ = none; }