diff options
author | Gokul <gswaminathan@kacst.edu.sa> | 2013-01-15 11:41:53 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-31 14:59:40 +0000 |
commit | b8c9c63cdc44eba348b52dd3cb2e70d379d23187 (patch) | |
tree | 7427f1577b0ada6f15b265af133b7d76c5b0a273 /svx | |
parent | b82da7a6681494de0cb9a1009b0de59250ba0533 (diff) |
fdo#42387 Fixed Merging of cells in RTL Tables in impress
The problem was in calculating the cell area, the width should be
subtracted to Right end of cell instead it was adding width to Left
end of the origin cell
Change-Id: I3f31e0c4e0acae84ab5052823fc49932255137d3
Reviewed-on: https://gerrit.libreoffice.org/1686
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
Reviewed-on: https://gerrit.libreoffice.org/1911
Tested-by: Lior Kaplan <kaplanlior@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 599bf61a134f..15d85e9a251f 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -126,13 +126,23 @@ 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; if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) ) { - const sal_Int32 x = maColumns[rPos.mnCol].mnPos; const sal_Int32 y = maRows[rPos.mnRow].mnPos; - rArea = basegfx::B2IRectangle( x, y, x + aCellSize.getX(), y + aCellSize.getY() ); + if(bRTL) + { + ///For RTL Table Calculate the Right End of cell instead of Left + const sal_Int32 x = maColumns[rPos.mnCol].mnPos + maColumns[rPos.mnCol].mnSize; + rArea = basegfx::B2IRectangle( x-aCellSize.getX(), y, x, y + aCellSize.getY() ); + } + else + { + const sal_Int32 x = maColumns[rPos.mnCol].mnPos; + rArea = basegfx::B2IRectangle( x, y, x + aCellSize.getX(), y + aCellSize.getY() ); + } return true; } } |