Kaydet (Commit) 1199713c authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add xls border import test

TODO:
add test cases for:
-color import
-different line styles
-...
üst 4ab9719f
......@@ -104,6 +104,7 @@ public:
void testMatrixODS();
void testMatrixXLS();
void testBorderODS();
void testBorderXLS();
void testBugFixesODS();
void testBugFixesXLS();
void testBugFixesXLSX();
......@@ -124,6 +125,7 @@ public:
CPPUNIT_TEST(testMatrixODS);
CPPUNIT_TEST(testMatrixXLS);
CPPUNIT_TEST(testBorderODS);
CPPUNIT_TEST(testBorderXLS);
CPPUNIT_TEST(testBugFixesODS);
CPPUNIT_TEST(testBugFixesXLS);
CPPUNIT_TEST(testBugFixesXLSX);
......@@ -515,6 +517,35 @@ void ScFiltersTest::testBorderODS()
xDocSh->DoClose();
}
void ScFiltersTest::testBorderXLS()
{
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("border."));
ScDocShellRef xDocSh = loadDoc( aFileNameBase, 1);
CPPUNIT_ASSERT_MESSAGE("Failed to load border.xls", xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
const editeng::SvxBorderLine* pLeft = NULL;
const editeng::SvxBorderLine* pTop = NULL;
const editeng::SvxBorderLine* pRight = NULL;
const editeng::SvxBorderLine* pBottom = NULL;
pDoc->GetBorderLines( 2, 3, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
CPPUNIT_ASSERT_EQUAL(pRight->GetStyle(),editeng::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),6L);
pDoc->GetBorderLines( 3, 5, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
CPPUNIT_ASSERT_EQUAL(pRight->GetStyle(),editeng::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),18L);
pDoc->GetBorderLines( 5, 7, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
CPPUNIT_ASSERT_EQUAL(pRight->GetStyle(),editeng::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),24L);
}
void ScFiltersTest::testBugFixesODS()
{
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("bug-fixes."));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment