diff options
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 9d479fb69437..215d668b2f3f 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp> +#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <stlpool.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -79,6 +80,7 @@ public: virtual void setUp() override; void testDocumentLayout(); + void testTdf147459(); void testTdf146223(); void testTdf144918(); void testTdf144917(); @@ -145,6 +147,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); + CPPUNIT_TEST(testTdf147459); CPPUNIT_TEST(testTdf146223); CPPUNIT_TEST(testTdf144918); CPPUNIT_TEST(testTdf144917); @@ -289,6 +292,38 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testTdf147459() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf147459.pptx"), PPTX); + uno::Reference<beans::XPropertySet> xTriangleShape(getShapeFromPage(0, 0, xDocShRef)); + uno::Sequence<beans::PropertyValue> aProps; + xTriangleShape->getPropertyValue("CustomShapeGeometry") >>= aProps; + + uno::Sequence<beans::PropertyValue> aPathProps; + for (beans::PropertyValue const& rProp : std::as_const(aProps)) + { + if (rProp.Name == "Path") + aPathProps = rProp.Value.get<uno::Sequence<beans::PropertyValue>>(); + } + + uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqGluePoints; + for (beans::PropertyValue const& rProp : std::as_const(aPathProps)) + { + if (rProp.Name == "GluePoints") + { + seqGluePoints + = rProp.Value.get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>(); + } + } + + sal_Int32 nCountGluePoints = seqGluePoints.getLength(); + // The triangle has 6 glue points. + CPPUNIT_ASSERT_EQUAL(sal_Int32(6), nCountGluePoints); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf146223() { sd::DrawDocShellRef xDocShRef |