* Create a slide in impress * Create (or type in an existing) textbox both english and hebrew text * Make the textbox to be out of focus * Observe the correct behavior that the textbox can be focused if clicking on english text. The cursor will be positioned correctly at the point closest to clicking point. * Make the textbox to be out of focus * Observe incorrect behavior the the text box *can not* be focused if clicking on hebrew text.
Hi, I can reproduce this on Arabic language also using Libreoffice 3.6 on fedora 16-64bit. Thanks Faisal
@ Arie Skliarouk: Thank you for your bug report! But please specify: -- Which LibreOffice version do you use? -- Which Platform/Operating System do you use? @ Faisal Menawer: Thank you for confirming this behaviour! I have added “Arabic” to the Summary according to your results. Hint: I can NOT reproduce this with LibreOffice 3.6.2.2 (Build ID: da8c1e6) on Mac OS X, but this probably just means that this is a platform-specific bug.
Created attachment 67844 [details] Test document for fdo#54629 Attached is a test document created by the instructions above. I couldn't reproduce the problem with LibreOffice 3.5.4.2 Build ID: 350m1(Build:2) from Debian unstable packages on an 64bit machine or LibreOffice 3.6.0.4 (Build ID: 932b512) from official builds on an Ubuntu 10.04 64bit machine.
The bug shows up only when the hebrew text is typed using font "Lohit Hindi" (not sure about arabic). I have no idea how I ended up using the font though. Find attached the test document where the bug can be seen.
Created attachment 67854 [details] test document that shows the bug
Ok, when changing the font to Lohit Hindi I can reproduce the bug. This font comes from the "ttf-indic-fonts-core" package in Ubuntu.
In MultiSalLayout::GetBoundRect we loop through each fallback font and union each level's GetBoundRect to get the result, which seems reasonable, except that for each level that means a call to SalLayout::GetBoundRect which calls X11SalGraphics::GetGlyphBoundRect. Those sublevel SalLayouts don't know that they are sublevels so they never set the level bits on their glyphs. Which results in X11SalGraphics::GetGlyphBoundRect always searching for that glyph in the level 0 font, so there's a mismatch between the font the SalLayout's are created to use and the font that gets used. Now, SalLayout::GetBoundRect is a fairly simple thing, it just calls GetNextGlyphs 1 by 1 and X11SalGraphics::GetGlyphBoundRect on the result of that. So I *think* that if we remove the specialized MultiSalLayout::GetBoundRect in favour of the default implementation, then because MultiSalLayout::GetNextGlyphs is specialized to do-the-right-thing and set up the glyph ids correctly, then we bubble the ids down to X11SalGraphics::GetGlyphBoundRect correctly to get it to use the right font and we get the correct bounding size.
Caolan McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=98f56121858b4bea54d056a073005a10648785c6 fdo#54629 MultiSalLayout::GetBoundRect always uses level 0 fallback font The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
please test this, the MultiSalLayout is a real pain to get right.
Verified on master, thanks for the fix (: Any reason not to cherry pick to the 4-0 branch (for 4.0.1)?
I've an issue writing LTR in an RTL context while editing, Kaplan can you please check that and see if it cause any problems for you?
@Ahmad - could you be more specific ? Maybe give some instructions what to try?
(In reply to comment #12) > @Ahmad - could you be more specific ? Maybe give some instructions what to > try? Kaplan, the patch works great!! Just I didn't know I had stumbled by another bug after I applied the patch by Caolán! (Sorry) I've added you and Caolán to the CC list for 59892: https://bugs.freedesktop.org/show_bug.cgi?id=59892
yeah, this is worth a shot for 4-0, though not for 4-0-0
Caolan McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b70bf62e6b5319e282cd3533c90216aabccfe53&h=libreoffice-4-0 fdo#54629 MultiSalLayout::GetBoundRect always uses level 0 fallback font It will be available in LibreOffice 4.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.