[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Fri Apr 1 10:22:08 UTC 2016
starmath/source/node.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 04bb10f1d8370465be835fe65df4cb63198829e7
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Mar 31 22:46:44 2016 +0900
starmath: Reduce scope of variables
Change-Id: I6f69752177ee5e3044aa99c1bbe55fc4f8c85c24
Reviewed-on: https://gerrit.libreoffice.org/23703
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 62dd1f5..f7dec45 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2357,11 +2357,11 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
nX += aColWidth[j] + nHorDist;
}
- Point aPos, aDelta;
- SmRect aLineRect;
SmRect::operator = (SmRect());
for (i = 0; i < nNumRows; i++)
- { aLineRect = SmRect();
+ {
+ Point aPos;
+ SmRect aLineRect;
for (j = 0; j < nNumCols; j++)
{ SmNode *pTmpNode = GetSubNode(i * nNumCols + j);
assert(pTmpNode);
@@ -2403,8 +2403,8 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
aPos.Y() += nVerDist;
// move 'aLineRect' and rectangles in that line to final position
- aDelta.X() = 0; // since horizontal alignment is already done
- aDelta.Y() = aPos.Y() - aLineRect.GetTop();
+ Point aDelta(0, // since horizontal alignment is already done
+ aPos.Y() - aLineRect.GetTop());
aLineRect.Move(aDelta);
for (j = 0; j < nNumCols; j++)
if (nullptr != (pNode = GetSubNode(i * nNumCols + j)))
More information about the Libreoffice-commits
mailing list