The following patch select the correct type of double quotes:
  If the cursor is on Hebrew text, it uses InsetQuotes::SwedishQ quotes.
  Otherwise, it uses the bufferparams settings.
Index: src/BufferView2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView2.C,v
retrieving revision 1.1
diff -u -p -r1.1 BufferView2.C
--- src/BufferView2.C   2000/02/04 09:38:29     1.1
+++ src/BufferView2.C   2000/02/04 15:31:46
@@ -612,8 +612,13 @@ void BufferView::insertCorrectQuote()
                c = text->cursor.par->GetChar(text->cursor.pos - 1);
        else 
                c = ' ';
+       LyXDirection direction = text->real_current_font.getFontDirection();
 
-       insertInset(new InsetQuotes(c, buffer()->params));
+       insertInset(new InsetQuotes(c,
+                                   (direction == LYX_DIR_LEFT_TO_RIGHT)
+                                   ? buffer()->params.quotes_language
+                                   : InsetQuotes::SwedishQ,
+                                   buffer()->params.quotes_times));
 }
 
 
Index: src/insets/insetquotes.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.C,v
retrieving revision 1.12
diff -u -p -r1.12 insetquotes.C
--- src/insets/insetquotes.C    1999/12/13 00:05:33     1.12
+++ src/insets/insetquotes.C    2000/02/04 15:31:51
@@ -72,9 +72,8 @@ InsetQuotes::InsetQuotes(InsetQuotes::qu
 {
 }
 
-
-InsetQuotes::InsetQuotes(char c, BufferParams const & params)
-       : language(params.quotes_language), times(params.quotes_times)
+InsetQuotes::InsetQuotes(char c, quote_language l, quote_times t)
+       : language(l), times(t)
 {
        // Decide whether left or right 
        switch(c) {
Index: src/insets/insetquotes.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.h,v
retrieving revision 1.7
diff -u -p -r1.7 insetquotes.h
--- src/insets/insetquotes.h    1999/12/07 00:44:52     1.7
+++ src/insets/insetquotes.h    2000/02/04 15:31:52
@@ -68,7 +68,7 @@ public:
          */ 
        InsetQuotes(string const & str = "eld");
        /// Create the right quote inset after character c
-       InsetQuotes(char c, BufferParams const & params);
+       InsetQuotes(char c, quote_language l, quote_times t);
 
        ///
        int Ascent(LyXFont const & font) const;

Reply via email to