commit 995aed2e6e348c364df9074196a61e172eb93060
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Jul 15 19:23:19 2018 +0200

    Par alignment in floats must be swapped for all RTL langs, not only Hebrew
    
    Fixes: #11029
    (cherry picked from commit 3bacc3c6e73e87c1fdb3a9af33533c556d1d7274)
---
 src/Paragraph.cpp |    8 ++++----
 status.23x        |    2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index b437cde..ba31b21 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2289,13 +2289,13 @@ int Paragraph::Private::startTeXParParams(BufferParams 
const & bparams,
        case LYX_ALIGN_DECIMAL:
                break;
        case LYX_ALIGN_LEFT: {
-               if (owner_->getParLanguage(bparams)->babel() != "hebrew")
+               if (!owner_->getParLanguage(bparams)->rightToLeft())
                        corrected_env(os, begin_tag, "flushleft", code, 
lastpar, column);
                else
                        corrected_env(os, begin_tag, "flushright", code, 
lastpar, column);
                break;
        } case LYX_ALIGN_RIGHT: {
-               if (owner_->getParLanguage(bparams)->babel() != "hebrew")
+               if (!owner_->getParLanguage(bparams)->rightToLeft())
                        corrected_env(os, begin_tag, "flushright", code, 
lastpar, column);
                else
                        corrected_env(os, begin_tag, "flushleft", code, 
lastpar, column);
@@ -2347,13 +2347,13 @@ bool Paragraph::Private::endTeXParParams(BufferParams 
const & bparams,
        case LYX_ALIGN_DECIMAL:
                break;
        case LYX_ALIGN_LEFT: {
-               if (owner_->getParLanguage(bparams)->babel() != "hebrew")
+               if (!owner_->getParLanguage(bparams)->rightToLeft())
                        output = corrected_env(os, end_tag, "flushleft", code, 
lastpar, col);
                else
                        output = corrected_env(os, end_tag, "flushright", code, 
lastpar, col);
                break;
        } case LYX_ALIGN_RIGHT: {
-               if (owner_->getParLanguage(bparams)->babel() != "hebrew")
+               if (!owner_->getParLanguage(bparams)->rightToLeft())
                        output = corrected_env(os, end_tag, "flushright", code, 
lastpar, col);
                else
                        output = corrected_env(os, end_tag, "flushleft", code, 
lastpar, col);
diff --git a/status.23x b/status.23x
index c68179c..adc4947 100644
--- a/status.23x
+++ b/status.23x
@@ -69,6 +69,8 @@ What's new
 - Fix problems with extra table borders added on table modification
   (bug 10010).
 
+- Fix text direction in figure wrap floats with RTL (bug 11029).
+
 
 * USER INTERFACE
 

Reply via email to