summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2016-11-10 22:37:13 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2016-11-10 22:37:13 +0100
commit2afcfb6132a1dd7a4e04ca676a7756bc2fed93f0 (patch)
tree54f412ec0da43fd53d1716fedeb982f234b97e0d /sd
parent653cc4c38dd2c05aecbee156aef460f5a361e579 (diff)
tdf#103792: No placeholder text imported for empty title shape
Reviewed-on: https://gerrit.libreoffice.org/30731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit dc024cdd91e3c33eeff8eea22fdef0d90d4dd2c0) Change-Id: I95b4358f0d4311e8f427c8de18863049fb718d9b
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/tdf103792.pptxbin0 -> 14273 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf103792.pptx b/sd/qa/unit/data/pptx/tdf103792.pptx
new file mode 100755
index 000000000000..e48d25e40aba
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf103792.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8f6f36071c56..7ff5a6ca3c4f 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -113,6 +113,7 @@ public:
void testTdf93097();
void testTdf93124();
void testTdf93868();
+ void testTdf103792();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -157,6 +158,7 @@ public:
CPPUNIT_TEST(testTdf93097);
CPPUNIT_TEST(testTdf93124);
CPPUNIT_TEST(testTdf93868);
+ CPPUNIT_TEST(testTdf103792);
CPPUNIT_TEST_SUITE_END();
};
@@ -1232,6 +1234,25 @@ void SdImportTest::testTdf93868()
xDocShRef->DoClose();
}
+
+void SdImportTest::testTdf103792()
+{
+ // Title text shape on the actual slide contained no text neither a placeholder text.
+ sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf103792.pptx"), PPTX);
+
+ const SdrPage *pPage = GetPage(1, xDocShRef);
+ CPPUNIT_ASSERT_MESSAGE("No page found", pPage != nullptr);
+ SdrObject *pObj = pPage->GetObj(0);
+ CPPUNIT_ASSERT_MESSAGE("Wrong object", pObj != nullptr);
+ SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>(pObj);
+ CPPUNIT_ASSERT_MESSAGE("Not a text object", pTxtObj != nullptr);
+
+ const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
+ CPPUNIT_ASSERT_EQUAL(OUString("Click to add Title"), aEdit.GetText(0));
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();