tdf#149124 PPTX import: fix broken connectors in grouped shapes
Previously connector lines of grouped shapes were detached after the import losing the original layout (without ungrouping and moving the shapes). Change-Id: I660629d9d1c2cb0ab68de275ca5406f4c48e9145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134943 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
parent
182d2a47a2
commit
25e747ed39
3 changed files with 26 additions and 0 deletions
|
@ -150,6 +150,14 @@ void SlidePersist::createXShapes( XmlFilterBase& rFilterBase )
|
|||
pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, aTransformation, &getShapeMap() );
|
||||
if (pPPTShape->isConnectorShape())
|
||||
maConnectorShapeId.push_back(pPPTShape->getId());
|
||||
if (!pPPTShape->getChildren().empty())
|
||||
{
|
||||
for (size_t i = 0; i < pPPTShape->getChildren().size(); i++)
|
||||
{
|
||||
if (pPPTShape->getChildren()[i]->isConnectorShape())
|
||||
maConnectorShapeId.push_back(pPPTShape->getChildren()[i]->getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
child->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), &getShapeMap() );
|
||||
|
|
BIN
sd/qa/unit/data/pptx/tdf149124.pptx
Normal file
BIN
sd/qa/unit/data/pptx/tdf149124.pptx
Normal file
Binary file not shown.
|
@ -81,6 +81,7 @@ public:
|
|||
virtual void setUp() override;
|
||||
|
||||
void testDocumentLayout();
|
||||
void testTdf149124();
|
||||
void testTdf89449();
|
||||
void testTdf147459();
|
||||
void testTdf146223();
|
||||
|
@ -149,6 +150,7 @@ public:
|
|||
CPPUNIT_TEST_SUITE(SdImportTest);
|
||||
|
||||
CPPUNIT_TEST(testDocumentLayout);
|
||||
CPPUNIT_TEST(testTdf149124);
|
||||
CPPUNIT_TEST(testTdf89449);
|
||||
CPPUNIT_TEST(testTdf147459);
|
||||
CPPUNIT_TEST(testTdf146223);
|
||||
|
@ -295,6 +297,22 @@ void SdImportTest::testDocumentLayout()
|
|||
}
|
||||
}
|
||||
|
||||
void SdImportTest::testTdf149124()
|
||||
{
|
||||
sd::DrawDocShellRef xDocShRef
|
||||
= loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf149124.pptx"), PPTX);
|
||||
|
||||
uno::Reference<container::XIndexAccess> xGroupShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
|
||||
uno::Reference<beans::XPropertySet> xStandardConnector(xGroupShape->getByIndex(2), uno::UNO_QUERY_THROW);
|
||||
|
||||
sal_Int32 nStartGlueId = xStandardConnector->getPropertyValue("StartGluePointIndex").get<sal_Int32>();
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nStartGlueId);
|
||||
sal_Int32 nEndGlueId = xStandardConnector->getPropertyValue("EndGluePointIndex").get<sal_Int32>();
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nEndGlueId);
|
||||
|
||||
xDocShRef->DoClose();
|
||||
}
|
||||
|
||||
void SdImportTest::testTdf89449()
|
||||
{
|
||||
sd::DrawDocShellRef xDocShRef
|
||||
|
|
Loading…
Reference in a new issue