sc/qa/unit/data/xls/border.xls |binary sc/qa/unit/subsequent_filters-test.cxx | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+)
New commits: commit 1199713c82d9852f8a41283138f88a06ad887c39 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Apr 2 00:12:13 2012 +0200 add xls border import test TODO: add test cases for: -color import -different line styles -... diff --git a/sc/qa/unit/data/xls/border.xls b/sc/qa/unit/data/xls/border.xls new file mode 100644 index 0000000..b314f7d Binary files /dev/null and b/sc/qa/unit/data/xls/border.xls differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 391b157..1d8a8b6 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -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.")); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits