diff options
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf147459.pptx | bin | 0 -> 13686 bytes | |||
-rw-r--r-- | sd/qa/unit/data/xml/n820786_0.xml | 2 | ||||
-rw-r--r-- | sd/qa/unit/data/xml/tdf109317_0.xml | 3 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 35 |
4 files changed, 40 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf147459.pptx b/sd/qa/unit/data/pptx/tdf147459.pptx Binary files differnew file mode 100644 index 000000000000..ef71ec94d55f --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf147459.pptx diff --git a/sd/qa/unit/data/xml/n820786_0.xml b/sd/qa/unit/data/xml/n820786_0.xml index a7e7c40cbb3b..7c99d7806999 100644 --- a/sd/qa/unit/data/xml/n820786_0.xml +++ b/sd/qa/unit/data/xml/n820786_0.xml @@ -127,6 +127,7 @@ </EnhancedCustomShapeParameterPair> </Coordinates> </PropertyValue> + <PropertyValue name="GluePoints" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Segments"> <Segments> <EnhancedCustomShapeSegment command="1" count="1"/> @@ -209,6 +210,7 @@ </EnhancedCustomShapeParameterPair> </Coordinates> </PropertyValue> + <PropertyValue name="GluePoints" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Segments"> <Segments> <EnhancedCustomShapeSegment command="1" count="1"/> diff --git a/sd/qa/unit/data/xml/tdf109317_0.xml b/sd/qa/unit/data/xml/tdf109317_0.xml index f7ed3136257f..76f9ed70ff9a 100644 --- a/sd/qa/unit/data/xml/tdf109317_0.xml +++ b/sd/qa/unit/data/xml/tdf109317_0.xml @@ -238,6 +238,7 @@ <PropertyValue name="Type" value="ooxml-rtTriangle" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Path"> <Path> + <PropertyValue name="GluePoints" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Coordinates"> <Coordinates> @@ -293,6 +294,7 @@ <PropertyValue name="Type" value="ooxml-rtTriangle" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Path"> <Path> + <PropertyValue name="GluePoints" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Coordinates"> <Coordinates> @@ -348,6 +350,7 @@ <PropertyValue name="Type" value="ooxml-rtTriangle" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Path"> <Path> + <PropertyValue name="GluePoints" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> <PropertyValue name="Coordinates"> <Coordinates> 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 |