summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx6
-rwxr-xr-xsd/qa/unit/data/pptx/smartart-text.pptxbin0 -> 38762 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx17
3 files changed, 22 insertions, 1 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 79390b1a3792..c3cc7a0dc977 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -280,8 +280,12 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
}
case XML_sp:
- // HACK. Handled one level higher. Or rather, planned to
+ {
+ // HACK: Handled one level higher. Or rather, planned to
+ // HACK: text should appear only in tx node; we're assigning it earlier, so let's remove it here
+ rShape->setTextBody(TextBodyPtr());
break;
+ }
case XML_tx:
{
diff --git a/sd/qa/unit/data/pptx/smartart-text.pptx b/sd/qa/unit/data/pptx/smartart-text.pptx
new file mode 100755
index 000000000000..9656e4fab64d
--- /dev/null
+++ b/sd/qa/unit/data/pptx/smartart-text.pptx
Binary files differ
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