Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1911
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/1911/1
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>
---
M svx/source/table/tablelayouter.cxx
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 599bf61..15d85e9 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -126,13 +126,23 @@
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;
}
}
--
To view, visit https://gerrit.libreoffice.org/1911
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f31e0c4e0acae84ab5052823fc49932255137d3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Lior Kaplan <kaplanlior@gmail.com>
Gerrit-Reviewer: Noel Power <noel.power@suse.com>
Gerrit-Reviewer: gokul s <gswaminathan@kacst.edu.sa>
Context
- Change in core[libreoffice-4-0]: fdo#42387 Fixed Merging of cells in RTL Tables in impress · Lior Kaplan (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.