summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-04-01 10:31:00 +0300
committerAhmad Harthi <aalharthi@kacst.edu.sa>2013-04-01 07:43:26 +0000
commitbb681a1cbb5a8382a7d521d901bc101496085519 (patch)
tree680d1b3cd55b12eac3a1b94a8649feae546d2dd3 /sw
parentfdo#62470 fix the input change when the table RTL (diff)
downloadcore-bb681a1cbb5a8382a7d521d901bc101496085519.tar.gz
core-bb681a1cbb5a8382a7d521d901bc101496085519.zip
fdo#62470 fix the table format dialog reading
this will fix the wrong reading in table format borders dialog. Change-Id: Ie8061ec4073fe9fd779a739ed717348d37319fe4 Change-Id: I624cf7c162d3983fe4625e8e2e6fef4fc556eed0 Reviewed-on: https://gerrit.libreoffice.org/3134 Reviewed-by: Ahmad Harthi <aalharthi@kacst.edu.sa> Tested-by: Ahmad Harthi <aalharthi@kacst.edu.sa>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index e38d9aa67e38..9fa5d7e3132e 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -934,7 +934,8 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
bRightSet = sal_False,
bHoriSet = sal_False,
bVertSet = sal_False,
- bDistanceSet = sal_False;
+ bDistanceSet = sal_False,
+ bRTLTab = sal_False;
aSetBoxInfo.ResetFlags();
@@ -954,7 +955,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
{
SwCellFrm *pCell = aCellArr[j];
const sal_Bool bVert = pTab->IsVertical();
- const sal_Bool bRTL = pTab->IsRightToLeft();
+ const sal_Bool bRTL = bRTLTab = pTab->IsRightToLeft();
sal_Bool bTopOver, bLeftOver, bRightOver, bBottomOver;
if ( bVert )
{
@@ -1115,6 +1116,22 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
}
}
}
+
+ // fdo#62470 fix the reading for table format.
+ if ( bRTLTab )
+ {
+ SvxBoxItem aTempBox ((const SvxBoxItem &) rSet.Get(RES_BOX ));
+ SvxBoxInfoItem aTempBoxInfo((const SvxBoxInfoItem&) rSet.Get(SID_ATTR_BORDER_INNER));
+
+ aTempBox.SetLine( aSetBox.GetRight(), BOX_LINE_RIGHT);
+ aSetBox.SetLine( aSetBox.GetLeft(), BOX_LINE_RIGHT);
+ aSetBox.SetLine( aTempBox.GetRight(), BOX_LINE_LEFT);
+
+ aTempBoxInfo.SetValid( VALID_LEFT, aSetBoxInfo.IsValid(VALID_LEFT) );
+ aSetBoxInfo.SetValid( VALID_LEFT, aSetBoxInfo.IsValid(VALID_RIGHT) );
+ aSetBoxInfo.SetValid( VALID_RIGHT, aTempBoxInfo.IsValid(VALID_LEFT) );
+ }
+
rSet.Put( aSetBox );
rSet.Put( aSetBoxInfo );
}