diff options
author | Noel Power <noel.power@suse.com> | 2013-06-25 10:28:27 +0100 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-28 08:04:30 +0000 |
commit | 74e313801cf5e30c5dcbaa607904d7441b6dff4b (patch) | |
tree | 4709c39eeb1c5e8716c1e7741e2ffcbb50335066 | |
parent | f9b7fe9140ccec30167eba861d9979b03379c121 (diff) |
unit test for commit:1680a8cd4f4393ec15c4f85cb63b6654117d56d1 (fdo#56960)
expand the existing borders import check to cater for xlsx ( and
testing for fine/hair border styles )
Change-Id: Ic5c3cd46e0049dbce9997f0881c4d98e0d64e00c
(cherry picked from commit 69dcacedaccd1d698a54eed615ee8739747bc975)
Reviewed-on: https://gerrit.libreoffice.org/4503
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r-- | sc/qa/unit/data/xls/border.xls | bin | 21504 -> 28160 bytes | |||
-rwxr-xr-x | sc/qa/unit/data/xlsx/border.xlsx | bin | 0 -> 9784 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 25 |
3 files changed, 22 insertions, 3 deletions
diff --git a/sc/qa/unit/data/xls/border.xls b/sc/qa/unit/data/xls/border.xls Binary files differindex b314f7d19be3..876839b1fcb1 100644 --- a/sc/qa/unit/data/xls/border.xls +++ b/sc/qa/unit/data/xls/border.xls diff --git a/sc/qa/unit/data/xlsx/border.xlsx b/sc/qa/unit/data/xlsx/border.xlsx Binary files differnew file mode 100755 index 000000000000..e33c083b3838 --- /dev/null +++ b/sc/qa/unit/data/xlsx/border.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 6ec36e25e1c7..367fd4226d2c 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -95,6 +95,7 @@ public: void testMatrixXLS(); void testBorderODS(); void testBorderXLS(); + void testBorderXLSX(); void testBordersOoo33(); void testBugFixesODS(); void testBugFixesXLS(); @@ -154,6 +155,7 @@ public: CPPUNIT_TEST(testMatrixXLS); CPPUNIT_TEST(testBorderODS); CPPUNIT_TEST(testBorderXLS); + CPPUNIT_TEST(testBorderXLSX); CPPUNIT_TEST(testBordersOoo33); CPPUNIT_TEST(testBugFixesODS); CPPUNIT_TEST(testBugFixesXLS); @@ -202,7 +204,7 @@ public: private: void testPassword_Impl(const OUString& rFileNameBase); - + void testBorderImpl( sal_uLong nFormatType ); uno::Reference<uno::XInterface> m_xCalcComponent; }; @@ -744,9 +746,9 @@ void ScFiltersTest::testBorderODS() xDocSh->DoClose(); } -void ScFiltersTest::testBorderXLS() +void ScFiltersTest::testBorderImpl( sal_uLong nFormatType ) { - ScDocShellRef xDocSh = loadDoc("border.", XLS); + ScDocShellRef xDocSh = loadDoc("border.", nFormatType ); CPPUNIT_ASSERT_MESSAGE("Failed to load border.xls", xDocSh.Is()); ScDocument* pDoc = xDocSh->GetDocument(); @@ -773,7 +775,24 @@ void ScFiltersTest::testBorderXLS() CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),30L); + + pDoc->GetBorderLines( 7, 9, 0, &pLeft, &pTop, &pRight, &pBottom ); + CPPUNIT_ASSERT(pRight); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::FINE_DASHED); + CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),1L); +} + +void ScFiltersTest::testBorderXLS() +{ + testBorderImpl( XLS ); } + +void ScFiltersTest::testBorderXLSX() +{ + testBorderImpl( XLSX ); +} + struct Border { sal_Int16 column; |