[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-07-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

Jonathan Clark  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |jonat...@libreoffice.org
   |desktop.org |
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-07-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #34 from Eyal Rozenberg  ---
(In reply to Jonathan Clark from comment #33)
> This mechanism works correctly for both LTR and RTL text. However, it's
> currently broken for bidirectional text. 

I take it you mean a paragraph containing both strong-LTR and strong-RTL
characters?

> The
> relevant backtracking code was written deliberately so that Writer always
> treats the start of a multi portion as a break opportunity. I'm still unsure
> why

At the risk of stating the obvious... I take it you've tried git-blame'ing that
code and asking the people who have worked on it?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-07-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #33 from Jonathan Clark  ---
The root cause for this bug is Writer failing to backtrack before bidi portions
while doing line breaking.

In order to lay out and render text, Writer must segment the text into
portions. This can happen for a variety of reasons. For example, if only a part
of a word in English text changes, the track changes feature will split that
word across two or more portions.

Having to segment text in this way creates a situation where, potentially, a
portion containing a break opportunity fits on a line, followed by an arbitrary
number of portions which overflow the line, none of which contain break
opportunities. In order to lay out such text correctly, Writer keeps track of
the portion and position of the last break opportunity. Then, if unbreakable
portions cause the line to overflow, Writer can backtrack (rewind) to the
previous break opportunity, insert the break, and then continue layout from
that point.

This mechanism works correctly for both LTR and RTL text. However, it's
currently broken for bidirectional text. Inserting text which implies a
direction change produces a bidi portion (a type of multi portion). The
relevant backtracking code was written deliberately so that Writer always
treats the start of a multi portion as a break opportunity. I'm still unsure
why; it's possible this was only intended for the other types of multi
portions, and bidi portions were affected inadvertently.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-07-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

Jonathan Clark  changed:

   What|Removed |Added

 CC||h.rosema...@gmail.com

--- Comment #32 from Jonathan Clark  ---
*** Bug 145918 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-05-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #31 from kava...@yahoo.com  ---
dear خالد It is 12 years. is any solution?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #30 from Eyal Rozenberg  ---
(In reply to ⁨خالد حسني⁩ from comment #29)
> You are checking the word break opportunities not the line break
> opportunities.

You're right! Sorry.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #29 from ⁨خالد حسني⁩  ---
(In reply to Eyal Rozenberg from comment #28)
> (In reply to ⁨خالد حسني⁩ from comment #26)
> > There is no line break opportunity after the opening parentheses (or before
> > closing parentheses).
> 
> I'm sorry, Khaled, but yes, there is, at least according to the online
> Unicode utility at: https://util.unicode.org/UnicodeJsps/breaks.jsp
> 
> it shows opportunities before and after each of the parentheses - the
> opening and the closing one.

You are checking the word break opportunities not the line break opportunities.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #28 from Eyal Rozenberg  ---
(In reply to ⁨خالد حسني⁩ from comment #26)
> There is no line break opportunity after the opening parentheses (or before
> closing parentheses).

I'm sorry, Khaled, but yes, there is, at least according to the online Unicode
utility at: https://util.unicode.org/UnicodeJsps/breaks.jsp

it shows opportunities before and after each of the parentheses - the opening
and the closing one.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-05-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

Hossein  changed:

   What|Removed |Added

 Blocks||161022
 CC||jonat...@libreoffice.org


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=161022
[Bug 161022] [META] Word / line breaking issues
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2024-04-30 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

⁨خالد حسني⁩  changed:

   What|Removed |Added

 CC||kava...@yahoo.com

--- Comment #27 from ⁨خالد حسني⁩  ---
*** Bug 160854 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2023-06-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

--- Comment #26 from ⁨خالد حسني⁩  ---
Created attachment 187838
  --> https://bugs.documentfoundation.org/attachment.cgi?id=187838=edit
Screenshot from Unicode utility showing line break ooprtunities

(In reply to Eyal Rozenberg from comment #25)
> (In reply to خالد حسني from comment #17)
> > This is a bug, change in direction does not create line breaking 
> > opportunity.
> 
> The first part of this statement does not follow from the second. That is,
> the second part is true, but there already is a breaking opportunity before
> and after the parentheses regardless of the change in direction.

There is no line break opportunity after the opening parentheses (or before
closing parentheses).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 56408] Writer always breaks lines at text direction change, leaving orphan bracket

2023-04-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=56408

Eyal Rozenberg  changed:

   What|Removed |Added

Summary|Writer always breaks lines  |Writer always breaks lines
   |at text direction change|at text direction change,
   ||leaving orphan bracket

-- 
You are receiving this mail because:
You are the assignee for the bug.