summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-11-17 20:26:24 +0900
committerCaolán McNamara <caolanm@redhat.com>2016-11-23 20:59:11 +0000
commite7145b142d21af4d23a21a8490dcbbd0fb42685a (patch)
treea91380af682e8827dbb5de8b9fee07b10accea07
parenta346bfaa4492fa53bf8cd21677d7880a86bbb811 (diff)
tdf#84650 Fix X-coordinate of SmMatrixNode's elements
which are aligned to left or right against the column. Change-Id: Ie2b6944bc0dddb0e1589842472298f787fabf596 Reviewed-on: https://gerrit.libreoffice.org/30929 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp> (cherry picked from commit 395295a40c24a49c12415ec803860a888d734515) Reviewed-on: https://gerrit.libreoffice.org/30943 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--starmath/source/node.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index da9d861ed80b..47b27fc8fba8 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2380,7 +2380,6 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// align all baselines in that row if possible
aPos = rNodeRect.AlignTo(aLineRect, RectPos::Right, RectHorAlign::Center, RectVerAlign::Baseline);
- aPos.X() += nHorDist;
// get horizontal alignment
const SmNode *pCoNode = pTmpNode->GetLeftMost();
@@ -2390,7 +2389,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// and horizontal alignment
switch (eHorAlign)
{ case RectHorAlign::Left:
- aPos.X() = rNodeRect.GetLeft() + aColLeft[j];
+ aPos.X() = aColLeft[j];
break;
case RectHorAlign::Center:
aPos.X() = rNodeRect.GetLeft() + aColLeft[j]
@@ -2398,7 +2397,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
- rNodeRect.GetItalicCenterX();
break;
case RectHorAlign::Right:
- aPos.X() = rNodeRect.GetLeft() + aColLeft[j]
+ aPos.X() = aColLeft[j]
+ aColWidth[j] - rNodeRect.GetItalicWidth();
break;
default: