summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-03-26 16:28:23 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-03-27 13:27:29 +0530
commitb566aa7f16bf5ec389f27f4b7a9c9872fffc3d69 (patch)
treeaf2e733001b11c0866efe04f23d9474584fccdf0 /sd/qa
parent31b8ce1153bb513613cc7b9cc755b2b4abe4852c (diff)
Add unit test for left spacing (anchorCtr)
Change-Id: I8fa347497c9509285c5f0422c618efcb360dbd34
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/pptx/n862510_3.pptxbin0 -> 56463 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx22
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n862510_3.pptx b/sd/qa/unit/data/pptx/n862510_3.pptx
new file mode 100644
index 000000000000..cf0b7b5efa60
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n862510_3.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 30e591021840..382fe693220c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -19,6 +19,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/numitem.hxx>
+#include <editeng/lrspitem.hxx>
#include <rsc/rscsfx.hxx>
#include <svx/svdotext.hxx>
@@ -64,6 +65,7 @@ public:
void testStrictOOXML();
void testN862510_1();
void testN862510_2();
+ void testN862510_3();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -83,6 +85,7 @@ public:
CPPUNIT_TEST(testStrictOOXML);
CPPUNIT_TEST(testN862510_1);
CPPUNIT_TEST(testN862510_2);
+ CPPUNIT_TEST(testN862510_3);
CPPUNIT_TEST_SUITE_END();
};
@@ -284,6 +287,25 @@ void SdFiltersTest::testN862510_2()
}
}
+void SdFiltersTest::testN862510_3()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_3.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( "Left Spacing is wrong! check attribute anchorCtr", pObj->GetTextLeftDistance() < 30);
+ }
+}
+
void SdFiltersTest::testN828390()
{
bool bPassed = false;