diff options
author | Grzegorz Araminowicz <g.araminowicz@gmail.com> | 2017-08-09 12:27:36 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-08-11 18:18:47 +0200 |
commit | 4b149e04ca37056642badab9d18c51857d52e946 (patch) | |
tree | f9aad16a6e3862e91f6a4fdee614cdb8bd2cb1ba /sd/qa/unit | |
parent | c3579e74dec0db203566df1e356af9b06374ef9c (diff) |
SmartArt: fix duplicated text
in some diagrams there are two shapes for the same node - tx and sp
sp should be just space, so remove text from it
Change-Id: I832651918294bd458148a23d6cc1e59c545adc13
Reviewed-on: https://gerrit.libreoffice.org/40913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sd/qa/unit')
-rwxr-xr-x | sd/qa/unit/data/pptx/smartart-text.pptx | bin | 0 -> 38762 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-text.pptx b/sd/qa/unit/data/pptx/smartart-text.pptx Binary files differnew file mode 100755 index 000000000000..9656e4fab64d --- /dev/null +++ b/sd/qa/unit/data/pptx/smartart-text.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 392369234d0a..ba1a44485f25 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -165,6 +165,7 @@ public: void testTdf109067(); void testSmartArt1(); void testSmartArtChildren(); + void testSmartArtText(); void testTdf109223(); void testActiveXCheckbox(); void testTdf109187(); @@ -240,6 +241,7 @@ public: CPPUNIT_TEST(testTdf109067); CPPUNIT_TEST(testSmartArt1); CPPUNIT_TEST(testSmartArtChildren); + CPPUNIT_TEST(testSmartArtText); CPPUNIT_TEST(testTdf109223); CPPUNIT_TEST(testActiveXCheckbox); CPPUNIT_TEST(testTdf109187); @@ -2301,6 +2303,21 @@ void SdImportTest::testSmartArtChildren() xDocShRef->DoClose(); } +void SdImportTest::testSmartArtText() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-text.pptx"), PPTX); + uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW); + uno::Reference<drawing::XShapes> xShapeGroup2(xShapeGroup->getByIndex(0), uno::UNO_QUERY_THROW); + + uno::Reference<text::XText> xText0(xShapeGroup2->getByIndex(0), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT(xText0->getString().isEmpty()); + + uno::Reference<text::XText> xText1(xShapeGroup2->getByIndex(1), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(OUString("test"), xText1->getString()); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf109223() { // In the test document flipV attribute is defined for a group shape |