Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2782

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/82/2782/1

Fix fdo#37464 - Cell Border works backwards on Right-to-Left sheet

Change-Id: Idb73d3029880b66602f163b2ab03c2b37c2306db
---
M sc/source/core/data/attarray.cxx
1 file changed, 32 insertions(+), 7 deletions(-)



diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index ebf246a..bf75271 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1105,13 +1105,38 @@
         nDistBottom = 0;
 
     SvxBoxItem aNewFrame( *pOldFrame );
-
-    if ( bLeft ? pBoxInfoItem->IsValid(VALID_LEFT) : pBoxInfoItem->IsValid(VALID_VERT) )
-        aNewFrame.SetLine( bLeft ? pBoxItem->GetLeft() : pBoxInfoItem->GetVert(),
-            BOX_LINE_LEFT );
-    if ( (nDistRight==0) ? pBoxInfoItem->IsValid(VALID_RIGHT) : pBoxInfoItem->IsValid(VALID_VERT) )
-        aNewFrame.SetLine( (nDistRight==0) ? pBoxItem->GetRight() : pBoxInfoItem->GetVert(),
-            BOX_LINE_RIGHT );
+    bool bRTL=pDocument->IsLayoutRTL(nTab);
+    // fdo#37464 check if the sheet are RTL then replace right <=> left
+    if (bRTL)
+    {
+        if( bLeft && nDistRight==0)
+        {
+            if ( bLeft ? pBoxInfoItem->IsValid(VALID_LEFT) : pBoxInfoItem->IsValid(VALID_VERT) )
+                aNewFrame.SetLine( bLeft ? pBoxItem->GetLeft() : pBoxInfoItem->GetVert(),
+                    BOX_LINE_RIGHT );
+            if ( (nDistRight==0) ? pBoxInfoItem->IsValid(VALID_RIGHT) : 
pBoxInfoItem->IsValid(VALID_VERT) )
+                aNewFrame.SetLine( (nDistRight==0) ? pBoxItem->GetRight() : 
pBoxInfoItem->GetVert(),
+                    BOX_LINE_LEFT );
+        }
+        else
+        {
+            if ( (nDistRight==0) ? pBoxInfoItem->IsValid(VALID_LEFT) : 
pBoxInfoItem->IsValid(VALID_VERT) )
+                aNewFrame.SetLine( (nDistRight==0) ? pBoxItem->GetLeft() : pBoxInfoItem->GetVert(),
+                    BOX_LINE_RIGHT );
+            if ( bLeft ? pBoxInfoItem->IsValid(VALID_RIGHT) : pBoxInfoItem->IsValid(VALID_VERT) )
+                aNewFrame.SetLine( bLeft ? pBoxItem->GetRight() : pBoxInfoItem->GetVert(),
+                    BOX_LINE_LEFT );
+        }
+    }
+    else
+    {
+        if ( bLeft ? pBoxInfoItem->IsValid(VALID_LEFT) : pBoxInfoItem->IsValid(VALID_VERT) )
+            aNewFrame.SetLine( bLeft ? pBoxItem->GetLeft() : pBoxInfoItem->GetVert(),
+                BOX_LINE_LEFT );
+        if ( (nDistRight==0) ? pBoxInfoItem->IsValid(VALID_RIGHT) : 
pBoxInfoItem->IsValid(VALID_VERT) )
+            aNewFrame.SetLine( (nDistRight==0) ? pBoxItem->GetRight() : pBoxInfoItem->GetVert(),
+                BOX_LINE_RIGHT );
+    }
     if ( bTop ? pBoxInfoItem->IsValid(VALID_TOP) : pBoxInfoItem->IsValid(VALID_HORI) )
         aNewFrame.SetLine( bTop ? pBoxItem->GetTop() : pBoxInfoItem->GetHori(),
             BOX_LINE_TOP );

-- 
To view, visit https://gerrit.libreoffice.org/2782
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb73d3029880b66602f163b2ab03c2b37c2306db
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Faisal al-otaibi <fmalotaibi@kacst.edu.sa>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.