[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Fri Nov 18 01:30:40 UTC 2016


 starmath/source/node.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 395295a40c24a49c12415ec803860a888d734515
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Nov 17 20:26:24 2016 +0900

    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 at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index dfbc819..3db53a9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2282,7 +2282,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();
@@ -2292,7 +2291,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]
@@ -2300,7 +2299,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:


More information about the Libreoffice-commits mailing list