]> git.lyx.org Git - features.git/commitdiff
Fix text direction issue for InsetInfo in RTL context
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 25 Jul 2018 09:00:00 +0000 (11:00 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 9 Sep 2018 17:31:24 +0000 (19:31 +0200)
Fixes: #10463
(cherry picked from commit 79cf3f5ec1088e7de988e889247ec300d42fb70b)

src/insets/InsetInfo.cpp
src/insets/InsetInfo.h

index a54be67fcf76eaf402cf4ced435c441ebc423eea..9a8d2dd1a41b7e433500059f5060b8d45b003b06 100644 (file)
@@ -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();
index 8cb7f45adb77a8734a7ecd498279e9b4c8db9bb3..4e3f290cad60cf32c707c8ad709f06ca567c4956 100644 (file)
@@ -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