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 <hdlyh...@gmail.com> 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