summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-03-31 22:46:44 +0900
committerDavid Tardon <dtardon@redhat.com>2016-04-01 10:21:47 +0000
commit04bb10f1d8370465be835fe65df4cb63198829e7 (patch)
tree356566c74498aabf4de1d9c957f64b942bb92bf6 /starmath
parentc906657cc0ff58e22ef2950878aa32b34cb71a99 (diff)
starmath: Reduce scope of variables
Change-Id: I6f69752177ee5e3044aa99c1bbe55fc4f8c85c24 Reviewed-on: https://gerrit.libreoffice.org/23703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 62dd1f5894f7..f7dec45fd0cb 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)))