sw/source/core/docnode/ndtbl1.cxx | 79 +++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 21 deletions(-)
New commits: commit 5709e4134ab2b883f7f1186e4a481962108908d7 Author: Faisal M. Al-Otaibi <fmalota...@kacst.edu.sa> Date: Sun Mar 31 13:45:30 2013 +0300 fdo#62470 fix the input change when the table RTL this fix the wrong borders changes when the table RTL. Change-Id: I6e963c1bb71c63bffe8c8f95c091a5692c21cd31 Reviewed-on: https://gerrit.libreoffice.org/3133 Reviewed-by: Ahmad Harthi <aalhar...@kacst.edu.sa> Tested-by: Ahmad Harthi <aalhar...@kacst.edu.sa> diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 591b013..e38d9aa6 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -691,33 +691,70 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) } } - // Left Border - if ( bLeftOver ) - { - if( bLeftValid ) - { - aBox.SetLine( pLeft, BOX_LINE_LEFT ); - nType |= 0x0004; - } - } - else if( bVertValid ) + // Fix fdo#62470 correct the input for RTL table + if (bRTL) { - aBox.SetLine( pVert, BOX_LINE_LEFT ); - nType |= 0x0008; + if( bLeftOver && bRightOver) + { + if ( bLeftOver ? bLeftValid : bVertValid ) + { + aBox.SetLine( bLeftOver ? pLeft : 0, + BOX_LINE_RIGHT ); + bVertValid ? nType |= 0x0020 : nType |= 0x0010; + } + if ( bRightOver ? bRightValid : bVertValid ) + { + aBox.SetLine( bRightOver ? pRight : pVert, + BOX_LINE_LEFT ); + bVertValid ? nType |= 0x0008 : nType |= 0x0004; + } + } + else + { + if ( bRightOver ? bLeftValid : bVertValid ) + { + aBox.SetLine( bRightOver ? pLeft : 0, + BOX_LINE_RIGHT ); + bVertValid ? nType |= 0x0020 : nType |= 0x0010; + } + if ( bLeftOver ? bRightValid : bVertValid ) + { + aBox.SetLine( bLeftOver ? pRight : pVert, + BOX_LINE_LEFT ); + bVertValid ? nType |= 0x0008 : nType |= 0x0004; + } + } } - - // Right Border - if( bRightValid ) + else { - if ( bRightOver ) + // Left Border + if ( bLeftOver ) { - aBox.SetLine( pRight, BOX_LINE_RIGHT ); - nType |= 0x0010; + if( bLeftValid ) + { + aBox.SetLine( pLeft, BOX_LINE_LEFT ); + nType |= 0x0004; + } } - else if ( bVertValid ) + else if( bVertValid ) { - aBox.SetLine( 0, BOX_LINE_RIGHT ); - nType |= 0x0020; + aBox.SetLine( pVert, BOX_LINE_LEFT ); + nType |= 0x0008; + } + + // Right Border + if( bRightValid ) + { + if ( bRightOver ) + { + aBox.SetLine( pRight, BOX_LINE_RIGHT ); + nType |= 0x0010; + } + else if ( bVertValid ) + { + aBox.SetLine( 0, BOX_LINE_RIGHT ); + nType |= 0x0020; + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits