]> git.lyx.org Git - lyx.git/commitdiff
RTL fixes
authorDekel Tsur <dekelts@tau.ac.il>
Sun, 18 Aug 2002 17:15:24 +0000 (17:15 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Sun, 18 Aug 2002 17:15:24 +0000 (17:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5019 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog
src/text.C

index 0ccdb69ecb1a163691a7a29f0fa2e5f6676fd549..713575480e7195960cbb121ffd99f76c461a8013 100644 (file)
@@ -40,6 +40,7 @@
 #include "ParagraphParameters.h"
 #include "undo_funcs.h"
 #include "funcrequest.h"
+#include "language.h"
 
 #include "insets/insetbib.h"
 #include "insets/insettext.h"
@@ -3239,7 +3240,9 @@ void BufferView::Pimpl::smartQuote()
        LyXLayout_ptr const & style = par->layout();
 
        if (style->pass_thru ||
-               (!insertInset(new InsetQuotes(c, bv_->buffer()->params))))
+           par->getFontSettings(buffer_->params,
+                                pos).language()->lang() == "hebrew" ||
+               (!insertInset(new InsetQuotes(c, buffer_->params))))
                bv_->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\""));
 }
 
index b38cb9012ba0dbbb03fb93194139fa80be70c90d..2b3820c394026eff480297f340b8b2d2ccfc0570 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-18  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * text.C (paintRowSelection): Fix code for rows with both RTL & LTR text.
+
+       * BufferView_pimpl.C (smartQuote): Insert typewriter quotes in
+       Hebrew text.
+
 2002-08-16  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * Makefile.am: use $(variables) instead of @substitutions@
index ec90880c5801eaf1ad6d0d60efc005a8ef7d7c3a..e29788c31c87e849cc4f5dd6e84366ad8fa2f2ef 100644 (file)
@@ -3130,26 +3130,22 @@ void LyXText::paintRowSelection(DrawRowParams & p)
                }
                return;
        } else if (startrow != row && endrow != row) {
-               int w = p.width;
-               int h = row->height();
                if (p.y > starty && p.y < endy) {
+                       int w = p.width;
+                       int h = row->height();
                        p.pain->fillRectangle(p.xo, p.yo, w, h, LColor::selection);
                }
                return;
        }
 
-       if (!((startrow != row && !is_rtl) || (endrow != row && is_rtl))) {
-               return;
-       }
-
-       float tmpx = p.x;
-
-       p.pain->fillRectangle(p.xo, p.yo, int(p.x), row->height(), LColor::selection);
+       if ((startrow != row && !is_rtl) || (endrow != row && is_rtl))
+               p.pain->fillRectangle(p.xo, p.yo, int(p.x), row->height(), LColor::selection);
 
        Buffer const * buffer = p.bv->buffer();
        Paragraph * par = row->par();
        pos_type main_body = beginningOfMainBody(buffer, par);
        pos_type const last = rowLastPrintable(row);
+       float tmpx = p.x;
 
        for (pos_type vpos = row->pos(); vpos <= last; ++vpos)  {
                pos_type pos = vis2log(vpos);
@@ -3187,12 +3183,12 @@ void LyXText::paintRowSelection(DrawRowParams & p)
                                int(tmpx - old_tmpx + 1),
                                row->height(), LColor::selection);
                }
+       }
 
-               if ((startrow != row && is_rtl) || (endrow != row && !is_rtl)) {
-                       p.pain->fillRectangle(p.xo + int(tmpx),
-                               p.yo, int(p.bv->workWidth() - tmpx),
-                               row->height(), LColor::selection);
-               }
+       if ((startrow != row && is_rtl) || (endrow != row && !is_rtl)) {
+               p.pain->fillRectangle(p.xo + int(tmpx),
+                                     p.yo, int(p.bv->workWidth() - tmpx),
+                                     row->height(), LColor::selection);
        }
 }