[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source sd/qa
Grzegorz Araminowicz (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 10 14:22:40 UTC 2019
oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 30 --------------------
sd/qa/unit/import-tests-smartart.cxx | 5 ++-
2 files changed, 4 insertions(+), 31 deletions(-)
New commits:
commit 4220b3caa405d301f8c15ea25049a33e4bc8138a
Author: Grzegorz Araminowicz <grzegorz.araminowicz at collabora.com>
AuthorDate: Wed Jul 10 10:27:08 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jul 10 16:21:56 2019 +0200
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 at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/75348
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.
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index ffb3a8add28a..9226bbe79152 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -878,10 +878,11 @@ void SdImportTestSmartArt::testOrgChart()
uno::Reference<drawing::XShape> xAssistantConnector(
getChildShape(getChildShape(getChildShape(xGroup, 1), 1), 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xAssistantConnector.is());
- awt::Point aAssistantConnectorPos = xAssistantConnector->getPosition();
+ //awt::Point aAssistantConnectorPos = xAssistantConnector->getPosition();
// This failed, the vertical positions of the connector and the shape of
// the assistant were the same.
- CPPUNIT_ASSERT_LESS(aAssistantPos.Y, aAssistantConnectorPos.Y);
+ //CPPUNIT_ASSERT_LESS(aAssistantPos.Y, aAssistantConnectorPos.Y);
+ // connectors are hidden as they don't work correctly
// Make sure the height of xManager and xManager2 is the same.
uno::Reference<text::XText> xManager2(
More information about the Libreoffice-commits
mailing list