diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-02-08 14:27:05 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-08 15:36:10 +0100 |
commit | b9b4e9223b6c0d6e0b48b694c9aabbe54a250660 (patch) | |
tree | adc4861d9c43a4aa372b3c7041815ae42b2f4276 /oox | |
parent | e426cdc9e4af2d681b2bb0be290a3270df1886c6 (diff) |
oox smartart, cycle matrix: handle left/bottom constraint in composite algo
The bugdoc has 3 shapes in the "outer" circle which have a position
where either x or y is not 0. But these are defined using constraints
talking about the right or bottom edge of the shape.
Map that to top/left, given that we already know the shape size.
Change-Id: If7ccc2fb642046eb53b48c8b2c2b2c6b023ba9e8
Reviewed-on: https://gerrit.libreoffice.org/67544
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 2b17bee2a65d..d6a02570f535 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -543,11 +543,15 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, aPos.X = it->second; else if ( (it = rProp.find(XML_ctrX)) != rProp.end() ) aPos.X = it->second - aSize.Width/2; + else if ((it = rProp.find(XML_r)) != rProp.end()) + aPos.X = it->second - aSize.Width; if ( (it = rProp.find(XML_t)) != rProp.end()) aPos.Y = it->second; else if ( (it = rProp.find(XML_ctrY)) != rProp.end() ) aPos.Y = it->second - aSize.Height/2; + else if ((it = rProp.find(XML_b)) != rProp.end()) + aPos.Y = it->second - aSize.Height; if ( (it = rProp.find(XML_l)) != rProp.end() && (it2 = rProp.find(XML_r)) != rProp.end() ) aSize.Width = it2->second - it->second; |