diff options
author | Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com> | 2019-07-10 10:27:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-07-10 13:56:13 +0200 |
commit | a913c93260b5c35dc188a19f2e041bac479ac2c7 (patch) | |
tree | 538d280f71c4cddd9fd3131a18483969d02041b9 /oox | |
parent | 031d30bd698117e2bcdd0df76f8b669a1e366d2c (diff) |
SmartArt: hide connectors in org chart as they don't work correctly
Fixing them would require a lot of effort.
Changes are needed in data part (connector shapes are not created in group
shapes associated with data shapes) and in layout part - routing them
differently in all 4 or 5 hierBranch styles, with assistants and without.
Change-Id: I48840454b0272dff9ba42db2eb5d65945642459a
Reviewed-on: https://gerrit.libreoffice.org/75339
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 7f77880b28e8..12dcae71663c 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -104,28 +104,6 @@ bool containsDataNodeType(const oox::drawingml::ShapePtr& pShape, sal_Int32 nTyp return false; } - -/// Sets the position and size of a connector inside a hierChild algorithm. -void setHierChildConnPosSize(const oox::drawingml::ShapePtr& pShape) -{ - // Connect to the top center of the child. - awt::Point aShapePoint = pShape->getPosition(); - awt::Size aShapeSize = pShape->getSize(); - tools::Rectangle aRectangle(Point(aShapePoint.X, aShapePoint.Y), - Size(aShapeSize.Width, aShapeSize.Height)); - Point aTo = aRectangle.TopCenter(); - - // Connect from the bottom center of the parent. - Point aFrom = aTo; - aFrom.setY(aFrom.getY() - aRectangle.getHeight() * 0.3); - - tools::Rectangle aRect(aFrom, aTo); - aRect.Justify(); - aShapePoint = awt::Point(aRect.Left(), aRect.Top()); - aShapeSize = awt::Size(aRect.getWidth(), aRect.getHeight()); - pShape->setPosition(aShapePoint); - pShape->setSize(aShapeSize); -} } namespace oox { namespace drawingml { @@ -407,7 +385,7 @@ sal_Int32 AlgAtom::getConnectorType() nEndSty = maMap.find(oox::XML_endSty)->second; if (nConnRout == oox::XML_bend) - return oox::XML_bentConnector3; + return 0; // was oox::XML_bentConnector3 - connectors are hidden in org chart as they don't work anyway if (nBegSty == oox::XML_arr && nEndSty == oox::XML_arr) return oox::XML_leftRightArrow; if (nBegSty == oox::XML_arr) @@ -571,12 +549,6 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, rShape->setSubType(nType); rShape->getCustomShapeProperties()->setShapePresetType(nType); - - if (nType == XML_bentConnector3) - { - setHierChildConnPosSize(rShape); - break; - } } // Parse constraints to adjust the size. |