summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-03-17 14:06:34 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-03-17 14:08:49 +0530
commit2796aa203c563d45b12dd395a963724a1c0e42ed (patch)
tree458e18cfe02985a21ff422c89fbb7617a53583e7 /sd
parent45b0c12a021fb0eb896faf4f0de9026586407012 (diff)
n#862510: Adding unit test case for baseline=0
Change-Id: Ia8281ddc31b653ecf47c6bb5030db74de75b2e8d
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/n862510_1.pptxbin0 -> 34576 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx27
2 files changed, 27 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n862510_1.pptx b/sd/qa/unit/data/pptx/n862510_1.pptx
new file mode 100644
index 000000000000..2a16a4b663c4
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n862510_1.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index eb3b56d2927b..8ea16b547075 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -61,6 +61,7 @@ public:
void testFdo68594();
void testFdo72998();
void testStrictOOXML();
+ void testN862510_1();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -78,6 +79,7 @@ public:
CPPUNIT_TEST(testFdo68594);
CPPUNIT_TEST(testFdo72998);
CPPUNIT_TEST(testStrictOOXML);
+ CPPUNIT_TEST(testN862510_1);
CPPUNIT_TEST_SUITE_END();
};
@@ -235,6 +237,31 @@ void SdFiltersTest::testN821567()
CPPUNIT_ASSERT_MESSAGE("Slide Background is not exported properly", !bgImage.isEmpty());
}
+void SdFiltersTest::testN862510_1()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_1.pptx") );
+ CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() );
+ CPPUNIT_ASSERT_MESSAGE( "in destruction", !xDocShRef->IsInDestruction() );
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ const SdrPage *pPage = pDoc->GetPage(1);
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ {
+ std::vector<EECharAttrib> rLst;
+ SdrObject *pObj = pPage->GetObj( 0 );
+ SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
+ CPPUNIT_ASSERT( pTxtObj );
+ const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
+ aEdit.GetCharAttribs( 0, rLst );
+ for( std::vector<EECharAttrib>::reverse_iterator it = rLst.rbegin(); it!=rLst.rend(); ++it)
+ {
+ const SvxEscapementItem *pFontEscapement = dynamic_cast<const SvxEscapementItem *>( (*it).pAttr );
+ CPPUNIT_ASSERT_MESSAGE( "Baseline attribute not handled properly", !( pFontEscapement && pFontEscapement->GetProp() != 100 ) );
+ }
+ }
+}
+
void SdFiltersTest::testN828390()
{
bool bPassed = false;