]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Mark constructors with only one parameter as explicit
[lyx.git] / src / Paragraph.cpp
index 0b1bd7048b5de9bfa4b1aab99f139b8a01848666..eb2bb9548cc6f3fe1c152fb4cd0a6da86e75c923 100644 (file)
@@ -1005,7 +1005,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
        bool close = false;
        odocstream::pos_type const len = os.os().tellp();
 
-       if (inset->forceLTR()
+       if (inset->forceLTR(runparams)
            && running_font.isRightToLeft()
            // ERT is an exception, it should be output with no
            // decorations at all
@@ -1860,8 +1860,9 @@ char_type Paragraph::getUChar(BufferParams const & bparams,
        char_type c = d->text_[pos];
 
        // Return unchanged character in LTR languages
-       // or if we use poylglossia/bidi.
-       if (rp.use_polyglossia || !getFontSettings(bparams, pos).isRightToLeft())
+       // or if we use poylglossia/bidi (XeTeX).
+       if (rp.useBidiPackage()
+           || !getFontSettings(bparams, pos).isRightToLeft())
                return c;
 
        // Without polyglossia/bidi, we need to account for some special cases.
@@ -1880,7 +1881,8 @@ char_type Paragraph::getUChar(BufferParams const & bparams,
        char_type uc = c;
 
        // 1. In the following languages, parentheses need to be reversed.
-       bool const reverseparens = lang == "hebrew";
+       //    Also with polyglodia/luabidi
+       bool const reverseparens = (lang == "hebrew" || rp.use_polyglossia);
 
        // 2. In the following languages, brackets don't need to be reversed.
        bool const reversebrackets = lang != "arabic_arabtex"
@@ -2247,7 +2249,7 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
        // RTL in classic (PDF)LaTeX (without the Bidi package)
        // Luabibdi (used by LuaTeX) behaves like classic
        bool const rtl_classic = owner_->getParLanguage(bparams)->rightToLeft()
-               && (!runparams.use_polyglossia || runparams.flavor != OutputParams::XETEX);
+               && !runparams.useBidiPackage();
 
        switch (curAlign) {
        case LYX_ALIGN_NONE:
@@ -2311,7 +2313,7 @@ bool Paragraph::Private::endTeXParParams(BufferParams const & bparams,
        // RTL in classic (PDF)LaTeX (without the Bidi package)
        // Luabibdi (used by LuaTeX) behaves like classic
        bool const rtl_classic = owner_->getParLanguage(bparams)->rightToLeft()
-               && (!runparams.use_polyglossia || runparams.flavor != OutputParams::XETEX);
+               && !runparams.useBidiPackage();
 
        switch (curAlign) {
        case LYX_ALIGN_NONE:
@@ -2746,7 +2748,7 @@ void Paragraph::latex(BufferParams const & bparams,
                runparams.post_macro = rp.post_macro;
        }
 
-    // Close wrapper for alien script
+       // Close wrapper for alien script
        if (!alien_script.empty()) {
                os << "}";
                alien_script.clear();