diff options
author | Tibor Nagy <tibor.nagy.extern@allotropia.de> | 2024-04-22 16:09:04 +0200 |
---|---|---|
committer | Nagy Tibor <tibor.nagy.extern@allotropia.de> | 2024-06-29 22:49:48 +0200 |
commit | e6b974fd699dcef28a7c26a96c74f3b9a8df9cab (patch) | |
tree | 54de2ab277ee3807d31cd5ab1d2d7ce1f3f3a95e /sd/qa | |
parent | eb56caec68477d11f281090a09c130a416626d88 (diff) |
tdf#157216 PPTX: add "glue points" to flowchart shapes
Change-Id: I1595c3ddcca08e4e95da608edbe18edc57b41362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166457
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf157216.pptx | bin | 0 -> 33660 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf157216.pptx b/sd/qa/unit/data/pptx/tdf157216.pptx Binary files differnew file mode 100644 index 000000000000..ad53887b844a --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf157216.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index bbde4f833efb..d2ae920a0071 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -205,6 +205,35 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testDocumentLayout) } } +CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf157216) +{ + createSdImpressDoc("pptx/tdf157216.pptx"); + uno::Reference<beans::XPropertySet> xFlowchartShape(getShapeFromPage(0, 0)); + uno::Sequence<beans::PropertyValue> aProps; + xFlowchartShape->getPropertyValue(u"CustomShapeGeometry"_ustr) >>= aProps; + + uno::Sequence<beans::PropertyValue> aPathProps; + for (beans::PropertyValue const& rProp : aProps) + { + if (rProp.Name == "Path") + aPathProps = rProp.Value.get<uno::Sequence<beans::PropertyValue>>(); + } + + uno::Sequence<drawing::EnhancedCustomShapeParameterPair> seqGluePoints; + for (beans::PropertyValue const& rProp : aPathProps) + { + if (rProp.Name == "GluePoints") + { + seqGluePoints + = rProp.Value.get<uno::Sequence<drawing::EnhancedCustomShapeParameterPair>>(); + } + } + + sal_Int32 nCountGluePoints = seqGluePoints.getLength(); + // The Flowchart: Punched Tape has 4 glue points. + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), nCountGluePoints); +} + CPPUNIT_TEST_FIXTURE(SdImportTest, testTableStyle) { createSdImpressDoc("pptx/tdf156718.pptx"); |