Re: patch fixing bug 73588

2014-04-03 Thread Kohei Yoshida
On Thu, 2014-04-03 at 12:05 -0400, Kohei Yoshida wrote:
> On Thu, 2014-04-03 at 11:45 -0400, Hannah Lyhne wrote:
> > Hello,
> > 
> > This is my patch for bug 73588. Currently when working in RTL mode in
> > calc if a user wrote in a language that was written from left to
> > right, calc failed to automatically left align the text as it had in
> > previous versions. To fix this, I've added a statement that checks
> > that the cell begins with a RTL character before right aligning it.
> > I've attached my patch. Let me know if there's anything I need to
> > change. 
> 
> The patch looks fine to me.  We just need from you a license statement
> before we can merge your patch.

Thanks for your license statement.  I've pushed your patch with some
minor tweak in the commit message (to use your full name and address and
adjust reference to the bug number).

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=036b1fccbfb87a1aab36632843deb29e0a70630f;hp=364c989e2e4f1f1897408882b2887a2bfb09a306

Kohei

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: patch fixing bug 73588

2014-04-03 Thread Kohei Yoshida
On Thu, 2014-04-03 at 11:45 -0400, Hannah Lyhne wrote:
> Hello,
> 
> This is my patch for bug 73588. Currently when working in RTL mode in
> calc if a user wrote in a language that was written from left to
> right, calc failed to automatically left align the text as it had in
> previous versions. To fix this, I've added a statement that checks
> that the cell begins with a RTL character before right aligning it.
> I've attached my patch. Let me know if there's anything I need to
> change. 

The patch looks fine to me.  We just need from you a license statement
before we can merge your patch.

Please refer to this page

https://wiki.documentfoundation.org/Development/Developers#Developers_and_Contributors_list

for the details of what kind of statement we look for.

Thanks for taking the time to look into this.

Kohei


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


patch fixing bug 73588

2014-04-03 Thread Hannah Lyhne
Hello,
This is my patch for bug 73588. Currently when working in RTL mode in calc
if a user wrote in a language that was written from left to right, calc
failed to automatically left align the text as it had in previous versions.
To fix this, I've added a statement that checks that the cell begins with a
RTL character before right aligning it. I've attached my patch. Let me know
if there's anything I need to change.

Thank you
Hannah
From fef47ce123eb8f7b6fe4486e93d6f2a690302ebf Mon Sep 17 00:00:00 2001
From: hannah 
Date: Tue, 1 Apr 2014 07:55:39 -0400
Subject: [PATCH] Bug fix for 73588; fix default alignment in RTL mode

Change-Id: Icb932ee51dbf32d8baf4382aa00e89a680f5a41d
---
 sc/source/ui/view/output2.cxx | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 54f977c..9005e48 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1434,7 +1434,10 @@ static SvxCellHorJustify getAlignmentFromContext( SvxCellHorJustify eInHorJust,
 else if (nDirection == FRMDIR_ENVIRONMENT)
 {
 SAL_WARN_IF( !pDoc, "sc.ui", "getAlignmentFromContext - pDoc==NULL");
-eHorJustContext = (pDoc && pDoc->IsLayoutRTL(nTab)) ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT;
+// fdo#73588: The content of the cell must also
+// begin with a RTL character to be right
+// aligned; otherwise, it should be left aligned.
+eHorJustContext = (pDoc && pDoc->IsLayoutRTL(nTab) && (beginsWithRTLCharacter( rText))) ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT;
 }
 else
 eHorJustContext = SVX_HOR_JUSTIFY_RIGHT;
-- 
1.8.1.2

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice