[Kde-pim] Patch to fix bug 134036

Shai Berger shai at platonix.com
Sat Apr 26 11:52:02 BST 2008


Hi Diego,

On Saturday 26 April 2008, Diego Iastrubni wrote:
> (cross posting)
>

(yes, I started that...)

>    1. The list of quote makrs is hardcoded in a swicth. If you want to
>       hard code it, I think at least use a hard coded QList, as it will
>       be easier to add values (even on runtime).

That switch statement was inspired by a similar switch statement in 
quotedHTML(), about 140 lines above it. I thought it was a little suspicious 
when I wrote it, but I wanted to keep the changes minimal. In the same vein, 
the constant 78 I use for WRAP_COL wasn't pulled out of my head, but out of 
other places in the code which used it as a magic number.

>    2. You are using "paraIsRTL = line.isRightToLeft();" to detect the
>       direction of the line. This will work on the first strong char of
>       the line, which is something we are trying to avoid now.
>       We are trying to bring to KDE a new way, in which the number of
>       chars is counted, and we use the most suited direction.

I think deciding to choose an algorithm that contradicts the Unicode standard 
is a mistake -- you choose to present some texts differently from 
standard-complying implementations. In the process, you kill the option of 
putting an RLM/LRM as the first character to set the direction, blur the 
distinction between strong and weak directionality, and probably damage marks 
of direction embedding. Can you point me  to the rationale behind this 
decision?

>
> My worry is, when will your assumption break? Actually, even if it does
> break, it will not break any more then the way it is now... so, I guess
> it would be Ok.
>

Yes, that's whai I think: It's not perfect, but it's an improvent. In the bug, 
I wrote the case which I think breaks the assumptions in a way which leads to 
error (a message has a paragraph ending in a line of length close to 78, the 
next paragraph is not separated by an empty line -- perhaps it is designated 
by indenting the first line in -- and this next paragraph should switch 
direction). If there are other cases, perhaps we can fix them, and perhaps 
they. too, can be judged relatively unimportant.

Have fun,
	Shai.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list