diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-03-26 16:26:08 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2014-03-27 13:27:28 +0530 |
commit | 31b8ce1153bb513613cc7b9cc755b2b4abe4852c (patch) | |
tree | bbb1e7397d584d82eae407a945b1c5fdfb277863 /sd/qa | |
parent | 45c91575e7b528119124f574cb78e21158fc2652 (diff) |
Add unit test for text rotation.
Change-Id: Iba4e002c461f00807f277e6032afcdaaf25ea4a2
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/pptx/n862510_2.pptx | bin | 0 -> 48923 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n862510_2.pptx b/sd/qa/unit/data/pptx/n862510_2.pptx Binary files differnew file mode 100644 index 000000000000..b46cea50211e --- /dev/null +++ b/sd/qa/unit/data/pptx/n862510_2.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 8ea16b547075..30e591021840 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -23,6 +23,7 @@ #include <svx/svdotext.hxx> #include <svx/svdoashp.hxx> +#include <svx/svdogrp.hxx> #include <animations/animationnodehelper.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> @@ -62,6 +63,7 @@ public: void testFdo72998(); void testStrictOOXML(); void testN862510_1(); + void testN862510_2(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -80,6 +82,7 @@ public: CPPUNIT_TEST(testFdo72998); CPPUNIT_TEST(testStrictOOXML); CPPUNIT_TEST(testN862510_1); + CPPUNIT_TEST(testN862510_2); CPPUNIT_TEST_SUITE_END(); }; @@ -262,6 +265,25 @@ void SdFiltersTest::testN862510_1() } } +void SdFiltersTest::testN862510_2() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_2.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 ); + { + SdrObjGroup *pGrpObj = dynamic_cast<SdrObjGroup *>( pPage->GetObj( 1 ) ); + CPPUNIT_ASSERT( pGrpObj ); + SdrObjCustomShape *pObj = dynamic_cast<SdrObjCustomShape *>( pGrpObj->GetSubList()->GetObj( 0 ) ); + CPPUNIT_ASSERT( pObj ); + CPPUNIT_ASSERT_MESSAGE( "Wrong Text Rotation!", pObj->GetExtraTextRotation( true ) == 90 ); + } +} + void SdFiltersTest::testN828390() { bool bPassed = false; |