[Libreoffice-commits] core.git: sd/qa
Muthu Subramanian
sumuthu at collabora.com
Mon Nov 25 06:00:28 PST 2013
sd/qa/unit/data/ppt/fdo68594.ppt |binary
sd/qa/unit/import-tests.cxx | 23 +++++++++++++++++++++++
2 files changed, 23 insertions(+)
New commits:
commit 32f700a683b7faa17c58e6d1aad85915ebd40a1a
Author: Muthu Subramanian <sumuthu at collabora.com>
Date: Mon Nov 25 19:39:20 2013 +0530
fdo#68594: Adding unit test.
diff --git a/sd/qa/unit/data/ppt/fdo68594.ppt b/sd/qa/unit/data/ppt/fdo68594.ppt
new file mode 100644
index 0000000..83a95cd
Binary files /dev/null and b/sd/qa/unit/data/ppt/fdo68594.ppt differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 23ddec3..bd65a30 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -15,6 +15,8 @@
#include <editeng/ulspitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/escapementitem.hxx>
+#include <editeng/colritem.hxx>
+#include <rsc/rscsfx.hxx>
#include <svx/svdotext.hxx>
#include <animations/animationnodehelper.hxx>
@@ -47,6 +49,7 @@ public:
void testFdo64512();
void testFdo71075();
void testN828390();
+ void testFdo68594();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -56,6 +59,7 @@ public:
CPPUNIT_TEST(testFdo64512);
CPPUNIT_TEST(testFdo71075);
CPPUNIT_TEST(testN828390);
+ CPPUNIT_TEST(testFdo68594);
CPPUNIT_TEST_SUITE_END();
};
@@ -240,6 +244,25 @@ void SdFiltersTest::testN778859()
}
}
+void SdFiltersTest::testFdo68594()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/ppt/fdo68594.ppt"));
+ CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+ CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() );
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ const SdrPage *pPage = &(pDoc->GetPage (1)->TRG_GetMasterPage());
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ SdrObject *pObj = pPage->GetObj(1);
+ SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ const SvxColorItem *pC = dynamic_cast<const SvxColorItem *>(&pTxtObj->GetMergedItem(EE_CHAR_COLOR));
+ CPPUNIT_ASSERT_MESSAGE( "no color item", pC != NULL);
+ // Color should be black
+ CPPUNIT_ASSERT_MESSAGE( "Placeholder color mismatch", pC->GetValue().GetColor() == 0);
+}
+
void SdFiltersTest::testFdo64512()
{
::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo64512.odp"));
More information about the Libreoffice-commits
mailing list