commit c413f1d81a234483593c0184b9372f5547b3c957
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Jul 25 11:00:00 2018 +0200

    Fix text direction issue for InsetInfo in RTL context
    
    Fixes: #10463
    (cherry picked from commit 79cf3f5ec1088e7de988e889247ec300d42fb70b)
---
 src/insets/InsetInfo.cpp |    7 +++++++
 src/insets/InsetInfo.h   |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp
index a54be67..9a8d2dd 100644
--- a/src/insets/InsetInfo.cpp
+++ b/src/insets/InsetInfo.cpp
@@ -21,6 +21,7 @@
 #include "InsetSpecialChar.h"
 #include "KeyMap.h"
 #include "LaTeXFeatures.h"
+#include "Language.h"
 #include "LayoutFile.h"
 #include "Length.h"
 #include "LyXAction.h"
@@ -295,6 +296,12 @@ void InsetInfo::setText(docstring const & str)
 }
 
 
+bool InsetInfo::forceLTR() const
+{
+       return !buffer().params().language->rightToLeft();
+}
+
+
 void InsetInfo::updateInfo()
 {
        BufferParams const & bp = buffer().params();
diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h
index 8cb7f45..4e3f290 100644
--- a/src/insets/InsetInfo.h
+++ b/src/insets/InsetInfo.h
@@ -125,6 +125,8 @@ public:
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
+       /// Force inset into LTR environment if surroundings are RTL
+       bool forceLTR() const;
        ///
        void setInfo(std::string const & info);
        /// update info_ and text

Reply via email to