]> git.lyx.org Git - lyx.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>
Wed, 25 Jul 2018 09:00:00 +0000 (11:00 +0200)
Fixes: #10463
src/insets/InsetInfo.cpp
src/insets/InsetInfo.h

index d949de1b3a344a94a7a720e4b7978a1fc42eda64..97fe6ff06ec5380fc27fb88148ccb31ae36c00b6 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"
@@ -296,6 +297,12 @@ void InsetInfo::setText(docstring const & str)
 }
 
 
+bool InsetInfo::forceLTR() const
+{
+       return !buffer().params().language->rightToLeft();
+}
+
+
 void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) {
        // If the Buffer is a clone, then we neither need nor want to do any
        // of what follows. We want, rather, just to inherit how things were
index 86f957aac1c067496f967261ce9c3f1bce825f4b..4a1637fd8216e73d8bbb9f31f2a7f6c441f032a6 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);
        ///