Created attachment 183641 [details] Arabic/Persian ligatures Description: After previous fixes in tdf#104597 by Kevin, in many cases RTL text from PDF files are imported correctly, but this is not the case for all possible RTL text. Specially, ligatures like لا and الله are incorrectly reversed. Steps to Reproduce: 1. Open ODT attachment 2. Export it to PDF via Writer 3. Open the PDF file in Draw Actual Results: Ligatures like لا and الله are loaded incorrectly. Expected Results: The text shown in Draw should be the same as the text in the ODT file Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 783bc24136929f1dc7b3d49b01794df627cc0bdb CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Repro Arch Linux 64-bit Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b57307e8f3553fcb292c9c11fcf58bcef3a6cb3c CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3 Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 8 November 2022
The below change on gerrit could fix this issue: https://gerrit.libreoffice.org/c/core/+/142978
Kevin Suo committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3a2f0e4772e7b4646dd518b33aeafb6fd7025179 Resolves tdf#152083: Ligatures are incorrectly reversed in Draw pdf import It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Kevin Suo committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/9c29107a2590e8ccc92e6ae6445beff186f38511 Resolves tdf#152083: Ligatures are incorrectly reversed in Draw pdf import It will be available in 7.4.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thanks Kevin! This is fixed in Draw and Impress. Could you please also fix the same problem in Writer? I've tested opening the file in writer by choosing "PDF - Portable Document Format (Writer)" as the file type, and the problem was still there. Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 3b0b9fcb80242abcedc01eb388a57b1016916353 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
(In reply to Hossein from comment #5) > ould you please also fix the same problem in Writer? Yes, but I think there are some cleanups needed in DrawXmlOptimizer::optimizeTextElements. So will do fix this issue on Writer after the cleanups are done to avoid back-and-forth revision of the code in writertreevisiting.cxx.
Done for Writer in: https://gerrit.libreoffice.org/c/core/+/143606 But as you may see, there is another problem with this for Writer - The spaces tween rtl and non-rtl frames seems wrong. This may be a separate issue since it exists before the change #143606.
Kevin Suo committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/842e3b988aca27d7c9f71ce1efc6653271cc3430 tdf#152083 related: make the isComplex check block as a separate function It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Kevin Suo committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/616c4c6bcb5ddeb932cf1e154f0a1a79c6a8bd45 tdf#152083: sdext Pre-reverse the text for RTL in Writer pdfimport as well It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Is this fixed now?
(In reply to خالد حسني from comment #10) > Is this fixed now? Yes. I see that the problem is not there in LO 24.2 master. Both Impress and Writer show the PDF text correctly. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2ef138de767c312188d41a7f206234eafac3108b CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded