Bug 91315 - Parentheses inverted in mixed RTL and LTR text in SVG export
Summary: Parentheses inverted in mixed RTL and LTR text in SVG export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: Other All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.2.0 target:24.8.4
Keywords:
Depends on: 111806
Blocks: PPTX Presentation-Export RTL
  Show dependency treegraph
 
Reported: 2015-05-16 03:33 UTC by Ofir
Modified: 2024-11-21 08:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Presentation with mixed RTL and LTR text (10.65 KB, application/vnd.oasis.opendocument.presentation)
2015-05-16 03:34 UTC, Ofir
Details
SVG export with the parentheses inverted. (19.76 KB, image/svg+xml)
2015-05-16 03:35 UTC, Ofir
Details
PDF export with the expected result (16.29 KB, application/pdf)
2015-05-16 03:35 UTC, Ofir
Details
Text's major direction changed from RTL to LTR in SVG export (419.87 KB, image/svg+xml)
2017-11-09 07:04 UTC, Omer Zak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ofir 2015-05-16 03:33:12 UTC
The attached presentation has mixed RTL and LTR text.
The last char is inverted in the SVG export.

Tested with LO 5.0.0.0.alpha1+ 2015-05-15 and LO 4.4.2.2, Ubuntu 15.04.
Comment 1 Ofir 2015-05-16 03:34:43 UTC
Created attachment 115639 [details]
Presentation with mixed RTL and LTR text
Comment 2 Ofir 2015-05-16 03:35:25 UTC
Created attachment 115640 [details]
SVG export with the parentheses inverted.
Comment 3 Ofir 2015-05-16 03:35:55 UTC
Created attachment 115641 [details]
PDF export with the expected result
Comment 4 A (Andy) 2015-05-16 07:23:09 UTC
Reproducible with LO 4.4.3.2, Win 8.1

Further bug: If I try to open the file in LO DRAW then no characters at all are shown.
Comment 5 Xisco Faulí 2015-12-02 15:33:36 UTC
This issue is still present in 

Version: 5.0.2.2
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: es-ES (es_ES)

on Windows 7
Comment 6 QA Administrators 2017-01-03 19:39:16 UTC Comment hidden (obsolete)
Comment 7 Omer Zak 2017-11-09 07:03:22 UTC
In:

Version: 6.0.0.0.alpha1+
Build ID: 6070dec9ca9a15587a2aece81f9ae1ab5ac0f8c4
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group
(Build from 2017-Nov-05 00:00)

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)


The parenthesis inversion bug was fixed.
However, there is another bug - the text's major direction changed from RTL to LTR. See new attachment.
Comment 8 Omer Zak 2017-11-09 07:04:55 UTC
Created attachment 137628 [details]
Text's major direction changed from RTL to LTR in SVG export
Comment 9 Ofir 2018-09-28 03:09:02 UTC
Wrong text direction in SVG export is still reproducible with LO 6.1.0.3.
Comment 10 Ofir 2019-05-24 21:54:36 UTC
Wrong text direction still reproducible in:

Version: 6.3.0.0.alpha1
Build ID: 547edd20e527fb02900f6174973770d26306e2e7
CPU threads: 1; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-US (en_IL); UI-Language: en-US
Comment 11 QA Administrators 2021-10-21 03:35:30 UTC Comment hidden (obsolete)
Comment 12 Ofir 2023-02-04 18:28:37 UTC
Reproducible in:

Version: 7.4.5.1 / LibreOffice Community
Build ID: 40(Build:1)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Ubuntu package version: 1:7.4.5-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 13 Commit Notification 2024-11-20 18:42:55 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/235aebe31e6ba32a7ffc6a960396f651bdaa6ae3

tdf#91315 Implemented RTL support for SVG export

It will be available in 25.2.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.
Comment 14 Eyal Rozenberg 2024-11-20 20:14:54 UTC
(In reply to Commit Notification from comment #13)
> Jonathan Clark committed a patch related to this issue.

Thanks :-)

I have a few questions, but one is more general than this bug. The other questions are about:

   & (vcl::text::ComplexTextLayoutFlags::BiDiRtl
      | vcl::text::ComplexTextLayoutFlags::BiDiStrong)) {
    mrExport.AddAttribute(XML_NAMESPACE_NONE, aXMLAttrTextDirection, "rtl");
  }

1. What if BiDiRtl is on but there isn't a BiDiStrong flag? Are you sure Mister Export never needs to be RTL in that case?
2. Are you sure that for LTR we always want to not-set a direction? Wouldn't it make sense to sometimes explicitly set direction="ltr" ?
Comment 15 Jonathan Clark 2024-11-20 21:31:50 UTC
(In reply to Eyal Rozenberg from comment #14)
> 1. What if BiDiRtl is on but there isn't a BiDiStrong flag? Are you sure
> Mister Export never needs to be RTL in that case?

These & and | work like the usual bitwise operators.

> 2. Are you sure that for LTR we always want to not-set a direction? Wouldn't
> it make sense to sometimes explicitly set direction="ltr" ?

This attribute is used to set the base text direction. The default value is ltr, so not setting a value is equivalent to setting it to ltr.
Comment 16 Commit Notification 2024-11-21 08:22:12 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/3e985bc26b4d57b390b34e48ef1c51f48151e455

tdf#91315 Implemented RTL support for SVG export

It will be available in 24.8.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.