diff options
author | Faisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa> | 2013-03-31 13:45:30 +0300 |
---|---|---|
committer | Ahmad Harthi <aalharthi@kacst.edu.sa> | 2013-04-01 07:17:38 +0000 |
commit | 5709e4134ab2b883f7f1186e4a481962108908d7 (patch) | |
tree | 6bf8b3fc404ca837d7cd956313e2bc9370faac41 | |
parent | 9ff0ee4905068cbc85acf85da1b3ef762b324ed7 (diff) |
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 <aalharthi@kacst.edu.sa>
Tested-by: Ahmad Harthi <aalharthi@kacst.edu.sa>
-rw-r--r-- | sw/source/core/docnode/ndtbl1.cxx | 79 |
1 files changed, 58 insertions, 21 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 591b013dc72f..e38d9aa67e38 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; + } } } |