Bo Peng wrote:

Abdel: Please have a look at this patch. svn blames you for the code,
although you might not be the original author.

I am not, I barely moved this code from text2.cpp to TextMetrics.cpp; the authors are a mix between Lars, Andre', Alfredo, Angus and John Levon. Pretty old stuff... I am sorry but I don't have the time to try to understand this code :-(

Here is the relevant portion of svn blame up to revision 16453:

829 6663 31/03/2003 18:57:45 larsbj // This (rtl_support test) is not needed, but gives 830 7539 14/08/2003 13:16:31 poenitz // some speedup if rtl_support == false 831 8940 15/08/2004 02:01:45 poenitz bool const lastrow = lyxrc.rtl_support && row.endpos() == par.size(); 832 7188 18/06/2003 19:43:49 larsbj 833 6663 31/03/2003 18:57:45 larsbj // If lastrow is false, we don't need to compute 834 6663 31/03/2003 18:57:45 larsbj // the value of rtl. 835 15618 30/10/2006 13:45:33 younes bool const rtl = lastrow ? isRTL(buffer, par) : false; 836 6412 10/03/2003 06:03:33 levon if (lastrow && 837 10487 27/09/2005 00:54:12 leeming ((rtl && left_side && vc == row.pos() && x < tmpx - 5) || 838 10487 27/09/2005 00:54:12 leeming (!rtl && !left_side && vc == end && x > tmpx + 5))) 839 7984 27/10/2003 12:44:10 abraunst c = end; 840 7929 17/10/2003 12:31:47 poenitz else if (vc == row.pos()) { 841 7966 23/10/2003 15:28:49 abraunst c = bidi.vis2log(vc); 842 7966 23/10/2003 15:28:49 abraunst if (bidi.level(c) % 2 == 1) 843 6412 10/03/2003 06:03:33 levon ++c; 844 6412 10/03/2003 06:03:33 levon } else { 845 7966 23/10/2003 15:28:49 abraunst c = bidi.vis2log(vc - 1); 846 7966 23/10/2003 15:28:49 abraunst bool const rtl = (bidi.level(c) % 2 == 1); 847 6412 10/03/2003 06:03:33 levon if (left_side == rtl) { 848 6412 10/03/2003 06:03:33 levon ++c; 849 15618 30/10/2006 13:45:33 younes boundary = bidi.isBoundary(buffer, par, c); 850 6412 10/03/2003 06:03:33 levon } 851 6412 10/03/2003 06:03:33 levon } 852 6412 10/03/2003 06:03:33 levon

Reply via email to