summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-07-10 10:27:08 +0200
committerGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-07-11 11:31:24 +0200
commit128b02cf56c929fd9d5e39a4aa214e081a58bb6a (patch)
treeffc3fffc9ab8ad8cc34c928dd9952ae9145526bb /oox
parent53af44593672cd456b32d4aba56220f10dad16ae (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> Reviewed-on: https://gerrit.libreoffice.org/75397 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx30
1 files changed, 1 insertions, 29 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 93d12f23db8d..46d058b9ad68 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.