summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/ndtbl1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/docnode/ndtbl1.cxx')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx79
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;
+ }
}
}