summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorekuiitr <jhaekansh80@gmail.com>2018-06-11 00:11:23 +0530
committerCaolán McNamara <caolanm@redhat.com>2018-06-11 12:25:54 +0200
commit3f8fdfced059bdec7f28164eb3c0e99974c6780a (patch)
treef59594f69c24c127db501a7b2001a763694339f7 /oox
parenta3395c8ada141f6e7cccc7b55ab1dfa963ef8019 (diff)
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/55564 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index c085fb6daa7f..72fc01a5fe9f 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -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);