summaryrefslogtreecommitdiff
path: root/svx/source/table/tablelayouter.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-06-27 13:27:48 +0200
committerabdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>2013-06-27 13:36:05 +0200
commite586fe4585dc07e6f6dd061d09f6a7fb0b22948c (patch)
tree737a8b03629ffe0ceb7f5fbcf9c827e8601ea245 /svx/source/table/tablelayouter.cxx
parent23d9f2400bff7a6c1f0c55f9a1158d40a57d6239 (diff)
fdo#46186: Sync the internal representation of the table with its appearance.
This fixes the saving / loading of RTL setting of the table, and changes the UI behavior when you click the LTR/RTL buttons with table border selected a bit. Change-Id: I1abcebdad3cdb72307535f82d973eb52418f2787
Diffstat (limited to 'svx/source/table/tablelayouter.cxx')
-rw-r--r--svx/source/table/tablelayouter.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 779ee150e477..9ccbdfa8a49c 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -59,7 +59,6 @@ static SvxBorderLine gEmptyBorder;
TableLayouter::TableLayouter( const TableModelRef& xTableModel )
: mxTable( xTableModel )
-, meWritingMode( WritingMode_LR_TB )
, msSize( "Size" )
{
}
@@ -126,7 +125,7 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr
if( xCell.is() && !xCell->isMerged() && isValid(rPos) )
{
const basegfx::B2ITuple aCellSize( getCellSize( rPos ) );
- const bool bRTL = meWritingMode == WritingMode_RL_TB;
+ const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) )
{
@@ -256,7 +255,7 @@ sal_Int32 TableLayouter::getVerticalEdge( int nEdgeX, sal_Int32* pnMin /*= 0*/,
if( (nEdgeX >= 0) && (nEdgeX <= nColCount ) )
nRet = maColumns[std::min((sal_Int32)nEdgeX,nColCount-1)].mnPos;
- const bool bRTL = meWritingMode == WritingMode_RL_TB;
+ const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
if( bRTL )
{
if( (nEdgeX >= 0) && (nEdgeX < nColCount) )
@@ -649,7 +648,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit )
// last step, update left edges
sal_Int32 nNewWidth = 0;
- const bool bRTL = meWritingMode == WritingMode_RL_TB;
+ const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
RangeIterator<sal_Int32> coliter( 0, nColCount, !bRTL );
while( coliter.next(nCol ) )
{
@@ -1143,12 +1142,6 @@ void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal
}
}
-// -----------------------------------------------------------------------------
-void TableLayouter::SetWritingMode( com::sun::star::text::WritingMode eWritingMode )
-{
- meWritingMode = eWritingMode;
-}
-
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */