[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [PATCH] KSpread: Fix For Bug 46833 - Right-align RTL Text In Cells
From:       Meni Livne <livne () kde ! org>
Date:       2003-08-13 18:21:23
[Download RAW message or body]

Greetings,

The attached one-liner patch should fix bug 46833: cell contents which starts 
with a bidi char should be right alligned (I don't know why the reporter 
decided this is a wish. This is no wish. This is a bug).

Let me know if there are any objections to committing this.

In case you're wondering, m_pTable->isRightToLeft() was removed from the 
condition because cell contents aren't supposed to be affected by the table 
direction. The table direction should affect only the layout of the cells, 
not what's in them.


Regards.


--
Meni Livne <livne@kde.org>


["kspread_cell.cc.patch" (text/x-diff)]

Index: kspread_cell.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_cell.cc,v
retrieving revision 1.518
diff -u -r1.518 kspread_cell.cc
--- kspread_cell.cc	30 Jun 2003 22:13:12 -0000	1.518
+++ kspread_cell.cc	13 Aug 2003 18:11:02 -0000
@@ -3298,7 +3298,7 @@
   int a = align( column(), row() );
   if ( a == KSpreadCell::Undefined )
   {
-    if ( m_value.isBoolean() || m_value.isNumber() || m_pTable->isRightToLeft() )
+    if ( m_value.isBoolean() || m_value.isNumber() || (m_value.isString() && \
m_value.asString()[0].direction() == QChar::DirR ))  a = KSpreadCell::Right;
     else
       a = KSpreadCell::Left;



_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic