]> git.lyx.org Git - lyx.git/blobdiff - src/Bidi.C
Use Gtk::ComboBoxText::clear() instead of clear_items(), which only exists in newer...
[lyx.git] / src / Bidi.C
index e469270558fbef7b9f4be8215fb2de9f603257d8..e29b62087d0783aea1a4d9a7fa6b5f3f44f7eb47 100644 (file)
@@ -8,6 +8,7 @@
  * Full author contact details are available in file CREDITS.
  */
 
+#include <config.h>
 
 #include "Bidi.h"
 #include "buffer.h"
@@ -17,7 +18,6 @@
 #include "lyxrc.h"
 #include "paragraph.h"
 
-#include "insets/updatableinset.h"
 
 using lyx::pos_type;
 
@@ -60,8 +60,7 @@ void Bidi::computeTables(Paragraph const & par,
                return;
        }
 
-       InsetOld * inset = par.inInset();
-       if (inset && inset->lyxCode() == InsetOld::ERT_CODE) {
+       if (par.ownerCode() == InsetBase::ERT_CODE) {
                start_ = -1;
                return;
        }
@@ -139,7 +138,7 @@ void Bidi::computeTables(Paragraph const & par,
                        log2vis_list_[lpos - start_] = rtl ? 1 : -1;
                } else if (lev < new_level) {
                        log2vis_list_[lpos - start_] = rtl ? -1 : 1;
-                       if (new_level > rtl_par)
+                       if (new_level > 0 && !rtl_par)
                                same_direction_ = false;
                } else
                        log2vis_list_[lpos - start_] = new_rtl ? -1 : 1;