Apache OpenOffice (AOO) Bugzilla – Issue 51569
Faulty numbering alignment in RTL import
Last modified: 2013-08-07 15:21:02 UTC
The attached presentation was taken from Issue 39272. When running the slide show in m109, the numbering in slide 3 is up against the right margin. This is not the case in PowerPoint. See attached screenshots.
Created attachment 27708 [details] The problem file
Created attachment 27709 [details] Slide 3 as it appears in the PowerPoint slide show
Created attachment 27710 [details] Slide 3 as it appears in the Impress slide show
One for me (cgu)
I can reproduce the bug. It occures only in the running presentation therefore I send it to you.
ayaniger->thb : This problem may be a general Impress problem, not only in PowerPoint import. The attached presentation was created in Impress. It contains both LTR and RTL text with numbering. In normal view, the alignment is fine, but in the slide show, the alignment of RTL text is incorrect. See screenshots. Alignment of bullets and numbering is problematic for RTL, regardless of which style of bullets or numbering one uses.
Created attachment 31698 [details] Has numbered text, both LTR and RTL
Created attachment 31699 [details] normal view
Created attachment 31700 [details] In slide show
ayaniger->thb: I'm attaching a patch which fixes this bug. It treats a numstring in RTL mode as if it were an LTR numstring, only it reverses the prefix and suffix when a flag is set. It also position bullets better. Before, in RTL mode, bullets are positioned a bit too far to the right of the text when compared with the same bulleted text in LTR mode. After the patch, the distance is pretty much the same.
Created attachment 31967 [details] Changes handling of RTL numstrings, and adjusts X coordinate for RTL in PaintBullet
Setting mt on CC, he's the EditEngine guru.
@ayaniger: are you sure this is the right place to fix? I thought the bug only appears during the slideshow, and not in the edit view?
ayaniger -> thb: It is true that my patch avoids the problem, rather than fixing it. I spent a good deal of time learning and playing with the code in cppcanvas/source/mftrenderer, and in canvas/source/vcl, and I was unable to fix the bug there. From my testing, this patch fixes the slideshow and does not break anything in the edit view. But I'm certainly open to other suggestions. I'll attach a test file with examples of almost all numbering possibilites, in both RTL and LTR, so that you and/or others can test. There are problems with RTL bullets and numbering in Writer as well, such as Issue 51510. While I haven't look at the code there yet, I would not be surpised if following my strategy may solve that problem, too: namely, treat the numbering string as LTR, and pass a flag to MakeNumString to flip the prefix and suffix.
Created attachment 31982 [details] Lots of numbering examples, both RTL and LTR
Created attachment 31984 [details] patch (based on previous patch) for handling RTL numbering in the preview window
@mt: what's your opinion?
ayaniger->mt, thb: Have you had a chance to look at this issue?
mt->tl: Please handle this...
In 3.0.0, the appearance is better, though Impress still puts a greater distance between the numbers and the text than Power Point does. Also, the discrepancy between normal view and the slide show seems to have been fixed.