Bug 40496

Summary: "Clear Direct Formatting" clears RTL directionality
Product: LibreOffice Reporter: Shahar Or <mightyiampresence>
Component: WriterAssignee: navin patidar <patidar>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dr.khaled.hosny, fmalotaibi, kaplanlior, patidar
Version: 3.4.3 release   
Hardware: All   
OS: All   
Whiteboard: target:4.1.0
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 43808    
Attachments: an example/test case

Description Shahar Or 2011-08-30 10:57:25 UTC
"Clear formatting" on a heading, at least, clears the RTL direction that I before. It shouldn't happen. Direction is not formatting. It is part of the content, itself.
Comment 1 Lior Kaplan 2011-10-17 16:45:38 UTC
Confirmed with 3.4.3.
Comment 2 Khaled Hosny 2011-12-12 07:50:38 UTC
I can't reproduce that in master, "Clear Direct Formatting" neither affects direction or text alignment setting.
Comment 3 Lior Kaplan 2011-12-12 13:27:28 UTC
I didn't test master, but it's not the case for 3.5.0 branch. Adding a little example/test case.
Comment 4 Lior Kaplan 2011-12-12 13:28:10 UTC
Created attachment 54376 [details]
an example/test case
Comment 5 Björn Michaelsen 2011-12-23 12:34:49 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 6 Lior Kaplan 2011-12-24 07:18:04 UTC
Still the case in 3.5.0 beta2. Change status to NEW.
Comment 7 Faisal Menawer 2012-11-21 05:33:43 UTC
I can't reproduce this on LibreOffice 3.6.3.2
Comment 8 Lior Kaplan 2012-11-21 11:30:34 UTC
I can reproduce with version 3.6.4.1 (Build ID: a9a0717) on Debian 64bit
Comment 9 Faisal Menawer 2012-11-21 12:16:00 UTC
oh, 
OK i can reproduce this if your locale setting are not RTL Language.
it clear the direction; depends on the locale setting.
is this a bug?
Comment 10 Lior Kaplan 2012-11-21 12:30:25 UTC
I can reproduce it with both English locate/interface and with LC_ALL=he_IL.UTF-8 locale... Also, it both cases the directionality after clearing is RTL.
Comment 11 Commit Notification 2013-04-02 11:38:54 UTC
navin patidar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb920862c02047471f0ac5e78358e8d8fd9b93e7

fix fdo#40496: don't reset RES_PARATR_ADJUST & RES_FRAMEDIR attributes.



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.
Comment 12 Shahar Or 2013-04-02 19:27:02 UTC
Thanks! I love it when you fix bugs I report :) Feels great and I'm so greatful!
Comment 13 Lior Kaplan 2013-04-03 05:39:11 UTC
Fix verified on a build from master.

Notice the bug talks about not clearing directionality but the fix also keeps alignment. I'm not sure if that's the wanted behavior for us or not.
Comment 14 navin patidar 2013-04-03 06:52:47 UTC
(In reply to comment #13)
> Fix verified on a build from master.
> 
> Notice the bug talks about not clearing directionality but the fix also
> keeps alignment. I'm not sure if that's the wanted behavior for us or not.
Hi kaplan,

It is necessary to keep alignment, otherwise RTL text will be left align when user applies clear formatting.

"left align" is a default alignment doesn't matter writing direction is RTL or LTR, in case of clear formatting.
Comment 15 Lior Kaplan 2013-04-03 07:01:12 UTC
(In reply to comment #14)
> It is necessary to keep alignment, otherwise RTL text will be left align
> when user applies clear formatting.

I don't agree here, as we should clear the alignment as requested. Think of cases where the alignment is center/justify which after the patch wouldn't be cleared (both LTR and RTL text).
Comment 16 navin patidar 2013-04-03 07:27:44 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > It is necessary to keep alignment, otherwise RTL text will be left align
> > when user applies clear formatting.
> 
> I don't agree here, as we should clear the alignment as requested. Think of
> cases where the alignment is center/justify which after the patch wouldn't
> be cleared (both LTR and RTL text).

I agree, center/justify wouldn't be cleared. 

Is it acceptable to have RTL text align left ??
or
we should choose default alignment based on writing direction.

LTR text  -> left alignment 
 
RTL text  -> right alignment
Comment 17 Lior Kaplan 2013-04-03 07:33:13 UTC
(In reply to comment #16)
> I agree, center/justify wouldn't be cleared. 

So that's a regression we introduced, mainly for LTR users. Can we agree on fixing this while we discuss the other part over ?

> Is it acceptable to have RTL text align left ??
> or
> we should choose default alignment based on writing direction.

That's a good question, but should be discussed publicly (UI list or the dev list), but not here.
Comment 18 navin patidar 2013-04-03 08:16:25 UTC
(In reply to comment #17)

> So that's a regression we introduced, mainly for LTR users. Can we agree on
> fixing this while we discuss the other part over ?

> > Is it acceptable to have RTL text align left ??
> > or
> > we should choose default alignment based on writing direction.
> 
> That's a good question, but should be discussed publicly (UI list or the dev
> list), but not here.

I noticed in writer and impress  that when writing direction is changed to RTL from LTR, alignment is also changed to right from left.
that's why my opinion is to choose default alignment based on writing direction, but i'm not a RTL user. 

regression + correct default alignment issue can be fixed in a single patch.
Comment 19 Lior Kaplan 2013-04-03 08:26:28 UTC
(In reply to comment #18)
> regression + correct default alignment issue can be fixed in a single patch.

The regression fix is immediate, while the other needs public discussion and tests for the patch (See similar regression we got at bug 58919).
Comment 20 navin patidar 2013-04-03 09:05:19 UTC
plz review https://gerrit.libreoffice.org/3182
Comment 21 Commit Notification 2013-04-03 14:15:42 UTC
navin patidar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d0cfbb882c4c00fea4858f9d4b2511df66dd087b

fix fdo#40496: don't reset  RES_FRAMEDIR attribute.



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.
Comment 22 Shahar Or 2013-04-07 18:04:34 UTC
Thanks. This is even better :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.