On Tue, Jan 07, 2003 at 12:52:18PM +0100, Andre Poenitz wrote:
> On Tue, Jan 07, 2003 at 01:30:25PM +0200, Dekel Tsur wrote:
> > This patch fix the TOC menu/dialog for RTL language in the QT frontend.
> > However, it also breaks it in the XForms frontend.
> > Since the QT toolkit has RTL support, while XForms doesn't, I believe it
> > would be better to concentrate on RTL support for the QT frontend.
> 
> And what's the problem with an ugly #ifdef in this case?

It is possible.
I've attached an updated patch.
Index: paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.233
diff -u -p -r1.233 paragraph.C
--- paragraph.C 27 Nov 2002 10:30:13 -0000      1.233
+++ paragraph.C 7 Jan 2003 12:03:32 -0000
@@ -49,7 +49,6 @@ using std::fstream;
 using std::ios;
 using std::lower_bound;
 using std::upper_bound;
-using std::reverse;
 
 using lyx::pos_type;
 
@@ -1748,8 +1747,10 @@ string const Paragraph::asString(Buffer 
                }
        }
 
+#ifdef FORMS_H_LOCATION
        if (isRightToLeftPar(bparams))
-               reverse(s.begin() + len,s.end());
+               std::reverse(s.begin() + len,s.end());
+#endif
 
        return s;
 }

Reply via email to