sc/source/core/data/attarray.cxx | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-)
New commits: commit 84e4bf884718fcca8934b81b4037e063cf08c71e Author: Faisal M. Al-Otaibi <fmalota...@kacst.edu.sa> Date: Sun Mar 17 10:03:06 2013 +0300 Fix fdo#37464 - Cell Border works backwards on Right-to-Left sheet Change-Id: Idb73d3029880b66602f163b2ab03c2b37c2306db Reviewed-on: https://gerrit.libreoffice.org/2782 Reviewed-by: Ahmad Harthi <aalhar...@kacst.edu.sa> Tested-by: Ahmad Harthi <aalhar...@kacst.edu.sa> diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index a47392e..9d1996a 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1105,13 +1105,38 @@ bool ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem, 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits