Kaydet (Commit) 3f8fdfce authored tarafından ekuiitr's avatar ekuiitr Kaydeden (comit) Caolán McNamara

coverity#1436015 UNUSED_VALUE

I got to know that, earlier the code I've submitted about line algorithm
creates error. I've fixed that in this patch. Moreover, child width and
height doesn't depend of nIncX and nIncY, so I've removed that code, it
relates only to the position of the child.

Change-Id: I9f4bdec87fc20340c21daed60246b9898967ab50
Reviewed-on: https://gerrit.libreoffice.org/55564Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a3395c8a
......@@ -356,15 +356,9 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
double fSpace = 0.3;
awt::Size aChildSize = rShape->getSize();
if (nIncX)
aChildSize.Width /= (nCount + (nCount-1)*fSpace);
if (nIncY)
aChildSize.Height /= (nCount + (nCount-1)*fSpace);
if(nCount <= 2 && nIncY)
aChildSize.Height /= 2;
else
aChildSize.Height /= (nCount+1);
aChildSize.Width /= (nCount + (nCount-1)*fSpace);
aChildSize.Height /= (nCount + (nCount-1)*fSpace);
awt::Point aCurrPos(0, 0);
if (nIncX == -1)
......@@ -372,11 +366,6 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
if (nIncY == -1)
aCurrPos.Y = rShape->getSize().Height - aChildSize.Height;
if(nCount <= 2 && nIncY == -1)
aCurrPos.Y = rShape->getSize().Height - aChildSize.Height*2;
else
aCurrPos.Y = rShape->getSize().Height - aChildSize.Height*(nCount+1);
for (auto & aCurrShape : rShape->getChildren())
{
aCurrShape->setPosition(aCurrPos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment